|
![](/i/fill.gif) |
> Perhaps someone else wants to to think about this?
>
I don't know if this can be usefull, but this is the original lightflow code
(b-spline):
p = vector3array()
N = 50
M = 10
R = 1.0
r = 0.2
#alloc arrays
p.setSize( N * M )
for i in range( 0, N ) :
u = 2.0 * pi * i / N
for j in range( 0, M ) :
v = 2.0 * pi * j / M
index = i + j*N
p.set( index, vector3( cos(u) * (R + cos(v)*r * (1.0 + cos(u*8.0)*0.8)),
sin(u) * (R + cos(v)*r * (1.0 + cos(u*8.0)*0.8)),
sin(v)*r * (1.0 + cos(u*8.0)*0.8) + r*(1.8) ) )
if not (i % 10) :
sys.stdout.write("\rallocating vertices %d %%" % ((i * 100) / N) )
sys.stdout.flush()
print
s.addObject( s.newObject( "bspline",
[ "size", N, M,
"wrap", 1, 1,
"step", BSplineStep(), BSplineStep(),
"basis", BSplineBasis(), BSplineBasis(),
"points", p,
"tolerance", 0.02, 0.1, 0.05 ] ) )
# destroy arrays
del p
Post a reply to this message
|
![](/i/fill.gif) |