POV-Ray : Newsgroups : povray.general : Vector functions AAARRRRGGHH!!!!! Server Time
6 Nov 2024 00:29:22 EST (-0500)
  Vector functions AAARRRRGGHH!!!!! (Message 1 to 10 of 10)  
From: gonzo
Subject: Vector functions AAARRRRGGHH!!!!!
Date: 18 Dec 2002 17:10:05
Message: <web.3e00ef7bd58b93e5332079d0@news.povray.org>
I've been trying to write some macros that need to analyze vectors and
perform operations on them, but, having absolutely no math background
whatsoever, I am getting way lost in the function explanations in the docs.

Is there somewhere I can find explanations and/or examples of them that are
understandable by us regular folk?

Along the same lines, it's obvious that a little trig could go a long way in
POV. Can someone recommend a beginning book or reference on trigonometric
functions that can be handled by a non-mathmatical sub-genious? Something
that at least explains all the terms used in the docs?

RG - Dammit Jim, I'm an artist not a mathmetician!


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 18 Dec 2002 23:36:35
Message: <3e014cd3$1@news.povray.org>
gonzo wrote:
> Is there somewhere I can find explanations and/or examples of them that are
> understandable by us regular folk?

well, the vector functions I use a lot are as follows:

th = TAN-1(y / x)
  x = r * COS(th)
  y = r * SIN(th)
  r = SQRT(x^2 + y^2)
  y = x * TAN(th)
  y = COS-1(x / r)

sin(th) = y / r
cos(th) = x / r
tan(th) = y / x

th is the angle, r is the radius or magnitude, x and y are...x and y
the last 4 formulae I had to use for the scene I'm working on right now
(had to research some of 'em out 'cuz I didn't have them in my notes
before)
Hope this helps.

-- 
Tim Cook
http://empyrean.scifi-fantasy.com

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Jellby
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 08:59:36
Message: <3e01d0c7@news.povray.org>
gonzo wrote:

> Along the same lines, it's obvious that a little trig could go a long way
> in POV. Can someone recommend a beginning book or reference on
> trigonometric functions that can be handled by a non-mathmatical
> sub-genious? Something that at least explains all the terms used in the
> docs?
> 
> RG - Dammit Jim, I'm an artist not a mathmetician!

Well, I learnt trigonometry in the high school, where everyone had to learn 
it: artist as well as mathematicians ;)

You could start here:
http://aleph0.clarku.edu/~djoyce/java/trig/ (uses java)
or here:
http://www.colorado-research.com/~gourlay/trig-tutorial/

-- 

Linux User #289967 (counter.li.org)
PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: Shay
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 10:21:14
Message: <3e01e3ea@news.povray.org>
"gonzo" <rgo### [at] lansetcom> wrote in message
news:web.3e00ef7bd58b93e5332079d0@news.povray.org...
> I've been trying to write some macros that need to analyze vectors and
> perform operations on them, but, having absolutely no math background
> whatsoever, I am getting way lost in the function explanations in the
docs.
>

Perhaps the way to go here would be one at a time. If you post the function
with which you are having the most trouble, then someone can give you a less
overwhelming explanation. Try looking at the PoV code for the various vector
macros as well.

 -Shay


Post a reply to this message

From: gonzo
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 13:25:04
Message: <web.3e020de32a8640e6d843c24b0@news.povray.org>
Shay wrote:
>
>Perhaps the way to go here would be one at a time. If you post the function
>with which you are having the most trouble, then someone can give you a less
>overwhelming explanation. Try looking at the PoV code for the various vector
>macros as well.
>
> -Shay
>

Well, here's a good mouthful...
vcross(A,B) Cross product of A and B. Returns a vector that is the vector
cross product of the two vectors. The resulting vector is perpendicular to
the two original vectors and its length is equal to the area of the
parallelogram defined by them. Or to put in an other way, the cross product
can also be formulated as: AxB = |A| * |B| * sin(angle(A,B)) *
perpendicular_unit_vector(A,B) So the length of the resulting vector is
proportional to the sine of the angle between A and B.

1. what's a cross product?
2. what's a parallelogram?
3. AxB = |A| * |B| * sin(angle(A,B)) * perpendicular_unit_vector(A,B)????
4. what's a sine?
5. If a vector is just point in space, how can it have length & direction?


>Jellby wrote:
>Well, I learnt trigonometry in the high school, where everyone had to learn
> it: artist as well as mathematicians ;)
>
> You could start here:
> http://aleph0.clarku.edu/~djoyce/java/trig/ (uses java)

Thanks, this looks helpful.

RG - like I said, NO math backgound. When I went to high school, trig hadn't
been invented yet, and algebra was something they warned you about if you
*might* go on to college (and only then if you were a math or physics
major, computers hadn't been invented yet either).


Post a reply to this message

From: ABX
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 13:36:05
Message: <mv340vkqp3bcievj7j1d7f75b01ic978gi@4ax.com>
On Thu, 19 Dec 2002 13:20:19 EST, "gonzo" <rgo### [at] lansetcom> wrote:
> 1. what's a cross product?

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

> 2. what's a parallelogram?

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

> 3. AxB = |A| * |B| * sin(angle(A,B)) * perpendicular_unit_vector(A,B)????

I nearly thought you are asking about ABX. This nearly the same question ad
first.

> 4. what's a sine?

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

> 5. If a vector is just point in space, how can it have length & direction?

If you are in the center of space and you want move yourself to that
vector/point you have to move yourself about some _length_ in some _direction_

You can follow links in mathworld if you don't understand terms listed there.

ABX


Post a reply to this message

From: Jellby
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 14:24:34
Message: <3e021cf2@news.povray.org>
gonzo wrote:

> 5. If a vector is just point in space, how can it have length & direction?

Well, a vector is not just a point. You can think of vectors as of arrows, 
they have both length and direction. But if you know where the tail of the 
arrow is, then the head of the arrow gives you a point in space; when it's 
not specified otherwise, the tail is at the origin (the point <0,0,0>), so 
a vector is an arrow with length and direction, but it's a point too. And 
it can be used for quite a lot of things, sometimes with no meaning, it can 
be used, for example, to store 3 numbers (like in colour vectors), or to 
store a direction in space and a number (the lenght of the vector, which 
doesn't need to have a meaning related to the direction)

-- 

Linux User #289967 (counter.li.org)
PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: LibraryMan
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 14:35:50
Message: <3E021FAE.BCF9CA43@att.net>
gonzo wrote:
> 
> I've been trying to write some macros that need to analyze vectors and
> perform operations on them, but, having absolutely no math background
> whatsoever, I am getting way lost in the function explanations in the docs.
> 
> Is there somewhere I can find explanations and/or examples of them that are
> understandable by us regular folk?
> 
> Along the same lines, it's obvious that a little trig could go a long way in
> POV. Can someone recommend a beginning book or reference on trigonometric
> functions that can be handled by a non-mathmatical sub-genious? Something
> that at least explains all the terms used in the docs?
> 
> RG - Dammit Jim, I'm an artist not a mathmetician!


Sounds like you and I are in about the same place on the POV vs.
math-I-never-thought-I'd-use-so-I-didn't-pay-attention learning curve.  
Just try & tackle isosurfaces! <g>

--Library Man

P.S. and since I do call myself LibraryMan on this list, I'd be remiss
if I didn't
also recommend you go to your local library and see if they have intro.
trig & geom. books!


Post a reply to this message

From: gonzo
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 15:55:09
Message: <web.3e02304d2a8640e6d843c24b0@news.povray.org>
LibraryMan wrote:
>Sounds like you and I are in about the same place on the POV vs.
>math-I-never-thought-I'd-use-so-I-didn't-pay-attention learning curve.
>Just try & tackle isosurfaces! <g>

Heh heh, yeah I took a quick look at isosurfaces... the bruises are mostly
healed and my therapist says the twitch will be gone in another week or
so...


Jellby wrote:
>Well, a vector is not just a point. You can think of vectors as of arrows,
>they have both length and direction. But if you know where the tail of the
>arrow is, then the head of the arrow gives you a point in space; when it's
>not specified otherwise, the tail is at the origin (the point <0,0,0>), so
>a vector is an arrow with length and direction, but it's a point too.

Ah, thanks, that's a helpful visualization.


And thanks ABX, for the mathworld links.  A LOT of info there! Probably
mostly over my head at this point but I can see it as a site that will be
more useful over time.

RG - finagle's 1st law: the perversity of the universe tends towards the
maximum


Post a reply to this message

From: LibraryMan
Subject: Re: Vector functions AAARRRRGGHH!!!!!
Date: 19 Dec 2002 17:07:10
Message: <3E02430D.8D5AB375@att.net>
gonzo wrote:
> 
> 
> Heh heh, yeah I took a quick look at isosurfaces... the bruises are mostly
> healed and my therapist says the twitch will be gone in another week or
> so...
> 

lol!


Post a reply to this message

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