3d - Three.JS, mapping a cube to a sphere and Gnomic Projection -


Nob warnings! ...

Around the basic area, I am trying to apply the standard technique of using a cube as the basic geometry to avoid singularity on the pole while wrapping a texture.

In this way, I take a box-gramometry corner to the surface of the included area, it seems like a good regular lattice.

Then I take a stack grid and use a cubic cube map (6 maps, 'Cubmap') or NASA's 'live projector' to convert a resinner map for each. Apply a change to Cube's 'face'). When I apply these maps to the cube, I do not get regular lines of latitude / longitude.

< P> Ah, look here:

I got the problem, the launch of my corner for the shell was wrong.

  Function Displacement Verttex (Vertex) {var x2 = (vertex.x / radius) * (Vertex. X / Radius); Var y2 = (vertex.y / radius) * (VertexA / Radius); Var z2 = (vertex.z / radius) * (Vertex / radius); Vertex.x = vertex.x * math.Sqrt (1 - (y2 * 0.5) - (z2 * 0.5) + ((y2 * z2) / 3)); Vertex.y = vertex.y * math.Sqrt (1- (z2 * 0.5) - (x2 * 0.5) + ((z2 * x2) / 3)); Vertex.z = vertex.z * math.Sqrt (1 - (x2 * 0.5) - (y2 * 0.5) + ((x2 * y2) / 3)); }         

Those who distribute the plane uniformly on the spherical surface, what is necessary to project them on the surface, Has been changed to the following and the project now works fine ...

  function uninstaller wirtex (top) {vertex.setLength (radius); }  


Comments