Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (578)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Sphere approximation with subdivisions of icosahedron  (Read 2570 times)
0 Members and 1 Guest are viewing this topic.
Offline abies

Senior Duke





« Posted 2006-05-27 22:38:37 »

Standard way of rendering sphere is by divinding into triangles at regular angles - which gives very different sizes of triangles near the poles and 'equator'. Probably a lot better way would be to start from icosahedron (which is very sphere-like given it is composed from 20 triangles only) and then subdivide the triangles for better level of detail. Does anybody know about ready to use algorithm for it ? It doesn't have to be java3d specific, just something outputting the triangle coordinates. Even coordinates for basic icosahedron would be nice Smiley

If not, I'm considering writing one. One question which comes to my head - if I would like to approximate the sphere of radius 1, should the vertices of icosahedron be at distance one from center (and stay there when more and more vertices are added with better level of detail) or should they be moved a bit further for basic LOD and get closer and closer to sphere radius with each detail step (which would mean that volume of the solid would be always the same) ?

Artur Biesiadowski
Offline NVaidya

Junior Duke




Java games rock!


« Reply #1 - Posted 2006-05-28 04:41:38 »

Link to the sphere code of Jon Leech - haven't tried it myself though; also gives icosahedron coordinates:
http://www.neubert.net/Htmapp/SPHEmesh.htm

Some more in the CGA FAQ:
http://cgafaq.info/wiki/Evenly_Distributed_Points_On_Sphere

I believe that Java 3D improved upon its sphere tesselation some versions back.

Gravity Sucks !
Offline abies

Senior Duke





« Reply #2 - Posted 2006-05-28 08:29:55 »

Thanks a lot - I was looking for a code like that.

Since my last post I have realized that putting a texture on top of such sphere will not be an easy undertaking, but maybe it can be solved easily with pixel shader, skipping interpolation on vertex level completly.

Artur Biesiadowski
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

DarkCart (23 views)
2014-10-31 21:44:48

DarkCart (29 views)
2014-10-31 21:43:57

TehJavaDev (40 views)
2014-10-27 03:28:38

TehJavaDev (31 views)
2014-10-27 03:27:51

DarkCart (45 views)
2014-10-26 19:37:11

Luminem (27 views)
2014-10-26 10:17:50

Luminem (31 views)
2014-10-26 10:14:04

theagentd (36 views)
2014-10-25 15:46:29

Longarmx (64 views)
2014-10-17 03:59:02

Norakomi (62 views)
2014-10-16 15:22:06
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!