3D Objects Coding
3D Objects Coding
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
from visual import* print("---------------------MENU--------------\n(1) Curve\n(2) Sphere\n(3) Cone\n(4) Arrow\n(5) Ring\n(6) Cylinder\n(7) Exit")
x = int(input("Enter Your choice:-"))
if x==1:
curve(pos=(vector(0,1,0), vector(1,0,0)), color=color.green)
elif x==2:
sphere(pos=(0,0,0), radius=4, color=color.blue)
elif x==3:
cone(pos=(0,0,0), radius=0.6, color=color.orange)
elif x==4:
arrow(pos=(0,0,0), axis=vector(0,1,0), color=color.red)
elif x==5:
ring(pos=(0,1,0), radius=0.4, color=color.blue)
elif x==6:
cylinder(pos=(0,1,0), radius=0.5, color=color.yellow)
elif x==7:
exit()
else:
print("Wrong Input")
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3D Objects Coding
Reviewed by Ratin Tech
on
November 10, 2018
Rating:
No comments: