

kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>
> I have 3 points A, B and C
> I would like the "plane" object to pass through these three points.
>
> It is easy to determine the equation of a plane that passes through
> these three points. We obtain this equation : ax + by + cz + d = 0
>
> I try to do : plane { <a, b, c>, d }
>
> but the plane does not pass through the points.
>
>
> Documentation at <http://www.povray.org/documentation/view/3.7.1/297/>
> indicates that the object "plane { <A, B, C>, D }" represent the plane
> defined by : A*x + B*y + C*z  D*sqrt(A^2 + B^2 + C^2) = 0
>
> ... I must be dumb but I can't make the link with my plan equation.
>
>
> A little help ?
I would prefer to rewrite this equation:
A*x + B*y + C*z  D*sqrt(A^2 + B^2 + C^2) = 0
 like this:
A*X + B*Y + C*Z = D*sqrt(A^2 + B^2 + C^2)
If we let L = sqrt(A^2 + B^2 + C^2)
 and we then divide by L on both sides, we get this equation:
A/L*X + B/L*Y + C/L*Z = D
The left side of the equation equals the dot product between
two vectors; vN and vP, where vN = <A/L, B/L, C/L> and
vP = <X, Y, Z>. I.e.:
vdot(vN, vP) = D
Since L = vlength(<A, B, C>), vN is a normalized vector;
vN = <A, B, C>/L = vnormalize(<A, B, C>)
Now if vN is the normalized normal vector to a plane  and if
vP is the position vector to any point in that plane, then the
plane is defined by all points in 3D space, where the dot
product between these two vectors equals the distance; D from
the origin to the plane in the direction of the plane's normal
vector.

Tor Olav
http://subcube.com
https://github.com/tok
Post a reply to this message

