POV-Ray : Newsgroups : povray.binaries.images : ExplainationPlease...?? Server Time
18 Oct 2026 01:08:04 EDT (-0400)
  ExplainationPlease...?? (Message 1 to 27 of 27)  
From: Ryan Mooney
Subject: ExplainationPlease...??
Date: 23 Jan 2002 17:04:51
Message: <3C4F336E.F05675C1@earthlink.net>
I am soooooooo confused by vector functions... Any one have any good
recourses for learning about these elusive features... vrotate,
vnormalize, vaxis_rotate ',

If this is out of place forgive and redirect me please... =]
here is a pic to hold my place in bin img... =]


Post a reply to this message


Attachments:
Download 'vectortest.jpg' (31 KB)

Preview of image 'vectortest.jpg'
vectortest.jpg


 

From: Hugo
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 02:53:44
Message: <3c4fbd88$1@news.povray.org>
Are you joking?

Well.. Fortunately I don't have problems with vnormalize and vaxis_rotate,
but with other vector operations.. I'm just too afraid to ask..

Hugo


Post a reply to this message

From: Juergen Scharfy
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 04:14:04
Message: <3c4fd05c@news.povray.org>
If I can help let me know.
What about collecting your questions?
Then I (or anyone else) can and post a document answering all these
questions (as far as I am able to). Possibly in an other group (e.g.
newuser)?


Post a reply to this message

From: Lawrence Winstead
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 10:58:38
Message: <3C502F2C.4B02C7D9@duratechindustries.net>
I think he did ask the questions.  He wants to know what the
aforementioned functions do and how to control them.

Juergen Scharfy wrote:

> If I can help let me know.
> What about collecting your questions?
> Then I (or anyone else) can and post a document answering all these
> questions (as far as I am able to). Possibly in an other group (e.g.
> newuser)?


Post a reply to this message

From: Juergen Scharfy
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 11:07:42
Message: <3c50314e@news.povray.org>
> I think he did ask the questions.  He wants to know what the
> aforementioned functions do and how to control them.

Yep. But maybe he wants to know more than just the few functions implemented
POVRay. Maybe some more on vector algebra?
I think it is more important to understand the vector algebra first before
looking at the implementation.

But anyway, the functions are at least a base for a discussion. Let's see if
I can write a short AND understandable explanation..... but for now I have
to do something else. It's on the list ;-)


Post a reply to this message

From: Hugo
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 12:17:51
Message: <3c5041bf$1@news.povray.org>
> Yep. But maybe he wants to know more than just the few functions
implemented
> POVRay. Maybe some more on vector algebra?
> I think it is more important to understand the vector algebra first before
> looking at the implementation.
>
> But anyway, the functions are at least a base for a discussion. Let's see
if
> I can write a short AND understandable explanation

Could you please tell about vector cross & dot products too, then?  :o)
I've read the Pov docs, and 2 webpages explaining their use in Pov, and I've
searched on math pages, but still don't understand.. I don't have a higher
mathematical education and until recently I didn't know how important the
origin <0,0,0> is regarding to vector functions.. Now I do know that
everything involves origin, but I still can't SEE in my mind the picture of
cross & dots.. The examples in Pov with 3 cylinders pointing in each their
way, doesn't help.. I tried animating them too but..

You could argue that I should take a further education, but I don't have
time for this (I have work, and would have to change my life drastically)
and I'd prefer to learn in my sparetime.. Any clear and throughfull
explanation in simple english will be appriciated!  :o)  When you have
time..


Regards,
Hugo


Post a reply to this message

From: Bill DeWitt
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 12:25:23
Message: <3c504383$1@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote :
>
> Could you please tell about vector cross & dot products too, then?  :o)

    I finally got what dot products were about a year ago. I don't know how
ignorant of them you are, but I had no clue. Here's what I finally figured
out.

    If you have a vector #declare v = <1,2,3>;
    Then v.x = 1, v.y = 2, v.z = 3.

    That was enough for me to move on with, but I'm still not sure what all
that cross stuff is about.

    HTH


Post a reply to this message

From: Fernando González del Cueto
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 12:58:15
Message: <3c504b37@news.povray.org>
> Could you please tell about vector cross & dot products too, then?  :o)

The dot product is an scalar binary vector space inner product operator.
Don't get scared, that only means that it is a function that takes TWO
VECTORS and gives a NUMBER as a result.

The dot product is very important because it lets you find the angle between
two vectors, see if they are orthogonal (perpendicular), etc.
It is also very important because it lets you project a vector into a
plane... something like finding the "shadow" of a vector in a plane. It lets
you do many things!

If we have two 3d vectors: A=(a1,a2,a3), B=(b1,b2,b3), you can compute it's
dot product in two alternative but equivalent ways:

1) A dot B = a1*b1 + a2*b2 + a3*b3
2) A dot B = |A|*|B|*cos(theta)

where theta is the angle (in radians!) between A and B. And |A| is the
euclidean norm (length) of A defined by

|A|=sqrt(a1^2 + a2^2 + a3^2)

So, if A and B are orthogonal (perpendicular), then cos(theta)=0 and then
the dot product is equal to zero.

Now, the cross product, is a function that takes TWO VECTORS and gives a
VECTOR as a result. The most important characteristic from the cross product
is that the resulting vector is orthogonal to the other two original
vectors. And that's very useful for finding normal vectors, and other
things.

The computation is more cumbersome (although there is a trick to memorize it
using a determinant, but I won't state it):

if A cross B = C = [c1,c2,c3] then

c1 = a2*b3 - a3*b2
c2 = a3*b1 - a1*b3
c3 = a1*b2 - a2*b1

As you can prove easily, the resulting vector C is orthogonal to A and B
(using dot product and a little of algebra)

Well, I hope I made myself clear and help you out of this,

Fernando.


Post a reply to this message

From: Mike Williams
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 13:46:19
Message: <r+A9ABAaXFU8EweF@econym.demon.co.uk>
Wasn't it Bill DeWitt who wrote:
>
>"Hugo" <hua### [at] post3teledk> wrote :
>>
>> Could you please tell about vector cross & dot products too, then?  :o)
>
>    I finally got what dot products were about a year ago. I don't know how
>ignorant of them you are, but I had no clue. Here's what I finally figured
>out.
>
>    If you have a vector #declare v = <1,2,3>;
>    Then v.x = 1, v.y = 2, v.z = 3.

I guess that's a joke, but just in case your serious, the POV dot
operator (which is what you have there) is a completely different thing
from the vector dot product (which you can calculate with the "vdot()"
vector function).

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Ryan Mooney
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 13:59:27
Message: <3C50598E.2F85ED4F@earthlink.net>
This is basically what i am looking for... Thank you... =]
I'm glad that someone mentioned the rest of the functions for i am only just
beginning to understand the vrotate and they are all equally as confusing as
the next...

Fernando González del Cueto wrote:

> > Could you please tell about vector cross & dot products too, then?  :o)
>
> The dot product is an scalar binary vector space inner product operator.
> Don't get scared, that only means that it is a function that takes TWO
> VECTORS and gives a NUMBER as a result.
>
> The dot product is very important because it lets you find the angle between
> two vectors, see if they are orthogonal (perpendicular), etc.
> It is also very important because it lets you project a vector into a
> plane... something like finding the "shadow" of a vector in a plane. It lets
> you do many things!
>
> If we have two 3d vectors: A=(a1,a2,a3), B=(b1,b2,b3), you can compute it's
> dot product in two alternative but equivalent ways:
>
> 1) A dot B = a1*b1 + a2*b2 + a3*b3
> 2) A dot B = |A|*|B|*cos(theta)
>
> where theta is the angle (in radians!) between A and B. And |A| is the
> euclidean norm (length) of A defined by
>
> |A|=sqrt(a1^2 + a2^2 + a3^2)
>
> So, if A and B are orthogonal (perpendicular), then cos(theta)=0 and then
> the dot product is equal to zero.
>
> Now, the cross product, is a function that takes TWO VECTORS and gives a
> VECTOR as a result. The most important characteristic from the cross product
> is that the resulting vector is orthogonal to the other two original
> vectors. And that's very useful for finding normal vectors, and other
> things.
>
> The computation is more cumbersome (although there is a trick to memorize it
> using a determinant, but I won't state it):
>
> if A cross B = C = [c1,c2,c3] then
>
> c1 = a2*b3 - a3*b2
> c2 = a3*b1 - a1*b3
> c3 = a1*b2 - a2*b1
>
> As you can prove easily, the resulting vector C is orthogonal to A and B
> (using dot product and a little of algebra)
>
> Well, I hope I made myself clear and help you out of this,
>
> Fernando.


Post a reply to this message

From: Ryan Mooney
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 14:03:21
Message: <3C505A77.AFC01BA5@earthlink.net>
I would not seeing all if any links you have of all the info you found of any
use...
especially the two tutorial pages and the use of pov with vector,dot,cross...
Or anything else mathematically confusing to me right now... =]

Hugo wrote:

> > Yep. But maybe he wants to know more than just the few functions
> implemented
> > POVRay. Maybe some more on vector algebra?
> > I think it is more important to understand the vector algebra first before
> > looking at the implementation.
> >
> > But anyway, the functions are at least a base for a discussion. Let's see
> if
> > I can write a short AND understandable explanation
>
> Could you please tell about vector cross & dot products too, then?  :o)
> I've read the Pov docs, and 2 webpages explaining their use in Pov, and I've
> searched on math pages, but still don't understand.. I don't have a higher
> mathematical education and until recently I didn't know how important the
> origin <0,0,0> is regarding to vector functions.. Now I do know that
> everything involves origin, but I still can't SEE in my mind the picture of
> cross & dots.. The examples in Pov with 3 cylinders pointing in each their
> way, doesn't help.. I tried animating them too but..
>
> You could argue that I should take a further education, but I don't have
> time for this (I have work, and would have to change my life drastically)
> and I'd prefer to learn in my sparetime.. Any clear and throughfull
> explanation in simple english will be appriciated!  :o)  When you have
> time..
>
> Regards,
> Hugo


Post a reply to this message

From: Fernando González del Cueto
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 14:20:02
Message: <3c505e62@news.povray.org>
"Ryan Mooney" <rdm### [at] earthlinknet> wrote in message
news:3C50598E.2F85ED4F@earthlink.net...
> This is basically what i am looking for... Thank you... =]
> I'm glad that someone mentioned the rest of the functions for i am only
just
> beginning to understand the vrotate and they are all equally as confusing
as
> the next...

I didn't know if I had made myself clear... I'm glad it was useful to you.

Good luck in your voyages inside R^3

Fernando.


Post a reply to this message

From: Bill DeWitt
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 14:36:37
Message: <3c506245$1@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote in message
news:r+A9A### [at] econymdemoncouk...
> Wasn't it Bill DeWitt who wrote:
> >
> >"Hugo" <hua### [at] post3teledk> wrote :
> >>
> >> Could you please tell about vector cross & dot products too, then?  :o)
> >
> >    I finally got what dot products were about a year ago. I don't know
how
> >ignorant of them you are, but I had no clue. Here's what I finally
figured
> >out.
> >
> >    If you have a vector #declare v = <1,2,3>;
> >    Then v.x = 1, v.y = 2, v.z = 3.
>
> I guess that's a joke, but just in case your serious, the POV dot
> operator (which is what you have there)

    No joke, unless you count my State supplied education in math. I did
mean dot operator, which is what stopped me from understanding most of the
vector stuff I wanted to know. What this shows is how much I used them
afterwards, that I didn't remember the term.

    Most of the people here cannot imagine how ignorant of math us non-math
types can be. Someone just posted an explanation of those terms that I was
completely unable to follow. It makes assumptions of knowledge that I just
don't have. I am sure it is clear to someone, but not me. I may never
understand vector math if I have to start at that level.

    I'll stick to arithmetic (at most) advice from now on.


Post a reply to this message

From:
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 15:07:10
Message: <3c50696e@news.povray.org>
Hi there,

The answer of Fernando is (of course) completely right. On the other hand I
want to try to give a less mathematical but more "visual" explanation.
Unfortunately I don't have the time right now to trace some pictures for
explanation (and additionally my english language isn't sufficient) but I
will give it a try.
If I start with a too low level, please read it over. I don't know where to
start with the explanation so I start at the very beginning, ok?

*) Vector
As you know, a vector is defined as a set of numbers. Depending on the
dimension we want to work these would be X and Y for two dimensions or X, Y
and Z for three. You may create vectors for any dimension but since we are
talking about POVRay let's start with three.
The notation <X,Y,Z> of a vector might be misleading since every time you
see a vector visualised it is drawn as an arrow. As we know, has as arrow a
starting node and en ending node. But we have only one set of coordinates
<X,Y,Z>!
So where is the other end?
The answer is easy. A vector starts at the origin of the coordinate system
which is <0,0,0> (mostly ;-) )

Now you might say that you have already seen some vectors in mathematical
graphs which did obviously NOT start from the origin. You are right and you
are not. These diagrams are a bit misleading since they skip some
information to be "cleaner". Any vector which does NOT start from the origin
is originally only a part of a vector transformation (e.g. two vectors in a
chain). (I will continue on that in the next section). Transformations on
vectors do some mathematical operations with their coordinates. These
formulas might be proven by mathematicians (is that spelled correctly?) or
other freaks. In this text I don't want to use any formula. Just imagine
that this set of functions is well defined like the algorithmic of "1+1=2".

*) Length
The length of a vector can easily be computed. In two dimensions this would
be the legendary formula of pythagoras. The same thing, but just one
coordinate more for three dimensions. Graphically it is simply the length of
our arrow, measured ALONG the vector (not projected).

*) Translation
One of the easiest transformations is the translation. Translating a vector
has nothing to do with language ;-) but is just shifting the coordinates.
That means, that each coordinate of the end point of the vector gets some
number added or subtracted (remember: the starting point stays in the
origin). If we add or subtract two vectors we just add/subtract their
coordinates (X to X, Y to Y and  Z to Z).
Now you might ask: "If I translate a vertical cylinder by <1,0,0> it moves
to the right but is still vertical. How can that be if the starting point
stays in the origin?"
The answer is: The cylinder isn't the vector itself. Imagine the cylinder as
a set of <end nodes> of many, many vectors. From all these vectors you see
just the tip. And translating the cylinder is in fact translating ALL these
vectors. So all the vectors move in the same way. No wonder that they
preserve their shape!
So whenever you see a vector NOT starting in the origin it is due to
following reason:

The vector is graphically moved for better clearance. These vectors still
start at the origin but they got graphically moved to show their relation to
other vectors. Most times it would be very confusing if all vectors are
drawn from the origin. You would get a big bundle of arrows, all starting at
the same point, pointing into various directions. It is much easier do draw
if we move the vector's graph to a place where it's relationship is more
obvious. (e.g. to show a vector added to another. This situation is often
shown as a triangle (the two vectors to be added and a third one showing the
result), although ALL vectors should start at 0/0/0).

*) Multiplication
If we multiply a vector with a number (a so-called scalar) we just multiply
all coordinates with this number. This results in a longer vector which
still has the same "orientation" within our three dimensions. Graphically
spoken it just gets longer but doesn't "move".

*) Rotation
Rotation isn't really complicated but hard to explain without any picture.
One word to the rotation in POV. Whenever you rotate an object in POV you
have to give a rotation vector. This might be misleading since it is a
shortcut for three rotations in sequence! If you rotate an object by
<10,20,30> then POV rotates the object first 10 degrees around the X axis,
then 20 around Y and finally 30 around Z. This rotation is always done
around an axis.
To imagine rotation you best use a triangle. You remember these triangles
you used/use in school? Take the long base as an axis. Take the left hand
side as the vector (starting in the lower left corder of the triangle which
is our origin). Rotate the triangle around it's base (hold the left and
right edges with your fingers) to see how you vector rotates in space.
Always keep in mind that these rotations (except some special functions in
POV) rotate around an AXIS (either X, Y or Z). So if your vector has some
abitrary angle to the axis the movement might get complex.
A small example: Imaging a man we modelled in POV. This man stands still in
the origin (of the standard POV coordinate system) and we are behind him
(like at <0,0,-3> or so) Now we rotate him about <90,90,90>. This gets fun!

1) rotation around X would clap the man onto his face since the X coordinate
is the one running from left to right. If we turn this by +90 degrees the
man falls straight forward onto his nose.
2) rotation around Y rotates the man like an helicopter to the "right".
After 90 degrees he lies in front of us (still on his nose), feet to the
left, head to the right.
3) finally, rotation around Z by 90 degrees brings our poor man again into
the upright position but facing to the right. It would have beed easier if
he just would have turned around to the right! (like rotating by <0,90,0>)

*) Vector products
As you may have already encountered there are at least two vector products.
The cross product and the dot product.

.) Cross product
Beside the mathematical definition of Fernando I will try to give a
graphical explanation so that you get a picture in your mind.
Imagine two vectors in the X/Z plane of POVRay. These vectors would "lie
flat on the floor". Since both start in the origin they share their starting
points. These two vectors "span up" a plane (not an infinite plane like the
POV primitive). Just imagine a sheet of paper lying flat on your desktop.
Imagine the lower, left corner is the origin and the lower horizontal and
left vertical edge are your vectors. This is like these vectors form a flat
area (depending on the angle between these vectors your area is more or less
rectangular).
Ok. But what is the cross product?
The cross product is a vector standing perpendicular onto these two vectors
(or in other words perpendicular onto the sheet of paper). There are only
two possible ways a vector can be perpendicular on BOTH vectors. Spoken in
words of our sheet of paper this would mean straight upward (coming out of
your desktop towards the ceiling) and downwards (going through the desktop
downwards to the floor). This would be the direction of the resultant
cross-vector product. It's length would be as long as the CONTENT of the
area defined by the two starting vectors. Again, remember your sheet of
paper. It's size is about (29cm to 31cm or so for A4). So if our starting
vectors are of length 29cm and 31cm and have an angle of 90degrees between
them (as it is given for our paper) then the resultant vector (yes the
result of the cross product is a vector) would have a length of 29*31 = 899
(damn, now I DID use a formula). Note that if the angle is not 90 degrees
these visualisation is still valid, just the content is the one of a
parallelogram.
What about its direction? ("up" or "down"). Well, this is defined by the
order of the arguments. If vector1 cross vector2 results in an upright
vector, the reverse thing vector2 cross vector1 results in a downward
directed vector. (Mathematically spoken: the angle between the first and the
second vector must be "in mathematical counting direction" (which is
counterclockwise, right, up, left) to result in an upright vector). Please
note that "up" and "down" depends on the rotation of the whole thing. This
example is spoken for vectors in the X/Z plane of POVRay. You may rotate
this "picture" in any way but the cross product is always perpendicular to
the two vectors.

.) Dot product
The dot product (also called scalar product) is not so easy to explain in a
graphical way, but it is not impossible. It also starts with two "input"
vectors, similar to the cross product example.
The main advantage of the dot product is that it includes the ANGLE between
our two starting vectors. The result of the dot product is a number (a
scalar, thus the name). This number can be seen as the length of a vector
whose direction is something we don't really care (for now!). This sounds
useless since the purpose of using a vector IS having it's direction. But I
will come to this lateron.
Mathematically spoken we get the dot product if we do the following:
1) get the length of our first vector
2) get the length of our second vector
3) multiply those lengths
4) get the angle between the vectors
5) compute the COSINE of this angle
6) multiply the cosine with the result of the length multiplication

This is not really easy, so for what do we need this?
The trick is that on vector-basis this computation is VERY easy to do!
Spoken in vectors we just multiply the coordinates. X*X, Y*Y, Z*Z and voilá
we have the dot product. That's easier than step1 to 6 isn't it?
The BIG advantage is that we know that in the result there is somewhere the
ANGLE between our vectors. So whenever we need the angle between two vectors
(since all vectors start at the origin we always have an angle) we can
easily compute the dot product and divide it by the lengths of our vectors.
The result is then the cosine of the angle.
Another very useful thing is projection. Imagine a light source illuminates
out vectors. The light source is placed so that it is perpendicular to one
of our vectors. So all light-rays fall with an angle of 90 degrees straight
forward onto our vector. Now the other vector comes into the scene and it's
shadow drops exactly onto the illuminated vector. This is called a
projection. The vector causing the shadow is PROJECTED ONTO the other
vector. By using the dot product (since it already takes the angle into
count) we can easily figure out the LENGTH of the SHADOW. Since we know that
the shadow is ON the illuminated vector we also know the direction of the
shadow.

That's it!
I hope you can understand my english and this text helps a bit in vector
algebra.
Let's see if this kicks off a discussion ;-)

best regards
Jürgen


Post a reply to this message

From: Fernando González del Cueto
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 15:24:30
Message: <3c506d7e@news.povray.org>
"Bill DeWitt" <bde### [at] cflrrcom> wrote in message
news:3c506245$1@news.povray.org...

>     No joke, unless you count my State supplied education in math. I did
> mean dot operator, which is what stopped me from understanding most of the
> vector stuff I wanted to know. What this shows is how much I used them
> afterwards, that I didn't remember the term.
>
>     Most of the people here cannot imagine how ignorant of math us
non-math
> types can be. Someone just posted an explanation of those terms that I was
> completely unable to follow. It makes assumptions of knowledge that I just
> don't have. I am sure it is clear to someone, but not me. I may never
> understand vector math if I have to start at that level.
>
>     I'll stick to arithmetic (at most) advice from now on.

Well, everybody begins at zero. Remember how akward it was to substract when
you only knew addition. Right now I'm struggling to understand some
differential equations in order to simulate cloth movement, which may be
very easy for other people.

How old are you?

I suggest you to take small steps and do not try to learn advanced things if
you don't know the fundamentals. Remember everything in math is very
"chained" and you can't understand higher levels if you haven't understood
the lower levels.

I find that going through this staircase, one step at a time, is very
amusing and interesting. Trying to skip some steps can lead you to a sad
frustration.

There are very good books in which you can teach yourself this things. I
suppose there must be also very good information in the web. Jürgen has just
written an excellent and very detailed explanation of vectors. You should
try to read it!

Good luck,

Fernando.


Post a reply to this message

From: Josh English
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 16:09:07
Message: <3C5077D2.F6A404C2@spiritone.com>
I've got a few tutorials at http://www.spiritone.com/~english/cyclopedia

there is one on vaxis_rotate, vrotate, vnormalize, and vcross (These
should help and will be updated soon with more material)

Josh English
eng### [at] spiritonecom
http://www.spiritone.com/~english


Post a reply to this message

From: Jamie Davison
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 16:50:14
Message: <MPG.16ba7830dff95f1e989ab4@news.povray.org>
>     Most of the people here cannot imagine how ignorant of math us non-math
> types can be.

Guilty.  I can do trig, and I can do some basic 3d geometry, but 
calculus, matrices and more advanced vector mathematics goes straight 
over my head.

Hell, I was trained as a biologist, so the most mathematics I ever needed 
was some slightly more advanced statistical analysis, all of which I have 
long since forgotten.

Bye for now,
     Jamie.
(from a new install on his machine - long story, but at least it seems to 
be working with no data lost)


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 16:52:09
Message: <3C508140.F474238B@hotmail.com>
Mike Williams wrote:
> 
> Wasn't it Bill DeWitt who wrote:
> >
> >"Hugo" <hua### [at] post3teledk> wrote :
> >>
> >> Could you please tell about vector cross & dot products too, then?  :o)
> >
> >    I finally got what dot products were about a year ago. I don't know how
> >ignorant of them you are, but I had no clue. Here's what I finally figured
> >out.
> >
> >    If you have a vector #declare v = <1,2,3>;
> >    Then v.x = 1, v.y = 2, v.z = 3.
> 
> I guess that's a joke, but just in case your serious, the POV dot
> operator (which is what you have there) is a completely different thing
> from the vector dot product (which you can calculate with the "vdot()"
> vector function).

Well, it's not a completely different thing...  ;)

v.x does give exactly the same result as vdot(v, x) does


Tor Olav


Post a reply to this message

From: Jim Charter
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 16:58:15
Message: <3C5085EF.13025F6E@aol.com>
I seek solice in a quote I seem to remember being attributed to Van Nuemann (sp?
the guy who was in on the very first computers and the a-bomb )
The sense of it was roughly: "You don't so much come to understand mathematics ,
rather, you just sort of get used to it"

PS.  When I laid this sage nugget on my son, then twelve, he simply responded, "
I don't what to learn math and I don't want to get used to it either!"


>
>
>     Most of the people here cannot imagine how ignorant of math us non-math
> types can be. Someone just posted an explanation of those terms that I was
> completely unable to follow. It makes assumptions of knowledge that I just
> don't have. I am sure it is clear to someone, but not me. I may never
> understand vector math if I have to start at that level.
>
>


Post a reply to this message

From: Bill DeWitt
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 17:04:34
Message: <3c5084f2$1@news.povray.org>
"Fernando González del Cueto" <fcu### [at] yahoocom> wrote :
>
> How old are you?

    Much too old to go back and start over. I would try if I didn't have so
much to do in other areas.

> Jürgen has just
> written an excellent and very detailed explanation of vectors. You should
> try to read it!

    I saw that and saved it, but don't have much confidence that my ability
to understand higher math will improve even if I can make my way through it.
I have been struggling with remedial geometry for years now and have made
more progress with learning Chinese than with that...


Post a reply to this message

From: Bill DeWitt
Subject: Re: ExplainationPlease...??
Date: 24 Jan 2002 17:04:55
Message: <3c508507$1@news.povray.org>
"Jamie Davison" <jam### [at] ntlworldcom> wrote in message
news:MPG.16ba7830dff95f1e989ab4@news.povray.org...
> >     Most of the people here cannot imagine how ignorant of math us
non-math
> > types can be.
>
> Hell, I was trained as a biologist,

    Same here. Beyond a little "plug in the numbers" algebra, I never really
needed math until Povray. I doubt that I ever will beyond my hobbies.

    But my real math problem started in grade school. I remember being left
behind during quadratic equations and telling my teacher that I didn't
understand. That was 7th grade and my math scores never got above a 'd'
after that. I had been getting all 'a's in every subject before that.


Post a reply to this message

From: Hugo
Subject: Re: ExplainationPlease...??
Date: 25 Jan 2002 09:01:16
Message: <3c51652c@news.povray.org>
Hi,

I very much value your explanations, Fernando and Jürgen! As you know I was
the one looking for cross and dot products.. Fernando gave a short
description.. I liked how you start by pointing out the VECTOR input and
VECTOR / NUMBER output of each function.. A good start.. You also tell about
the usefullness of the functions, which increase our attention.

Regarding the dot product, I had to skip the sentence "the shadow of a
vector in a plane".. It's still nonsense to me, but alright..You go on to
formulas, with the most simple being at first: A dot B = a1*b1 + a2*b2 +
a3*b3  Thank you!  This leaves no confusion in my mind, except that I can't
visualize how the result relates to the original vectors A and B.. I just
see multiplication and addition going on (things I know of).. You proceed
with calculating a dot product by using other formulas, involving radians,
theta, sqrt and exponentation.. This mostly goes beyond me, I still can't
see the "result".. You end the lesson with a good sentence, saying "if A and
B are orthogonal (perpendicular), then cos(theta)=0 and then the dot product
is equal to zero".. Very good.. This brings back a feeling of sense, order
and logic in my mind about the whole thing.. Order, because it seems there's
a formula behind this, that I WILL be able to undestand someday.. All in
all, I wasn't left in the land of strangers, thank you.  :o)

I just need some visualization to put things in place.. Jürgen, thank you
for your long explanation! I like that you began with simple things like
translation.. It's good to begin with something most people already knows
and understand, because it kind of makes us relax.. We're travelling with
you in the same train, whatever ... on the same level.. Then you came to
explaining dot and cross products:

I admit the landscape changed from familiar to unknown territory.. So it's
necessary for me to slow down, to follow.. Fortuntately I have your lesson
on text so I can read it as many times as I like.. :o)  I like how you
sticked to 2 dimensions on a piece of paper.. You tell that cross products
face either upwards or downwards, depending if the calculation is done
clockwise or counter-clockwise (something all the clever people talk about
when they compute smooth_triangles).. What I don't really understand,
however, is how a cross product can be perpendicular to TWO vectors, and how
this can bring different results - in 2 dimensions.. If both vectors lie
flat, because they are on a piece of paper, it's possible to put a third
vector *everywhere* on the paper, being perpendicular to them.. hhmmm..
Again, what is the visual ... purpose of cross products.

Anyway you used plain english, and I really appriciate your efforts!
Obviously you have done efforts, and english is not your native language (or
mine).. I will read your description again and try to get a picture in my
head.. Maybe it's possible to make a simple illustration of a cross product,
not in 3 dimensions with 3 cylinders with each their color and direction,
it's nonsense..  :o)  I still haven't found a place on the net, where a good
illustration is found.. For example, a problem on paper that leads everyone
to think the solution is obvious, "just do this!" but then, they can't find
a mathematical way of doing it, until  cross products suddenly are the magic
stick.

Annnnd, thanks for reading my long explanation of how I felt, being in your
class room.. :o)  Don't take me wrong please.. I enjoyed it, and I'll come
back.

Regards,
Hugo


Post a reply to this message

From:
Subject: Re: ExplainationPlease...??
Date: 25 Jan 2002 12:18:07
Message: <3c51934f@news.povray.org>
Hi Hugo,

> I very much value your explanations, Fernando and Jürgen! As you know I
was

You are welcome!

> however, is how a cross product can be perpendicular to TWO vectors, and
how
> this can bring different results - in 2 dimensions.. If both vectors lie
> flat, because they are on a piece of paper, it's possible to put a third

I see your problem. The example I used for the cross product uses two
vectors within a flat plane as input. That's right. But the resulting vector
( which is the cross product) extents into the -third- dimension. Although
the input vectors lie flat on the floor, the result vector goes either up or
down. This is the only way to be perpendicular on both input vectors. No
other chance (except the input vectors are parallel or antiparallel [simply
spoken both lie along a straight line]).

> vector *everywhere* on the paper, being perpendicular to them.. hhmmm..

No you can't. Remember my very first line: vectors start always in the
origin. So all THREE vectors (input and result) share one common point: the
origin. Now you know where your vector has to start from. Try to find a
place for it's tip so that the whole thing is perpendicular to both vectors
(which form a "V" for example). The only way is up or down. Draw a big V
onto your sheet of paper (which symbolise two vectors starting at the
origin) and put your pencil onto the basepoint of the V. The pencil stays
with its lower end at this point. Move the tip of it to find a situation so
that the pencil is perpendicular to both vectors.
I think this makes it clear:
Since both vectors lie in one plane (your sheet of paper), the result vector
can only be perpendicular to both vectors at the same time if it is
perpendicular to exactly this PLANE. So the cross product will always be
perpendicular to your sheet. Regardless in which directions you rotate or
move it. The pencil rotates and moves as well and stays perpendicular to the
paper.

> Again, what is the visual ... purpose of cross products.

It's advantage is that you can define a plane by using two vectors and get
easily a normal vector onto it. This is very important to compute the angle
of an incoming light ray hitting our plane (as used for reflection) for
example. It depends on the problem you want so solve mathematically but
believe me there are a lot of situations where a vector which is standing
normal to a plane is very helpful. It's usage in computer graphics might be
to determine if you "see" the front side or the flip side of a flat piece of
the surface (e.g. on triangle of a mesh). This could be solved by using the
cross product since it direction relative to the plane is well defined and
you don't have to care about the individual input vectors.
Additionally you know the content of the area defined by the input vectors
by just measuring the cross product vector's length.

> head.. Maybe it's possible to make a simple illustration of a cross
product,
> not in 3 dimensions with 3 cylinders with each their color and direction,

I think a three dimensional model is the only way to get the cross product
right. I don't know if a cross product is even defined for two-dimensional
vectors. I don't think so. Some operations just need explicit prerequisites.
You can't explain addition or subtraction by just using one number....
An animation would be the best but I'm afraid I haven't time enough to make
a good movie. I have an idea but it takes it's time.
Anyway, if all failes I still can do that.

I'll try to describe it:
Imagine a big L. Take this L and rotate it's long axis. Watch the short
axis: it moves in a circle, creating a disk if rotated fast enough. The long
axis of this L would be a vector. The rotating short axis is the SUMMARY of
all possible vectors perpendicular to the it. (Remember all vectors start at
the origin therefore you can't move the connection point of the two axes).
Now imagine you replace the rotating axis by a disk. You get a thing similar
to a flat umbrella. This thing is our vector and a plane perpendicular to
it. ALL vectors perpendicular to our vector MUST lie within this plane,
within this two dimensions.
Create a second thing like this. This would be the second vector. Now you
got two umbrellas. Since all vectors start in the same point we have to
bring our vectors (together with their normal planes) together. Where should
they join? Exactly in the point where the vector hits the plane (since this
is the common point of the vector and all its normal vectors. Therefore it
must be the same point for the other vector!). Bring the umbrellas together
so that they share this point. What happens to the two planes? Correct, they
intersect. The intersection of two planes is a line. This line is the only
intersection of the normal vectors of BOTH input vectors. This intersection
is perpendicular to BOTH vectors since both normal planes share it. It is
our cross product!
Is this scenario more or less confusing? :o)

> to think the solution is obvious, "just do this!" but then, they can't
find
> a mathematical way of doing it, until  cross products suddenly are the
magic
> stick.

You can solve all these problems without using vectors as well. But doing it
without vectors results usually in a vast amount of sine, cosine, tanges and
their reverse relatives and hyperbolic cousins. Of course you would get the
same thing but the effort is very large, time consuming, easily misleading
and last but not least it takes tons of mathematical operations. Vectors are
just simpler and much nicer for that. All you need for (static) vectors is
basically what I described in my last post. As soon as you got used to the
dot and cross product nothing can stop you anymore ;-)

> class room.. :o)  Don't take me wrong please.. I enjoyed it, and I'll come
> back.

Great. As long as you have fun with it keep on asking!
Stupid questions don't exist. There are only stupid answers.

best regards
Jürgen


Post a reply to this message

From: Fernando González del Cueto
Subject: Re: ExplainationPlease...??
Date: 25 Jan 2002 12:26:51
Message: <3c51955b@news.povray.org>
Hi Hugo,

It is difficult to explain these kind of things without using drawings.
About the "shadow of the vector", it is not very important for you to
understand it right now, but let me see if I can give a clearer explanation:
If you have a 3d vector, (imagine an arrow in 3d space) and you have a light
from the top of room, it will cast a shadow of the arrow in the floor. That
shadow, is the projection of the vector in the floor plane. The dot product
allows you to find this projection.

About your doubt concerning the "visualization" of the dot product, I
remember I had the same feeling in my first course in linear algebra. We are
used to the natural interpretation of the usual product between to numbers,
but the dot product fails to have the same natural interpretation. If you
see the second formula for the dot product, |A|*|B|*cos(angle), you can see
that the dot product can be very useful because it contains the angle
between the two vectors. The first formula lets you calculate the dot
product between A and B very easily. Then, |A| and |B|, the norms of the
vectors (the lengths) can be calculated very easily too. Finally, you can
isolate the cosine of the angle, which can be very useful.

Maybe you can visualize the dot product as a "weighted" measure of the angle
between two vectors.

About your other question, in which you cannot see how can the cross product
can be perpendicular to the other two vectors, YOU'RE RIGHT! That is because
the cross product is defined only for 3d vectors.
You cannot have 3 vectors perpendicular to each other in 2D space, but you
can have them in 3D space.

I hope this helps you,

Fernando.


Post a reply to this message

From: Florian Pesth
Subject: Re: ExplainationPlease...??
Date: 25 Jan 2002 15:04:40
Message: <3c51ba58@news.povray.org>
> The computation is more cumbersome (although there is a trick to memorize
it
> using a determinant, but I won't state it):
Maybe there's a more easy (?) way to memorize the cross product. It's called
the "cyclic minus anticyclic" rule. The idea is, that you count forward
(cyclic) for the first term and backwards (anticyclic) for the "minus term".
So for the first component you count 1- "2" - "3" using "2" and "3" for the
indices of the vectors minus 1 - "3" - "2" (backwards). Same way for the
second 2 - "3" - "1" minus 2 - "1" - "3" and the third 3 - "1" - "2" minus
3 - "2" - "1".
So this is cyclic: 1 - 2 - 3 - 1 - 2 - 3 and this is anticyclic 3 - 2 - 1 -
3 - 2 - 1.
Hope that nobody's more confused (by my english?), then forget it ;)
Best regards,
Florian


Post a reply to this message

From: Hugo
Subject: Re: ExplainationPlease...??
Date: 26 Jan 2002 18:53:54
Message: <3c534192$1@news.povray.org>
Hi folks,

I think I finally understand cross products now!!  :o)   I'll need to
experiment a little more to see how it behaves, but I definitely got the
idea right. This is thanks to you, Jürgen and Fernando.

Jürgen Scharfly wrote:
> Is this scenario more or less confusing? :o)

Oh, a little, but the first part of your letter was very clear.. I
understand now!  I hope, this was also helpful to Ryan, Bill and some other
people here.

> An animation would be the best but I'm afraid I haven't time
> enough to make a good movie. I have an idea but it takes
> it's time. Anyway, if all failes I still can do that.

No no, I've taken enough of your time now.  :o)

Fernando wrote:
> Then, |A| and |B|, the norms of the
> vectors (the lengths) can be calculated

Does this mean, the word "norms" are not a shortage for "normal" but it
means "length"?  That's good to know.. I come across new words in math all
the time, and sometimes I just guess their meaning.. Thanks for explaining
dot products, I understand them better now, although not fully.

I couldn't find these kind of lessons elsewhere on the net.. I browsed many
math sites, but either they assume (1) you're already educated in these
things, (2) you are undergoing an education, or (3) they are for children..
It's probably the same with books, and I don't know what to look for.. I had
a "plain" education in math years ago, but not in english, and I have
forgotten much of it..

Thanks for your help.

Regards,
Hugo


Post a reply to this message

From: Ryan Mooney
Subject: Re: ExplainationPlease...??
Date: 26 Jan 2002 22:27:34
Message: <3C5373A6.20137878@earthlink.net>
that's what i was looking for... =]
thanks... i also got little tid bits on math and such... Thanks all... =]

Josh English wrote:

> I've got a few tutorials at http://www.spiritone.com/~english/cyclopedia
>
> there is one on vaxis_rotate, vrotate, vnormalize, and vcross (These
> should help and will be updated soon with more material)
>
> Josh English
> eng### [at] spiritonecom
> http://www.spiritone.com/~english


Post a reply to this message

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