0

Hi there everybody,

I really have my difficulties with loops ;)

I want to creat a cube with 10 x10 x1 (1 is like thickness, but as I have to create a mesh subsequently I can't do it with geometric properties)

Plz help :)

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by vegaseat
0

Give VPython a try, a free 3D modeling/simulating package ...

# a rotating cube using vpython from http://vpython.org
# also known as visual python

import visual as vs

# set up the frame
vs.scene.width = 500
vs.scene.height = 500
vs.scene.center = (0,0.5,0)
vs.scene.title = "rotating cube"

cube = vs.box(pos=(0,0.5,0), axis=(1,1,1), length=1.2, 
    width=1.2, height=0.12, color=vs.color.yellow)

while True:
    # set rate to zero to freeze
    vs.rate(10)  
    # smaller angle gives slower movement
    cube.rotate(angle=0.0015, axis=vs.scene.up)
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.