🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #408

Re: 3d geometry... help please.

#408
From: Matthew Smith
Date: Tue, 04 Aug 1992 15:28
23 lines
1573 bytes
In article <l7lhdbINNkcc@aludra.usc.edu> mduffy@aludra.usc.edu (Michael Duffy) writes:
>Ok, boys and girls, children of all ages... here's something for you to ponder.
>
>I'm trying to figure out the FASTEST way to figure out the angle between two
>rays in space, given any three points (say (a,b,c), (d,e,f), and (g,h,i) with 
>(d,e,f) as the point where both rays originate).  It has been two many years
>since I took Trig or Geometry or whichever math would help me out here.  
>Pseudo code, equations, C, Pascal, or Assembly is appreciated.  T
>Thanks in advance for any information,
>Mike Duffy (mduffy@aludra.usc.edu)

The thing you need to figure out is which PLANE you want to take the angle in.
An angle of 90 degress in one plane, when looked at from the side, is an angle
of 0 degrees.  Then you just translate the common point to the origin, rotate
one of the vectors to an axes, then use standard geometry.

The 3-d translation/rotation matrices can be found in any book that talks about
3d-geometry.  I don't know them right off of the top of my head.


Matt Smith
msmith@peruvian.utah.edu
Student - University of Utah Department of Computer Science
Technical Details
Message-ID: <1992Aug4.092815.27743@hellgate.utah.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!peruvian.utah.edu!msmith
References: <l7lhdbINNkcc@aludra.usc.edu>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!peruvian.utah.edu!msmith
From: msmith%peruvian.utah.edu@cs.utah.edu (Matthew Smith)
Subject: Re: 3d geometry... help please.
Date: 4 Aug 92 09:28:14 MDT
Message-ID: <1992Aug4.092815.27743@hellgate.utah.edu>
Organization: University of Utah CS Dept
References: <l7lhdbINNkcc@aludra.usc.edu>
Lines: 23