|
 |
Lars Rohwedder <rok### [at] gmx de> wrote:
> Inspired by this object:
>
>
http://www.shutterstock.com/pic-94505617/stock-photo--d-infinity-shape-d-render-illustration.html
>
>
> I would like to change the whole object into a single "sphere_sweep" and
> I'd like to have a closed formula that calculates the positions of all
> spheres at once, with "smooth" transitions between the 3 3/4 torii, so
> no cylindrical parts between them.
>
>
> Any ideas, suggestions?
Python in the Blender creates it so:
def Torus_Knot(self):
p = self.torus_p
q = self.torus_q
w = self.torus_w
res = self.torus_res
h = self.torus_h
u = self.torus_u
v = self.torus_v
rounds = self.torus_rounds
newPoints = []
angle = 2*rounds
step = angle/(res-1)
scale = h
height = w
for i in range(res-1):
t = ( i*step*pi)
x = (2 * scale + cos((q*t)/p*v)) * cos(t * u)
y = (2 * scale + cos((q*t)/p*v)) * sin(t * u)
z = sin(q*t/p) * height
newPoints.extend([x,y,z,1])
return newPoints
From the received verts cubic_spline is created
Post a reply to this message
|
 |