WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-07-2009, 08:40 PM
bernie bernie is offline
Member
 
Join Date: May 2007
Posts: 18
smooth accelerations and decelerations for translations and rotations?

I'd like to move the viewpoint on a simple path (e.g., translation, curve, translation), and the vizact commands do that quite elegantly - the only problem is that I did not find any way to have smooth changes in velocity (similar to smooth accelerations and decelerations (braking)). It look a bit jerky, and observers are more likely to get sick this way

Any ideas/suggestions?
Thanks!

here's some code that produces the jerky motion onset/offset for translations and rotations

Code:
import viz

viz.go()

#Add the ground plane
viz.add('tut_ground.wrl')

#Move whatever forward at 2 m/sec for 5 seconds
firstTranslation = vizact.move(0,0,3,3)

# make a curve out of a combined rotation and translation
secondTranslation = vizact.move(0,0,2, 3)
# rotate 120 deg in 3 seconds
secondRotation = vizact.spinto(0,1,0, 120, 3, viz.TIME)
secondMotion = vizact.parallel(secondTranslation, secondRotation)

# make another straight path segment
thirdTranslation = vizact.move(0,0,3,2)

# assemble the sequence of individual path segments into one
moveAlongPath = vizact.sequence(firstTranslation, secondMotion, thirdTranslation)

#move observer along path when spacebar is pressed
vizact.onkeydown(' ', viz.MainView.add, moveAlongPath)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 04:21 AM.


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