Friday, June 30, 2023

This morning's prompt was 'eldritch horror'.


I could build up a list of edges of some area, land or sea, as triangles with two of the three vertices matching the edge, which is of course a line segment with two endpoints. We can generate a 3D cross product from a preceding and following vector, and normalize the point at the end of that vector added to the current vertex.

The whole point of this exercise is that I want to be able to define areas on a reasonably smooth round surface, most likely a world but potentially modeling some 3D shape, like a house, a plant, an animal or a starship.

The simplest forms are points, line segments with two endpoints and a distance and points between the endpoints, triangles with three corner/vertex/points and three edges/line segments, an area and points within the triangle, and tetrahedrons which have four vertices, four triangle faces, six edge/line segments, and points within the volume and on the surface of the tetrahedron. I can build a map of the surface of something with some finite number of triangle faces, iterating around curves and whatnot. I could build up a reasonably good world map by subdividing strips of latitude based on the circumference by latitude, where the base of each triangle is at least, say, a kilometer of latitude and the third point is north or south of the line segment between two endpoints, with periodic adjustments. The initial strip at the pole is a triangle fan, then each strip of latitude is made up of quads subdivided as necessary into triangle pairs, some of which may need to be adjusted, subdivided or collapsed out of existence!

No comments:

Post a Comment