maath
maath copied to clipboard
add(triangle): simple triangle subdivision
See
https://graphics.stanford.edu/~mdfisher/subdivision.html https://tylerxhobbs.com/essays/2017/aesthetically-pleasing-triangle-subdivision
Splitting the triangle in two: - get a random vertex A - get the mid point of the opposing side M - add a new edge AM - return 2 new triangles ( ABM, AMC )
Splitting in 4 (sudbidivision): - get midpoint of each vertex ( D, E, F ) - return 4 new triangles [ ABF, DBE, ECF, DEF ]