Spiky white light of death! (participating media test)
Here you go Kram and people:
It's awful code, but it'll make one side of a parabola for you. Scale it down and shape the other side if you want, or make it flat, whatever, then spin it.
Code: Select all
import Blender
from Blender import Mesh,Scene
from time import time
scn=Scene.GetCurrent()
def generate(location, scale, level, currentVerts,currentFaces):
for i in range(32):
currentVerts.append([i,0.1*i**2,0])
if i>0:
currentFaces.append([i-1,i])
return [currentVerts,currentFaces]
t=time()
i=1
v,f=generate([0,0,2],1,0,[],[])
level=Mesh.New(str(i)+'level')
level.verts.extend(v)
level.faces.extend(f)
ob=scn.objects.new(level,'lensShape')
ob.setLocation([i*2,0,0])
print "It took %2.2fs"%(time()-t)
Blender.Redraw()
Who is online
Users browsing this forum: No registered users and 42 guests