A89: Re: 3D rotation of plots


[Prev][Next][Index][Thread]

A89: Re: 3D rotation of plots




It's kinda funny, cuz just today I asked my Physics teacher to explain this to me...

You have the z-axis rotation... all you need to do is change the first matrix around a little:

around x-axis:
[    1,    0,    0] [x] [x']
[    0, cosT, sinT]*[y]=[y']
[    0,-sinT, cosT] [z] [z']

around y-axis:
[ cosT,    0, sinT] [x] [x']
[    0,    1,    0]*[y]=[y']
[-sinT,    0, cosT] [z] [z']

around z-axis:
[ cosT, sinT,    0] [x] [x']
[-sinT, cosT,    0]*[y]=[y']
[    0,    0,    1] [z] [x']

      [x']
where [y'] is the new point, and T is the angle in degrees.
      [z']

Wouldn't it be easier to display it like this:

around x-axis:
x'=1*x + 0*y + 0*z
y'=0*x + cosT*y + sinT*z
z'=0*x + -sinT*y + cosT*z

around y-axis:
x'=cosT*x + 0*y + sinT*z
y'=0*x + 1*y + 0*z
z'=-sinT*x + 0*y + cosT*z

around z-axis:
x'=cosT*x + sinT*y + 0*z
y'=-sinT*x + cosT*y + 0*z
z'=0*x + 0*y + 1*z

This would be easier in asm, I think.  (I don't know if we can multiply matricies in asm or not...)

I just asked about this, as I am trying to write something 3D in M68k, and I would also like to know
how to plot a 3D point on the 89's 2D screen, if anyone can help.

-Miles Raymond      EML: m_rayman@bigfoot.com
ICQ: 13217756       IRC: Killer2        AIM: MRayMan
http://www.bigfoot.com/~m_rayman/

-----Original Message-----
From: TurboSoft@aol.com <TurboSoft@aol.com>
To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>; assembly-92@lists.ticalc.org
<assembly-92@lists.ticalc.org>
Date: Wednesday, January 13, 1999 2:58 PM
Subject: A89: 3D rotation of plots


>Nathan Mueller on this list told me that you can rotate a plot m degrees
>around the z axis by doing the following:
>| cos(m) sin(m) 0| |x|
>|-sin(m) cos(m) 0|*|y|
>|      0      0 1| |z|
>
>now, how do you rotate a plot around the x and y axes? Thanks!
>--TurboSoft
>
>Visit the TurboSoft Homepage:  The most current Basic programs created by
>TurboSoft for the 89.
><A HREF="http://members.aol.com/turbosoft/turbosoft.html">
>http://members.aol.com/turbosoft/turbosoft.html</A>


Follow-Ups: