Draw an ARC and a Circle
Kleanthis
Member, Employee Posts: 6
✭✭✭
ExtAPI.Graphics.Scene.Clear()
draw_cmd = ExtAPI.Graphics
R=1
theta_in = 0
theta_end = (pi)
np = 60
dtheta = (theta_end- theta_in)/np
graphics = ExtAPI.Graphics
for i in range(np):
p1= draw_cmd.CreateWorldPoint (R*cos(i*dtheta+theta_in), R*sin(i*dtheta+theta_in),0)
p2= draw_cmd.CreateWorldPoint (R*cos((i+1)*dtheta+theta_in), R*sin((i+1)*dtheta+theta_in),0)
line = graphics.Scene.Factory3D.CreatePolyline([p1,p2])
line.LineWeight = 4
line.Color = 0x00FFFF
Tagged:
0