WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-11-2003, 04:22 PM
Buster Buster is offline
Member
 
Join Date: Dec 2003
Posts: 1
Rotation

Hello Vizard Experts,

I am a beginner and need some help. Does anybody know a way (or the code) to allow the user's view to remain stationary (or at least the appearance of it) and to make a constellation of points in space rotate at the same time? We want to create an experiment where students watch a constellation of points while it is rotating so they can understand how all the points relate to each other on a 3-D level but we don't want them to move from their position. Is this possible?

Thanks in advance for your help!

Buster
Reply With Quote
  #2  
Old 12-11-2003, 04:53 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi Buster,

If you attach an object to the HEAD then it will always be centered around the viewer. Let's say that your constellations are in a file called 'constellation.wrl', then you would simply do the following:

stars = viz.add('constellation.wrl',viz.HEAD)

Then when you rotate the model it will be rotating around the head, no matter where the viewer moves.

Are you importing the constellations from a model or generating them on-the-fly? If you're generating them on-the-fly then you would simply do something like the following:

viz.startlayer(viz.POINTS)
viz.vertex(...)
.
.
stars = viz.endlayer(viz.HEAD)

Look at the file spindots.py in the Vizard20/tutorial/onthefly. It is a simple example of creating a sphere of points and rotating them. Good luck!
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 01:58 PM.


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