POV-Ray : Newsgroups : povray.general : Plane passing through 3 points : Re: Plane passing through 3 points Server Time
25 May 2022 07:04:35 EDT (-0400)
  Re: Plane passing through 3 points  
From: Alain Martel
Date: 2 May 2022 10:39:22
Message: <626fed1a$1@news.povray.org>
Le 2022-05-01 à 16:41, Tor Olav Kristensen a écrit :
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>> 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)
> 
> Since this has the same effect as normalizing the normal vector,
> the statement "that is only true if the normal vector has unit length",
> in the documentation page that you linked to, seems false to me.
> 
> I.e.: The normal vector in the plane statement does not need to be
> normalized.
> 
> 
>> 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.
> 
> Hmmm.. not so precise. I try again:
> 
> Now if vN is the normalized normal vector to a plane - and if
> vP is a position vector to any point in 3D space, then the
> plane is defined by (or contains ?) all possible points vP
> whose the dot product with vN equals D; the distance from the
> origin to the plane in the direction of vN.
> 
> --
> Tor Olav
> http://subcube.com
> https://github.com/t-o-k
> 
> 
Thus, using POV SDL, that plane is defined as :
plane{vN, D}


Post a reply to this message

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.