POV-Ray : Newsgroups : povray.newusers : how to calculate.... Server Time
31 Jul 2024 06:24:21 EDT (-0400)
  how to calculate.... (Message 1 to 5 of 5)  
From: Robert
Subject: how to calculate....
Date: 6 Feb 2003 12:55:39
Message: <3e42a19b$1@news.povray.org>
the normal vector based on 3 vectors?

my skills are not very high at the moment but i think it is very simple....

I want to render a plane, that is clipped by a box.

The 3 vectors are:

v1=<12,15,73>
v2=<28,  4,68>
v3=<20,10,70>



#declare mui_plane=union{
                                         plane { < ?, ?, ?>, 0
                                         pigment { color rgb <0.7,0.0,0.0> }
                                        }
                                        }

 object {
    mui_plane
    clipped_by{box{<-1,-1,-1>,<1,1,1>}}
  }

Is there an easier way or how can I do this?

Help is very apprechiated.

Thanks in advance,

Robert


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: how to calculate....
Date: 6 Feb 2003 13:30:04
Message: <web.3e42a93cc6bd118bb417814a0@news.povray.org>
Robert wrote:
>the normal vector based on 3 vectors?
>
>my skills are not very high at the moment but i think it is very simple....
>
>I want to render a plane, that is clipped by a box.
>
>The 3 vectors are:
>
>v1=<12,15,73>
>v2=<28,  4,68>
>v3=<20,10,70>
>

>
>#declare mui_plane=union{
>                                         plane { < ?, ?, ?>, 0
>                                         pigment { color rgb <0.7,0.0,0.0> }
>                                        }
>                                        }
>
> object {
>    mui_plane
>    clipped_by{box{<-1,-1,-1>,<1,1,1>}}
>  }
>
>Is there an easier way or how can I do this?

If those 3 vectors represents the positions
of 3 points on the surface of your plane,
then a normal vector for that plane can be
calculated like this:

#declare vN = vcross(v2 - v1, v3 - v1);

Now the expression for your plane can be
written like this:

plane { vN, 0 translate v1 }

or like this:

plane { vN, vdot(v1, vnormalize(vN)) }

But if v1, v2 and v3 are not positions of 3
points on the surface, then you must give
more information about the problem.
I.e. what these 3 vectors represents.


Tor Olav


Post a reply to this message

From: Robert
Subject: Re: how to calculate....
Date: 6 Feb 2003 14:14:49
Message: <3e42b429@news.povray.org>

This works fine. Now i just have to (and want to) understand the
mathemathics behind this...

I found the following web page (in german):

http://wwwzb.zb.kfa-juelich.de/mathe/daten/kap_3/node281.htm

but was not able to translate to POVray.
kind regards,

Robert



"Tor Olav Kristensen" <tor### [at] hotmailcom> schrieb im Newsbeitrag
news:web.3e42a93cc6bd118bb417814a0@news.povray.org...

> If those 3 vectors represents the positions
> of 3 points on the surface of your plane,
> then a normal vector for that plane can be
> calculated like this:
>
> #declare vN = vcross(v2 - v1, v3 - v1);
>
> Now the expression for your plane can be
> written like this:
>
> plane { vN, 0 translate v1 }
>
> or like this:
>
> plane { vN, vdot(v1, vnormalize(vN)) }
>
> But if v1, v2 and v3 are not positions of 3
> points on the surface, then you must give
> more information about the problem.
> I.e. what these 3 vectors represents.
>
>
> Tor Olav
>
>


Post a reply to this message

From: Warp
Subject: Re: how to calculate....
Date: 6 Feb 2003 16:54:12
Message: <3e42d983@news.povray.org>
Robert <rgu### [at] exmailde> wrote:
> Now i just have to (and want to) understand the
> mathemathics behind this...

http://mathworld.wolfram.com/CrossProduct.html

-- 
#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: Robert
Subject: Re: how to calculate....
Date: 8 Feb 2003 04:58:29
Message: <3e44d4c5$1@news.povray.org>
Thanks!

"Warp" <war### [at] tagpovrayorg> schrieb im Newsbeitrag
news:3e42d983@news.povray.org...
> Robert <rgu### [at] exmailde> wrote:
> > Now i just have to (and want to) understand the
> > mathemathics behind this...
>
> http://mathworld.wolfram.com/CrossProduct.html
>
> --
> #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

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