David A Thomson wrote:
> 
> My project is to build a fully rotatable 3D star map in Java. I currently
> have about 3000 sphere transforms in a contentBranchGroup which is running
> incredibly slowly (but that's for another mail). My problem is that I
> should be able to select a star and move the camera to point directly at
> it. However, because the stars are rotatable, the star positions (x,
> y, z coordinates) change all the time. How can I keep track of their
> coordinates?

You may want to consider modeling the stars as points, on the inside of
one large transparent sphere.  Then when people select a star point,
they are really selecting the sphere wall .  This deals with slowness,
and deals with getting star location to use in a pointAt routine.

Often star coordinates are given as a kind of polar coordinates in the
earth's sky, so you can take these and map them as points onto a sphere
easily.  Then you take geometry for a large sphere, turn backface
culling off or invert the geometry, make it transparent, and make it a
little larger than the abstract sphere where your star points are
located.


-- 
// Randy Stiles mailto:[EMAIL PROTECTED] O/L922 B/255
// Lockheed Martin Advanced Technology Center  3251 Hanover Street 
// office: 650.354.5256  fax: 650.354.5235     Palo Alto, CA 94304-1192
// http://vet.parl.com/~vet/
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to