Thursday, August 5, 2021

Round SVG

I kinda got lost in the weeds with my learning of SVG lately and forgot that I had specifically wanted to do some DOM text wrapping, otherwise I should stick to using the canvas element. This is primarily about wrapping the curve of an oval or circle, using CSS, actually, so it's not just SVG. I could display one hemisphere, two side by side or even use an oval.

I can start subdividing the world surface with a triangle fan polygon around some point on the surface of a sphere, take some section of the polygon border and push out a loop around some other point outside that first polygon, turning two polygons, that first one and the rest of the world into three by subdividing that second larger polygon. Eventually I would have some areas I can have designated land or sea, and a mesh of triangles making up the land and sea polygons approximating the surface of a world. The low poly spherical polyhedron would not have the same exact area as the sphere but perfection is the enemy of good enough; this I have proven.

Later- Well, that didn’t work the way I expected it to… I coded some shapes, but when I copy-pasted to the blog, things got very ugly. Defeated.


No comments:

Post a Comment