WindRose.py#
WindRose.py
Generate the surface figure "windrose" that consists of cones
1# Generate the surface figure "windrose" that consists of cones
2import coat
3# get to sculpt room
5# add new volume
7volume = current.Volume()
8# turn to surface
9volume.toSurface()
10height = 100
11radius = 20
12cone1 = coat.cone(height,radius,0)
13cone2 = coat.cone(height/2,radius/2,0)
14matrix = coat.mat4.Identity
15for i in range(4) :
16 alpha = i*90
17 #setup the transform for the cone
18 matrix = coat.mat4.RotationZ(alpha)
19 cone1.transform(matrix)
20 # add into scene,
21 cone1.add(volume)
22
23 matrix = coat.mat4.RotationZ(alpha+45)
24 cone2.transform(matrix)
25 cone2.add(volume)
1 # Generate the surface figure "windrose" that consists of cones
2 import coat
3 # get to sculpt room
4 coat.ui.toRoom("Sculpt");
5 # add new volume
6 current = coat.Scene.sculptRoot().addChild("Wind rose")
7 volume = current.Volume()
8 # turn to surface
9 volume.toSurface()
10 height = 100
11 radius = 20
12 cone1 = coat.cone(height,radius,0)
13 cone2 = coat.cone(height/2,radius/2,0)
14 matrix = coat.mat4.Identity
15 for i in range(4) :
16 alpha = i*90
17 #setup the transform for the cone
18 matrix = coat.mat4.RotationZ(alpha)
19 cone1.transform(matrix)
20 # add into scene,
21 cone1.add(volume)
22
23 matrix = coat.mat4.RotationZ(alpha+45)
24 cone2.transform(matrix)
25 cone2.add(volume)