forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lighting_6.cpp
37 lines (25 loc) · 896 Bytes
/
lighting_6.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <matplot/matplot.h>
int main() {
using namespace matplot;
auto [x, y, z] = peaks();
subplot(3, 3, 0);
surf(x, y, z)->lighting(true).primary(0.0).specular(0.0);
subplot(3, 3, 1);
surf(x, y, z)->lighting(true).primary(0.5).specular(0.0);
subplot(3, 3, 2);
surf(x, y, z)->lighting(true).primary(1.0).specular(0.0);
subplot(3, 3, 3);
surf(x, y, z)->lighting(true).primary(0.0).specular(0.5);
subplot(3, 3, 4);
surf(x, y, z)->lighting(true).primary(0.5).specular(0.5);
subplot(3, 3, 5);
surf(x, y, z)->lighting(true).primary(1.0).specular(0.5);
subplot(3, 3, 6);
surf(x, y, z)->lighting(true).primary(0.0).specular(1.0);
subplot(3, 3, 7);
surf(x, y, z)->lighting(true).primary(0.5).specular(1.0);
subplot(3, 3, 8);
surf(x, y, z)->lighting(true).primary(1.0).specular(1.0);
show();
return 0;
}