You can always use a triangle strip array for the bottom too, all with the same values if you really, really want to use one simple loop. Just loop through creating a strip at a time- I input radar data from files, so for testing I create a sphere by specifying elevation, azimuth, and magnitude values, looping through from -90 to 90 on elevation, and 0 to 360 on azimuth. Then in my Java3D program it converts from polar to cartesian coordinates to input to TriangleStripArray. The extra duplicate values don't make a difference (I would like to think java3d optimizes by eliminating duplicate triangles on compile, but I don't know if it does).
-Ed -----Original Message----- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:52 PM To: [EMAIL PROTECTED] Subject: [JAVA3D] Sphere question Hello all, it's me again: Many of you are graphics genius, you use algorithm to generate points and connect them into a sphere. I was trying to use TriangleFanArray for top and bottom part for sphere, TriangleStripArray for body. However, I would like to know the algorithm of generating a sphere because using both Array to generate a whole sphere is kinda annoying. If I can use a loop to create all points and connect them into triangles and fill it with colors/textures. Would anyone tell me please. Thank you very much. Sincerely, Andy =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
