home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / graphics / 8136 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.5 KB

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