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 :)

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)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.