I am trying to write a program that generate procedural cities. However, I am stuck on a problem : I don't know how to subdivide a triangle into a rectangle and other triangles. I know how to subdivide into a quadrangle + triangles but I have to work with rectangles for now.
So I'm searching an algorithm that will, for any kind of triangle, find the biggest rectangle contained inside a triangle.
What I know :
- the position of the vertices of my triangle.
- not a lot of math. I would love to change that but I'm not brave enough !
Thanks.
Bump Edit : Can somebody gives me some pointers please ? It would help me a lot. Thanks.
From this article :