Tuesday, July 5, 2022

Today's prompt was 'starfish'


Now, I need to make most of the stuff I coded in a basic-like block of code into functions...

Point Zero needs to be the center of my world at (0,0,0). P1 should be some point on the surface of the planet relative to P0, the center, and this should be in the Z-positive hemisphere for my sanity. P2 is a similar point, but needs to be closer to P1 than just the other side of the planet. One way to handle that would be to use the longitude and latitude for P1 and use a polar angle and distance to get P2. If I use PI/3 then P1 is at some polar angle and ⅓ PI and then P2 is somewhere from the north (or Z-positive, anyway) pole to ⅔ PI. We can then use this and the cross product to find a 4th point, P3, the 3rd vertex of the triangle, based on the distance between P1 to P2.

This gives me an initial triangle and an initial shape to use for my world div. I need to keep track of the points in wrdv and use them to rewrite the world div shp as I need to.


No comments:

Post a Comment