Friday, July 8, 2022
Thursday, July 7, 2022
Today’s prompt was ‘seahorse’ and with a little help from google I used a pretty good reference to achieve an excellent sketch, having a fairly good run this week! 8-P
Now I need to work out exactly what I want to code, dongma?!
I need polygons, especially triangle meshes to draw weirdly shaped divs in my web page (I am still attached to the unholy trinity of HTML/CSS/Javascript which I can (horrors!) code in one HTML file and copy paste into my blog with mixed results. So, a triangle mesh of vertices at or below sea level, with a random point walk of points pulled above sea level. I can make a grid of points within my usual 520 pixels square, say 40 by 40 squares 13 pixels across or use percentages, 100% of a 520 px square div, and then randomize the points, following the edges to get the border of my map div. I can randomly ‘walk’ the points, pulling up land bits and defining the land triangles. The grid makes up quads, which would be subdivided across the short diagonal to make triangle pairs.
Okay, so go do that…
Wednesday, July 6, 2022
Cross product...
Doing something quick and dirty with the cross product.
Tuesday, July 5, 2022
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.
Monday, July 4, 2022
Eh, I made a triangle
I'm going to make some triangle faces of a polyhedron which approximates the surface of my world sphere, starting with two vectors between three points in the surface of the sphere which represents some patch of land or sea.