Mostly correct.
You will first calculate the normal and plug it in the a,b,c parameters in the equation.
Then replace x,y,z by one of the points on the plane(one of the points of the triangle) and you have got d.
The reset is correct.
Two things to note:
1. if (D * n) = 0 it means that the ray and the plane are parallel hence no intersection.
2. The algorithm described in the linked paper performs ray/triangle intersection yet what I've described only performs ray.plane intersection.
Which means that after you calculated the intersection point of the ray and the plane you still have to check if it lies within the triangle.
Yes. Thank you!
oh...I thought (according to wiki) that I must do the folowing:
Method 2
To describe the plane as an equation in the form ax + by + cz + d = 0, solve the following system of equations:
This system can be solved using Cramer's Rule and basic matrix manipulations. Let
. If D is non-zero (so for planes not through the origin) the values for a, b and c can be calculated as follows:
And then:
I dont se a normal in the equasion. What did you ment by: "normal and plug it in the a,b,c"