Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You could actually create your own sphere rendering function.</p> <p>A tesselated sphere is no more then a stack of n cone segments, each approximated with m slices.</p> <p>This image (courtsey of dglwiki.de) illustrates this: <img src="https://i.stack.imgur.com/UA0Nl.jpg" alt="gluSphere construction"></p> <p>(the german text translates to 'If the resolution is to low, the sphere degenerates to other symetric Bodies)</p> <p>In order to construct the sphere, you'll need to specify the center point, radius, number of stacks and number of slices per stack.</p> <p>The first pole of your sphere can be any point with a distance of radius from the center point. The vector from this point to the center point defines your sphere's axis of rotation (and thereby the position of the second pole)</p> <p>Next, you'll need to approximate several equidistant circles of latitude on your sphere around the axis of rotation. The number of circles should be number of stacks -1. Each of these circles should have as much vertices as your desired number of slices.</p> <p>Having calculated these, you have enough geometry information to construct your spheres faces.</p> <p>Begin with a triangle fan originating at one of the poles using the vertices of the first circle. Then, construct Triangle strips for each pair of neighbouring circles of latitude. The last step is to construct another triangle fan from the second pole to the last of your circles of latitude.</p> <p>Using this approach, you can generate arbitrary spheres of arbitrary smoothness</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload