cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

# Geodetic structures

Anonymous
Not applicable
Geodetic structures.
It is possible to subdivide the sphere in geodetic triangles in many ways.
We can start with a different platonic bodies and the subdivision depend from the platonic body we choose.
I present here some examples of geodetic spheres.

!!!Instructions to create the GDL-object in the imagine. Name: “geodetica cubo”

!parameters -------------------------------------------------:
n=3 !number cube side subdivisons
m1=77 !material junction spheres
m2=70 !material junction cylinders
sf=1 !bit show sphere
cu=0 !bit show cube
ma=1 !bit show axes
!TEXT 3D ----------------------------------------------------:
pen 20
if ma=1 then lin_ 0,0,0,0,1.2*r,0
pen 66
if ma=1 then lin_ 0,0,0,1.2*r,0,0
pen 24
if ma=1 then lin_ 0,0,0,0,0,1.2*r

pen 1
material 29
if sf=1 then sphere r
l=2*r/sqr(3)
rotz 45
if cu=1 then block l,l,l
del 2

material m1
sphere rs
del 1
sphere rs
del 1 !le facce di un cubo sono 6, i vertici 8 (aggiunti i 2 vertici manacanti)

gosub 1
rotz 90
gosub 1
del 1
mul -1,-1,-1
gosub 1
rotz 90
gosub 1
del 2
rot -1,1,0,-90
gosub 1
del 1
mul -1,-1,-1
rot -1,1,0,-90
gosub 1
del 2

end
1: material m1
for j=0 to n-1
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
ga=(180-2*an)/n*i
e=atn(sqr(2)*tan(g/2-g/n*j))
r/sqr(2)*(sin(an+ga)*cos(e)-cos(an+ga)),r*sin(e)*sin(an+ga)
sphere rs
del 1
next i
next j

for j=0 to n-1
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
ga=(180-2*an)/n*(i+1/2)
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
r/sqr(2)*(sin(an+ga)*cos(e)-cos(an+ga)),r*sin(e)*sin(an+ga)
sphere rs
del 1
next i
next j

material m2
for j=0 to n-1 !orizzontali
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)+cos(an+((180-2*an)/n*(i+1))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)-cos(an+((180-2*an)/n*(i+1))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

!inizio verticali
for j=0 to n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n)-1 !(1+(-1)^n)=0 se n dispari
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
az=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j !verticali tutte comprese in emisfero N

for j=n/4*(1+(-1)^n)+((n-1)/4+1/2)*(1-(-1)^n) to n-1 !verticali
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
az=r*sin(e)*sin(an+((180-2*an)/n*i))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j !verticali tutte comprese in emisfero S

j=(n-1)/2 !solo per n dispari: verticali intermedie tagliate dall'equatore //z
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
az=r*sin(e)*sin(an+((180-2*an)/n*i))
if (1+(-1)^n)=0 then cylind bz-az,rc
del 1
next i
!fine verticali

!inizio oblique
for j=0 to n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n)-1 !oblique da alto sin a centro, emisfero N
for i=0 to n-1 !per n pari sopra equatore tutte=n/2, per n dispari sopra equatore tutte -1 fila=(n-1)/2
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
az=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=acs(( (bx-ax)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=0 to n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n)-1 !oblique da alto dex a centro, emisfero N
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)+cos(an+((180-2*an)/n*(i+1))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)-cos(an+((180-2*an)/n*(i+1))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1)))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n) to n-1 !oblique da alto sin a centro
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n) to n-1 !oblique da alto dex a centro, emisfero S
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*j)/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*j))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)+cos(an+((180-2*an)/n*(i+1))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)-cos(an+((180-2*an)/n*(i+1))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1)))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=acs(( (bx-ax)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=0 to n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n) !oblique da centro a basso sin, emisfero N
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
by=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
bz=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=0 to n/4*(1+(-1)^n)+(n-1)/4*(1-(-1)^n) !oblique da centro a basso dex, emisfero N
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)+cos(an+((180-2*an)/n*(i+1))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)-cos(an+((180-2*an)/n*(i+1))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1)))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=acs(( (bx-ax)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=(n/4+1/2)*(1+(-1)^n)+(n/4+1/4)*(1-(-1)^n) to n-1 !oblique da centro a basso dex, emisfero S
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)+cos(an+((180-2*an)/n*(i+1))))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1)))*cos(e)-cos(an+((180-2*an)/n*(i+1))))
az=r*sin(e)*sin(an+((180-2*an)/n*(i+1)))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=asn(( (by-ay)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j

for j=(n/4+1/2)*(1+(-1)^n)+(n/4+1/4)*(1-(-1)^n) to n-1 !oblique da centro a basso sin, emisfero S (n/4+1/4)*(1-(-1)^n)
for i=0 to n-1
g=180-2*acs(1/sqr(3))
an=(acs(cos(g/2-g/n*(j+1))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1)))
ax=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)+cos(an+((180-2*an)/n*i)))
ay=r/sqr(2)*(sin(an+((180-2*an)/n*i))*cos(e)-cos(an+((180-2*an)/n*i)))
az=r*sin(e)*sin(an+((180-2*an)/n*i))
an=(acs(cos(g/2-g/n*(j+1/2))/sqr(2)))
e=atn(sqr(2)*tan(g/2-g/n*(j+1/2)))
bx=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)+cos(an+((180-2*an)/n*(i+1/2))))
by=r/sqr(2)*(sin(an+((180-2*an)/n*(i+1/2)))*cos(e)-cos(an+((180-2*an)/n*(i+1/2))))
bz=r*sin(e)*sin(an+((180-2*an)/n*(i+1/2)))
bt=asn(( (bz-az)/sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2) ))
af=acs(( (bx-ax)/sqr((bx-ax)^2+(by-ay)^2) ) )
rotz af
roty (90-bt)
cylind sqr((bx-ax)^2+(by-ay)^2+(bz-az)^2),rc
del 3
next i
next j
return
!!! end Instructions to create the GDL-object in the imagine. Name: “geodetica cubo”

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!Instructions to create the GDL-object in the imagine. Name: “geodetica icosaedro”

!parameters -------------------------------------------------:
m=3 !number subdivisons
l=77 !material junction spheres
mm=70 !material junction cylinders
tt=210 !material sphere
o=1 !bit show sphere
jj=100 !offset z % radius r

!TEXT 3D ----------------------------------------------------:
h=r*( (2*cos(36)-2*cos(72))^0.5)
k=r*( (2*sin(36)*sin(36)-cos(72) )^0.5 )
f=asn(h/(2*r))

group "a"
material l
xform 1,0,0,0,
0,1,0,0,
0,0,1,r
sphere vv
del 1
xform 1,0,0,0,
0,1,0,0,
0,0,1,-r
sphere vv
del 1
for hh=0 to m-1 !suddivisioni quadrante xyz
x1=cos(f+(90-f)*hh/m)
y1=0
z1=sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(72)
y2=cos(f+(90-f)*hh/m)*sin(72)
z2=sin(f+(90-f)*hh/m)
for w=0 to m-hh-1
x=r*(x1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
y=r*(y1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
z=r*(z1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
xform 1,0,0,x,
0,1,0,y,
0,0,1,z
sphere vv
del 1
next w
next hh
for hh=0 to m-1 !suddivisioni quadrante xy-z
x1=cos(f+(90-f)*hh/m)*cos(-36)
y1=cos(f+(90-f)*hh/m)*sin(-36)
z1=-sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(36)
y2=cos(f+(90-f)*hh/m)*sin(36)
z2=-sin(f+(90-f)*hh/m)
for w=0 to m-hh-1
x=r*(x1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
y=r*(y1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
z=r*(z1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
xform 1,0,0,x,
0,1,0,y,
0,0,1,z
sphere vv
del 1
next w
next hh
for hh=0 to m-1 !parte intermedia, triangolo con punta in basso
x11=cos(f)
y11=0
z11=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x31=cos(f)*cos(72)
y31=cos(f)*sin(72)
z31=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
for w=0 to m-1-hh
x=r*(x1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
y=r*(y1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
z=r*(z1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
xform 1,0,0,x,
0,1,0,y,
0,0,1,z
sphere vv
del 1
next w
next hh
for hh=0 to m-1 !parte intermedia, triangolo con punta in alto
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
for w=0 to m-1-hh
x=r*(x1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
y=r*(y1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
z=r*(z1*cos(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(w*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
xform 1,0,0,x,
0,1,0,y,
0,0,1,z
sphere vv
del 1
next w
next hh
endgroup

group "b"
material mm
i=r*sin((90-f)/m) !asta su polo nord
j=0
k=r*cos((90-f)/m)
u=0
v=0
w=r
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
i=r*sin((90-f)/m)*cos(36) !asta su polo sud
j=r*sin((90-f)/m)*sin(36)
k=-r*cos((90-f)/m)
u=0
v=0
w=-r
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
for hh=0 to m-1 !aste orizzontali su quadrante xyz
x1=cos(f+(90-f)*hh/m)
y1=0
z1=sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(72)
y2=cos(f+(90-f)*hh/m)*sin(72)
z2=sin(f+(90-f)*hh/m)
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j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+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-1 !aste orizzontali su quadrante xy-z
x1=cos(f+(90-f)*hh/m)*cos(-36)
y1=cos(f+(90-f)*hh/m)*sin(-36)
z1=-sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(36)
y2=cos(f+(90-f)*hh/m)*sin(36)
z2=-sin(f+(90-f)*hh/m)
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*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+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=1 to m-1 !aste orizzontali, parte intermedia, triangolo con punta in basso
x11=cos(f)
y11=0
z11=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x31=cos(f)*cos(72)
y31=cos(f)*sin(72)
z31=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
u=r*(x1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
v=r*(y1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
w=r*(z1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=1 to m-1 !aste orizzontali, parte intermedia, triangolo con punta in alto
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y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2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !1:aste oblique sinistrorse su triangolo vertice basso: valori di hh sotto 0 aggiungono aste in alto, m-2 è il valore massimo per aste in basso (m-1 dà divisione per 0 )
for ww=0 to m-hh-1 !valori sotto 0 aggiungono aste a sinistra, valori sopra m-hh-1 aggiungono a destra
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x11=cos(f)
y11=0
z11=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x31=cos(f)*cos(72)
y31=cos(f)*sin(72)
z31=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x1=(x11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
u=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
v=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
w=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !2:aste oblique destrorse su triangolo vertice basso: valori di hh sotto 0 aggiungono aste in alto, m-2 è il valore massimo per aste in basso (m-1 dà divisione per 0 )
for ww=0 to m-hh-1 !valori sotto 0 aggiungono aste a sinistra, valori sopra m-hh-1 aggiungono a destra
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
u=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
v=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
w=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !3:aste oblique destrorse su triangolo vertice alto: valori di hh sotto 0 aggiungono aste in alto, m-2 è il valore massimo per aste in basso (m-1 dà divisione per 0 )
for ww=1 to m-hh !valori sotto 0 aggiungono aste a sinistra, valori sopra m-hh-1 aggiungono a destra: sostituisco in u,v,r ww con (ww-1)
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x11=cos(f)*cos(-36)
y11=cos(f)*sin(-36)
z11=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x31=cos(f)*cos(36)
y31=cos(f)*sin(36)
z31=-sin(f)
x21=cos(f)
y21=0
z21=sin(f)
x1=(x11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
u=r*(x1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
v=r*(y1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
w=r*(z1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh

for hh=0 to m-2 !4:aste oblique destrorse su triangolo vertice alto: valori di hh sotto 0 aggiungono aste in alto, m-2 è il valore massimo per aste in basso (m-1 dà divisione per 0 )
for ww=1 to m-hh
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x11=cos(f)
y11=0
z11=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x31=cos(f)*cos(72)
y31=cos(f)*sin(72)
z31=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x1=(x11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos(hh*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin(hh*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos(hh*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin(hh*acs(x31*x21+y31*y21+z31*z21)/m))
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x11=cos(f)
y11=0
z11=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x31=cos(f)*cos(72)
y31=cos(f)*sin(72)
z31=sin(f)
x21=cos(f)*cos(36)
y21=cos(f)*sin(36)
z21=-sin(f)
x1=(x11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(y11*(x11*y21-x21*y11)-z11*(z11*x21-z21*x11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
y1=(y11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(z11*(y11*z21-y21*z11)-x11*(x11*y21-x21*y11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
z1=(z11*cos((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m)-(x11*(z11*x21-z21*x11)-y11*(y11*z21-y21*z11))/sin(acs(x11*x21+y11*y21+z11*z21))*sin((hh+1)*acs(x11*x21+y11*y21+z11*z21)/m))
x2=(x31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(y31*(x31*y21-x21*y31)-z31*(z31*x21-z21*x31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
y2=(y31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(z31*(y31*z21-y21*z31)-x31*(x31*y21-x21*y31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
z2=(z31*cos((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m)-(x31*(z31*x21-z21*x31)-y31*(y31*z21-y21*z31))/sin(acs(x31*x21+y31*y21+z31*z21))*sin((hh+1)*acs(x31*x21+y31*y21+z31*z21)/m))
u=r*(x1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
v=r*(y1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
w=r*(z1*cos((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww-1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh-1)))
xform ((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
-((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2),i,
((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))*((w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh

for hh=0 to m-2 !aste oblique sinistrorse su xyz
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x1=cos(f+(90-f)*hh/m)
y1=0
z1=sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(72)
y2=cos(f+(90-f)*hh/m)*sin(72)
z2=sin(f+(90-f)*hh/m)
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*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r((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !aste oblique destrorse su xyz: sostituisco in u,v,r ww con ww-1
for ww=1 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x1=cos(f+(90-f)*hh/m)
y1=0
z1=sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(72)
y2=cos(f+(90-f)*hh/m)*sin(72)
z2=sin(f+(90-f)*hh/m)
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x1=c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i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))/sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !aste oblique sinistrorse su xy-z
for ww=0 to m-hh-1
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x1=cos(f+(90-f)*hh/m)*cos(-36)
y1=cos(f+(90-f)*hh/m)*sin(-36)
z1=-sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(36)
y2=cos(f+(90-f)*hh/m)*sin(36)
z2=-sin(f+(90-f)*hh/m)
i=r*(x1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin(ww*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x1=cos(f+(90-f)*(hh+1)/m)*cos(-36)
y1=cos(f+(90-f)*(hh+1)/m)*sin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u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh
for hh=0 to m-2 !aste oblique destrorse su xy-z: sostituisco in i,j,k ww con ww+1
for ww=0 to m-hh-2
!cylind sul vettore B-A:A=(i,j,k),B=(u,v,w),A origine vettore,AB vettore,rotazione con asse y su xy
x1=cos(f+(90-f)*hh/m)*cos(-36)
y1=cos(f+(90-f)*hh/m)*sin(-36)
z1=-sin(f+(90-f)*hh/m)
x2=cos(f+(90-f)*hh/m)*cos(36)
y2=cos(f+(90-f)*hh/m)*sin(36)
z2=-sin(f+(90-f)*hh/m)
i=r*(x1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(y1*(x1*y2-x2*y1)-z1*(z1*x2-z2*x1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
j=r*(y1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(z1*(y1*z2-y2*z1)-x1*(x1*y2-x2*y1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
k=r*(z1*cos((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh))-(x1*(z1*x2-z2*x1)-y1*(y1*z2-y2*z1))/sin(acs(x1*x2+y1*y2+z1*z2))*sin((ww+1)*acs(x1*x2+y1*y2+z1*z2)/(m-hh)))
x1=cos(f+(90-f)*(hh+1)/m)*cos(-36)
y1=cos(f+(90-f)*(hh+1)/m)*sin(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-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
(v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2),j,
-sqr(((u-i)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2+((v-j)/sqr((u-i)^2+(v-j)^2+(w-k)^2))^2),
0,(w-k)/sqr((u-i)^2+(v-j)^2+(w-k)^2),k
cylind sqr((u-i)^2+(v-j)^2+(w-k)^2),s
del 1
next ww
next hh

endgroup
material tt
if o=1 then sphere r
for i=1 to 5
placegroup "a"
placegroup "b"
rotz 72
next i
del top

!!! end Instructions to create the GDL-object in the imagine. Name: “geodetica icosaedro”
0 REPLIES 0

Latest solutions

Most liked posts