Does anyone know how to duplicate the top of the 'Torre Agbar' building?
I've been able to make the whole colom structure but the top code is bothering me
Pls help; need it for my school assignment
What I'e got so far :
from visual import*
import math
#gegeven
straal= 8
cilinders= 20
pi= math.pi
puntbalk=cilinders*2
top=5
hoek= 2*pi/cilinders
hoek2= hoek+(hoek/2)
#coordinaten
x=[]
z=[]
y=[]
h=[]
A=[]
B=[]
#uitvoer
import random
for i in range(cilinders):
x.append(straal*cos(hoek*i))
z.append(straal*sin(hoek*i))
y.append(straal*cos(i*hoek+(hoek/2)))
h.append(straal*sin(hoek*i+(hoek/2)))
A.append(cos(straal*cos(hoek*i)))
B.append(cos1(straal*sin(hoek*i)))
def balken():
hoogte=int(raw_input("geef hoogte: "))
if hoogte<=0:
print 'geef grotere getal in'
elif hoogte>50:
print 'geef kleiner getal'
else:
for lengte in range(hoogte):
for i in range(len(x)):
for K in range(hoogte/2):
kerncilinder= cylinder(pos=(0,0,0),axis=(0,lengte,0), radius=1)
wand= box(pos=(y[i],lengte+1.5,h[i]),axis=(y[i],0,h[i]),size=(0.2,0.99,2.5),opacity=0.4,color=(random.random(),0,random.random()))
cylinder(pos=(0,lengte,0),axis=(x[i],0,z[i]), radius=0.1)
return balken
print balken()
(It's in dutch)