All pastes #123383 Raw Edit

Mine

public text v1 · immutable
·published 2006-08-09 07:41 UTC
rendered paste body
from Blender import Get, Scene, Noise, Object
from Blender.Mathutils import Vector

# jitter speed
j = 0.15 
# pos jitter
pj = 0.005
# rot jitter
rj = 0.025

# min jitter - see the "jittering" value printed to console
#minj = 0.4
# max jitter
#maxj = 10.0

cam = Scene.GetCurrent().getCurrentCamera()
plane = Object.Get('airplane.005')
pvec = Vector(cam.getLocation()) - Vector(plane.getLocation())
pdist = pvec.length

time = Get('curtime')

#psi = max((j*time)/pdist, minj)
#psi = min(psi, maxj)

psi = j * time
ps = (psi, psi, psi)

print "jittering %.3f" % psi

rv = Noise.vTurbulence(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN)

cam.dloc = (pj * rv[0], pj * rv[1], pj * rv[2])
cam.drot = (rj * rv[0], rj * rv[1], rj * rv[2]