| ▲ | airbreather 3 hours ago | |||||||
Why the obsession with triangles? If you just want areas, or to know if a point is inside or outside the shape there is a better way. Given a simple closed curve, points (ax, ay) (bx, by) (cx, cy) (dx, dy) as a trivial example. Line them up a,b,c,d,a vertically and take the "determinant" as we were taught. Axby - aybx + bxcy - bycx etc etc. Divide the result by -2 and you have the are, positive is clockwise, negative is anticlockwise. Put an anticlockwise shape inside a clockwise shape and you have a donut. There is more, have to go to dinner. | ||||||||
| ▲ | jcattle 2 hours ago | parent | next [-] | |||||||
Obsession with triangles so the GPU can show millions of polygons on a webmap. | ||||||||
| ▲ | adrian_b 2 hours ago | parent | prev | next [-] | |||||||
The obsession with triangles comes from Microsoft, who around 1995 chose to support only triangles in DirectX. As a consequence of that, the GPU vendors designed then GPUs supporting only triangles in hardware, abandoning earlier attempts to also support other figures. That has been inherited until today, so any program that wants to use not only the general-purpose computing features of a GPU, but also the dedicated graphics hardware from it, must convert any other kinds of graphics primitives into triangles, before rendering on the GPU. | ||||||||
| ▲ | Sharlin 2 hours ago | parent | prev [-] | |||||||
There’s this thing called rendering, pretty important for maps. | ||||||||
| ||||||||