|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|