Wednesday, August 4, 2021

Subdivided Quads

How about we try something a little different? Subdivide the world rectangle into recursively smaller rectangles which are quads and polar triangles by longitude and latitude from north to south? We start with a polyline quad of (0,0 0,260 520,260 520,0 and 0,0 again), with a position of 0,0 a width of 520 and a height of 260. Then we randomly subdivide the world rectangle into two, randomly choosing width or height and randomly picking a distance, turning one rectangle into two. We then recursively choose a rectangle ten more times and for the same to that rectangle, making two new daughter triangles to replace the picked rectangle, which is removed. We can then figure out the area of each rectangle, which is actually either a quad or a polar rectangle. It’s only important to make polyline quads so that, at some point we can fractalize the quad or polar triangle borders into more complex polygons by picking points on the border lines and moving the borders in or out, adding or subtracting from the quad or triangle and its neighbor.

  1. Do rectangles first, then polyline quads and polar triangles

  2. Code that initial world rectangle polyline quad

  3. Subdivide the world polyline quad into two daughter polyline quads

  4. Calculate quad areas by polar sections (if that’s the right term?)

  5. Subdivide the borders of the quads or polar triangles (I won’t get all of this done tonight)

No comments:

Post a Comment