POV-Ray : Newsgroups : povray.general : Plane going through three points Server Time
4 Nov 2024 17:30:13 EST (-0500)
  Plane going through three points (Message 1 to 6 of 6)  
From: Kaveh
Subject: Plane going through three points
Date: 20 Dec 2003 07:15:16
Message: <kaveh-1F879A.12151520122003@netplex.aussie.org>
How do I find a plane that passes through 3 points in space?

-- 
Kaveh


Post a reply to this message

From: Pascal
Subject: Re: Plane going through three points
Date: 20 Dec 2003 09:19:48
Message: <3fe45a84$1@news.povray.org>

news: kav### [at] netplexaussieorg...
> How do I find a plane that passes through 3 points in space?
>
> --
> Kaveh

In pov dialect:

#include "functions.inc"

#declare A=<2,0,0>;  // whatever
#declare B=<0,1,0>;  // whatever
#declare C=<0,4,5>;  // whatever

plane {
        vcross(B-A,C-A)
        vdot(A,vnormalize(vcross(B-A,C-A)))
        pigment{color rgb 1}
        finish{ ambient .5}
}

--
Pascal.


Post a reply to this message

From: Warp
Subject: Re: Plane going through three points
Date: 20 Dec 2003 09:59:49
Message: <3fe463e5@news.povray.org>
Pascal <net### [at] freesurffr> wrote:
> #include "functions.inc"

  Where was that needed?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Pascal
Subject: Re: Plane going through three points
Date: 20 Dec 2003 10:28:56
Message: <3fe46ab8@news.povray.org>

3fe463e5@news.povray.org...
> Pascal <net### [at] freesurffr> wrote:
> > #include "functions.inc"
>
>   Where was that needed?
>
My mistake. Hopefully the rest of the code is correct.

--
Pascal.


Post a reply to this message

From: Kaveh
Subject: Re: Plane going through three points
Date: 20 Dec 2003 11:20:43
Message: <kaveh-EEF0CA.16204220122003@netplex.aussie.org>
In article <3fe46ab8@news.povray.org>, "Pascal" <net### [at] freesurffr> 
wrote:


[...]

> My mistake. Hopefully the rest of the code is correct.

Sure does. Thanks a million, Pascal.

-- 
Kaveh


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Plane going through three points
Date: 20 Dec 2003 12:19:00
Message: <3fe48484@news.povray.org>
"Pascal" <net### [at] freesurffr> wrote in news:3fe45a84$1@news.povray.org:

...

> plane {
>         vcross(B-A,C-A)
>         vdot(A,vnormalize(vcross(B-A,C-A)))
...
> }



Or just:


plane {
  vcross(B - A, C - A), 0
  translate A
...
}


Tor Olav


Post a reply to this message

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