I want to make a program that shows the da vinci tower in vpython and I think I got the right code to rotate the floors each in a sequence like in the da vinci tower. But vpython doesn't respond. What I'm I doing wrong? Can someone please help?
from visual import *
from math import *
scene.autocenter=True
print "Give the desired square meters per floor:"
SquareMeters= int(raw_input());
side=sqrt(SquareMeters)
print "Give the desired height of the tower in meters"
demandedHeight= int(raw_input());
totalFloors = demandedHeight/3;
carryingStructure= cylinder(pos=(0,-1,0), axis=(0,demandedHeight,0), radius=10)
height=0;
floors=[]
v=frame()
while height < demandedHeight:
f = box(frame=v,pos=(0,height,0),size=(side,3,side))
floors.append(f)
height += 3.5
f
print totalFloors;
for floorNr in range(len(floors)):
floor = floors[floorNr]
floor.rotate(angle=0.01*floorNr, axis=(0,1,0), origin=(0,0,0))