A little backstory, currently I'm working on implementing a triangle rendering system in Expression2 to create .obj models.
One of the limitations I'm currently experiencing is that I cannot create polygons the old-fashioned way, rather, I'm having to create Isosceles triangles, and cut part of it off.
My current problem is that I'm working on how and where to place the Isosceles triangle. (I have everything else like angle already sorted out)
http://img22.imageshack.us/img22/3251/trianglem.png (Ignore the blue triangle)
v0, v1 and v2 are 3 co-ordinates in 3D space which make up the desired triangle.
The red line is a line that goes from v1 and meets the hypotenuse at right-angles along the plane of the triangle. I wish to calculate p1, which is essentially a point exactly half way between v1 and where the altitude meets the hypotenuse, aka the 'foot'.
My current attempt doesn't work what-so-ever:
Dot = (v0-v1):dot(v0-v2)
P1 = v0 + Dot*((v0-v2):normalized())
I appreciate any help. Thank you.