WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-19-2006, 01:19 PM
Wenamun Wenamun is offline
Member
 
Join Date: Jan 2006
Location: Milwaukee Wisconsin
Posts: 11
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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC