WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-11-2003, 05: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
 


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 09:56 AM.


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