1

I'm working on making the hexagons tessellated sphere using the fully procedural/programmed approach. Basically I'm following the guidance @coproc gave as a reply to the question here: https://stackoverflow.com/questions/46777626/mathematically-producing-sphere-shaped-hexagonal-grid

For each icosahedron spherical triangle I'm trying to map points on such triangle into a planar normalized (i.e. from 0.0 to 1.0) UV coordinate space. See my question and solutions here: Bounding rectangle for a triangle and normalized coordinates

The implementation I've done is made in such way that I treat the triangle as a planar one and this seems to produce gaps on the edges of triangles.

See the picture of the result I'm unsure how to fix this, but I suppose if I treat triangle as a spherical one, this might solve the issue.

So two questions from my side:

  1. How do I map/project the coordinates of a spherical triangle to the plane, defined by 3 vertices of the triangle.
  2. Perhaps someone can have a look at the implementation linked below and point out the error.

P.S. The implementation that draws the picture above is located here: https://shaderfrog.com/app/view/2360

lhog
  • 67
  • I notice that you have a pentagon where the five black swatches meet. Perhaps you should explain more fully what you are trying to accomplish. – saulspatz Jun 06 '18 at 14:01
  • @saulspatz In the other post that's what's explicitly stated: "hexagons with 12 pentagons" -- at the vertices of the icosahedron, so I don't think there's a problem there. – Anonymous Jun 06 '18 at 14:04
  • @Anonymous Well, my view is that the question should be completely stated, without one having to read other posts to find out what is being asked. – saulspatz Jun 06 '18 at 14:10
  • @saulspatz I'm sorry for being ambiguous. I'm very well aware that it's impossible to tesselate a sphere with hexagons only, so instead I create 20 patches, and in the 12 places where these patches connect together I should observe pentagons. That is fine. My issue is that the patches (spherical triangles) don't stitch together and leave visible gaps. I'm not sure what is the issue exactly, but suspect it might be because I work with triangle points mapping to normalized UV coordinate space like if the triangles were flat, rather than spherical. See my 1st question. – lhog Jun 06 '18 at 15:47

1 Answers1

0

Done here at last (took me more than half year on and off):

https://shaderfrog.com/app/view/2977

lhog
  • 67