summaryrefslogtreecommitdiff
path: root/engines/polyps/howdy.polyp
blob: 0d0113d69d6a27eb5a19e20c3849eaf32a05166a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Example polyps script...
 *
 */

MyVar := 3;

Cube(a, b, c, s) := (x < a+s) & (x > a-s) & (y < b+s) & (y > b-s) & (z < c+s) & (z > c-s);

def Sphere(a, b, c, s) := (x+a)**2 + (y+b)**2 + (z+c)**2 < s;

def Sphere(a, b, c, s) := ((x+a)**2 + (y+b)**2 + (z+c)**2 < s);

Sphere(a, b, c, s) := (x+a)**2 + (y+b)**2 + (z+c)**2 < s;

RoundedCube(a, b, c, s) := Cube(a, b, c, s) & !Sphere(a, b, c, s * 1.4);	// Makes a cube that's slightly rounded.

Render(RoundedCube(0, 1, 1, 5))