Re: 3d translation

New Message Reply Date view Thread view Subject view Author view

Alejandro Saez (cano++at++krusty.engr.sgi.com)
Mon, 30 Jun 1997 20:13:18 -0400


On Jun 29, 5:51pm, <crakrjak++at++xerxesinc.com> wrote:
> Subject: 3d translation
> i hope this is not off topic but my math is very poor..
>
> i used
>
> shared->xpos += -100 * sin(shared->head) * cos(shared->pitch);
> shared->ypos += -100 * sin(shared->head) * cos(shared->pitch);
> shared->zpos += -100 * sin(shared->pitch) * sin(shared->head);
>
> to specify the position of 100 behind the position where im at to set xpos
> ypos and zpos. Is that right?
>
> thanks, mike
>
> ps: anybody has any good book to suggest on 3d maths?
>
>
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from <crakrjak++at++xerxesinc.com>

Mmmh, about the math I would have to check, (you don't really need it anyways,
read on), but about the book go fo the source of it all, Foley, Van Dam and ...
(I never remeber the third author). Other way to go about this is to forget
Euler angles and go for Quaternions, check Angus's pages on the Aqua demo for
an explanation, this is sometimes a much intuitive approach. I guess what you
are looking for is direction vectors, so you should ask yourself which axis is
forward (this differs in, say, OpenGl and Performer) and then look for its
corresponding direction vector in the transformation matrix. That vector will
be a unit vector pointing in the direction of the now transformed "forward"
axis.
In Paradigm's Vega that vector is the second row (Mat[1][0], Mat[1][1],
Mat[1][2]), but I can't remember if Vega also uses x -> -y as Performer.

-- 
------------------------------------------------------------------------
Alejandro Saez
Software Engineer
Silicon Chile S.A.
                                        Avda. Santa Maria 2560
E-mail: asaez++at++silicon.cl              	Providencia
Phone:  +56 (2) 203 3371 		        Santiago
Fax:    +56 (2) 203 3370                Chile
------------------------------------------------------------------------
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:37 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.