Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
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 3922 times)
0 Members and 1 Guest are viewing this topic.
Offline abies

Senior Devvie

« 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 Devvie

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:

Some more in the CGA FAQ:

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

Gravity Sucks !
Offline abies

Senior Devvie

« 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.

Archive (86 views)
2017-02-27 19:41:49

Riven (80 views)
2017-02-27 17:26:59

numerical (447 views)
2017-02-21 07:32:16

numerical (451 views)
2017-02-21 07:31:46

theagentd (561 views)
2017-02-18 13:42:33

theagentd (557 views)
2017-02-18 13:35:16

h.pernpeintner (1732 views)
2017-01-24 22:39:11

h.pernpeintner (1688 views)
2017-01-24 22:38:32

Galdo (2270 views)
2017-01-12 13:44:09

Archive (2183 views)
2017-01-02 05:31:41
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!