intersection [RESOLVED, tnx]
working in space (3-d)
i have a line (a vector; v=[vx,vy,vz]) and a triangle (three vectors to define three distinct points; v1=[v1x,v1y,v1z],v2=[v2x,v2y,v2z],v3=[v3x,v3y,v3z]) and i need to determine whether there is an intersection between them or not...
chalanging, not?
:p
Re: intersection [RESOLVED, tnx]
Can you do something like this.
If the triangle is A B C and the point is P, check if the area of triangle ABC is equal (difference 0.00001) same as sum of areas of triangles made by either side of triangle and point P
area(ABC) - [area(ABP)+area(ACP)+area(BCP)] < 0.00001
You may calculate area of triangle using Heron Formula:
http://mathworld.wolfram.com/HeronsFormula.html
I need a VB code to determine intersection point of line and a plane. Does anyone have it?