Exponential Scaling
Hi.
My code scales my model (ball for now) with coordinates from my PPT system.
I would like to be able to scale the model quickly with very little movement from the PPT. Right now it's a one to one ratio.
I've used ppt.command(4.002)
to scale all my numbers by 2, or 5 or ten etc.
But I want exponential growth.
Thanks for any help!
Here's my code:
viz.go()
PORT_PPT = 4
ball = viz.add('white_ball.wrl')
ball.translate(0,2,5)
ppt = viz.add('vizppt.dls')
def ontimer(num):
data = ppt.get()
ball.scale(data[0],data[1],data[2])
viz.callback(viz.TIMER_EVENT, ontimer)
viz.starttimer(1,viz.FASTEST_EXPIRATION, viz.FOREVER)
-Wenamun
|