home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!mucs!lilleyc
- From: lilleyc@cs.man.ac.uk (Chris Lilley)
- Newsgroups: comp.graphics
- Subject: Re: Angle between two coordinate locations
- Message-ID: <5455@m1.cs.man.ac.uk>
- Date: 24 Jul 92 18:40:44 GMT
- References: <l6faduINN8f0@girtab.usc.edu> <stare.18.0@edstar.rl.af.mil> <1992Jul22.234146.5571@uniwa.uwa.edu.au>
- Sender: news@cs.man.ac.uk
- Reply-To: lilleyc@cs.man.ac.uk (Chris Lilley)
- Organization: Department of Computer Science, University of Manchester UK
- Lines: 31
-
- In article <1992Jul22.234146.5571@uniwa.uwa.edu.au> watson@maths.uwa.oz.au
- (David Watson) writes (and deletes the original attributions):
-
- >>>I have a problem where I need to obtain the angle between two points
- >>>on the screen. For instance:
-
- (piccy deleted)
-
- >>>I would expect the function to return the angle as being 135 degrees
- >>>( or should if my picture was accurate ) Any help would be greatly
-
- Edward M.Starczewski writes:
-
- >>I'm a little confused, How do you define an angle between two points
- >>without first defining the location of the vertex. Is the vertex just
- >>assumed to be the origin (0,0)?
-
- David:
-
- >I wondered about that too, but if it were (0,0) the angle returned
- >would be less than 135 degrees.
- >Give us a clue, Randi
-
- If the angle was between the x axis and the line point2...point1, that
- would give about 135 in the supplied diagram.
-
- That reduces to finding the equation of the line through point 1 and 2; the
- slope of the line is the angle requested in the original post.
-
-
- Chris
-