# sway, py by ms, 11.1999.
From Blender import *.
From math import *.
Import whrandom.
# number of frames for once around -.
# the higher the number, the more slowly thu.
E Lamp sways.
Speed = 100.
Pi2 = pi * 2.
Lamp = object. Get(Lamp).
Box = object. Get(box).
T = get(const. Bp_curtime) - 1.0 # start au.
T 0.0.
# make the Lamp sway, taquíng into consideratu.
Ion the size of the.
# box - Change the size of the.
# box in order todo test it and press alt-a again.
# the Radius of the orbit should oscillate sou.
Mewhat.
R = box. Sizex* (0.7 + 0.1 * sin(10* te * pi2 /u.
Speed)).
Lamp. Locx = r * cos(t * pi2 / speed).
Lamp. Locy = r * sin(t * pi2 / speed).
# make the Lamp flicker:
Lampdata = Lamp. Get(Lamp).
R = whrandom, random().
Lampdata. Energ = 1.0 + 0.5 * r.
# alos make the halo size flicker:
Mat = material. Get(halo).
Mat. Hasize = 0.10 * (1.0 + 0.5 * r).