File: CSG%20test.es

package info (click to toggle)
structure-synth 1.5.0-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,268 kB
  • ctags: 1,966
  • sloc: cpp: 10,209; python: 164; makefile: 71; sh: 15
file content (31 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (5)
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
// Example of a CSG (Constructive Solid Geometry) system
// Should be used with a PovRay template.
//
// See:
// http://www.flickr.com/photos/syntopia/3644799200/
// for more information.
set maxdepth 17
set recursion depth

template::intersection-begin
{ y 0.5 s 5 1 1 color white } box
template::union-begin
r1
template::union-end
template::intersection-end

rule r1 md 17 {
 template::difference-begin
 sphere
 { s 0.99  x -0.1 } sphere
 template::difference-end
 1 * { s 0.95 x -0.1 } 1 * { s 0.95 x -0.1 } r1
}

rule r1 md 17 {
 template::difference-begin
 sphere
 { s 0.99  x -0.1 } sphere
 template::difference-end
 1 * { s 0.95 x -0.1 } 1 * { s 0.95 x -0.1 } r1 
}