3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
WindRose.py

Generate the surface figure "windrose" that consists of cones.

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
4coat.ui.toRoom("Sculpt");
5# add new volume
6current = coat.Scene.sculptRoot().addChild("Wind rose")
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)
SceneElement sculptRoot()
get the root of all sculpt objects
Definition coat.py:2843
Definition coat.py:5429
mat4 RotationZ(Angle=float)
Definition coat.py:609
toRoom(name=str)
switch to the room
Definition coat.py:3251