-
Notifications
You must be signed in to change notification settings - Fork 0
/
csg.yaml
50 lines (50 loc) · 967 Bytes
/
csg.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
- add: camera
width: 1280
height: 720
field-of-view: PI/3
from: [0, 1.5, -5]
to: [0, 0, 0]
up: [0, 1, 0]
- add: point-light
at: [-10, 10, -10]
intensity: [1, 1, 1]
- add: csg
op: difference
args:
# outer
- kind: csg
op: intersect
args:
- kind: sphere
transform:
- [scale, 1.3, 1.3, 1.3]
- kind: cube
transform:
- [rotate-y, PI/3]
# inner
- kind: csg
op: union
args:
- kind: csg
op: union
args:
- kind: cylinder
transform:
- [scale, 0.6, 0.6, 0.6]
- [rotate-y, PI/3]
material:
color: [1, 0, 0]
- kind: cylinder
transform:
- [scale, 0.6, 0.6, 0.6]
- [rotate-x, PI/2]
- [rotate-y, PI/3]
material:
color: [0, 0, 1]
- kind: cylinder
transform:
- [scale, 0.6, 0.6, 0.6]
- [rotate-z, PI/2]
- [rotate-y, PI/3]
material:
color: [0, 1, 0]