home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3947 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: fizban.solace.mh.se!usenet
  2. From: Mr 'Zap' Andersson <zap@lysator.liu.se>
  3. Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.mac,comp.lang.pascal.ansi-iso,comp.lang.pascal.misc,comp.sys.amiga.programmer,comp.graphics.algorithms,comp.os.ms-windows.programmer.graphics,comp.sys.amiga.graphics
  4. Subject: Re: 3d programming
  5. Date: Thu, 15 Feb 1996 12:28:23 +0100
  6. Organization: GENIUS CAD Software (http://www.kuai.se/~zap/genius)
  7. Message-ID: <312318D7.3370@lysator.liu.se>
  8. References: <4f3od9$2jg@zeus.tcp.co.uk> <3118310E.52F@psu.edu> <4fiuh2$qrj@fulton.cs.unc.edu> <311E38D7.71BC@psu.edu> <4fptmh$qhg@tao.sans.vuw.ac.nz>
  9. NNTP-Posting-Host: @sl1.yin.kuai.se
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. Steve Piner wrote:
  16. > :> Sorry to quibble, but...
  17. > :>
  18. > :>    A VECTOR IS NOT A POINT!!!!
  19. > :>
  20. > :> Now back to our regular program.
  21. > :
  22. > :Points are vectors.
  23. > A vector is a direction with a magnitude.  A point is a direction and a
  24. > distance *from an origin*.  Vectors are not relative to anything else, points
  25. > are.
  26. > Although the two can be coded interchangeably they are not the same thing.
  27.  
  28. THIS is the interesting part: A point is 3 numbers, so is a vector. Sure, you can 
  29. set up your system to separate points and vectors if you want. But I often think 
  30. that is unnecessary.
  31.  
  32. What if you subtract two points? (C++). Do you get a point, or a vector?
  33.  
  34. The "real" answer is "a vector". But I've seen 3D libraries that religiously keep 
  35. vectors and points separate (making some creative constructs difficult, just for 
  36. the sake of semantical clarity), and yet others that use the same class/structure 
  37. for both, which, IMHO, is "easier", but can get you into difficult semantics.
  38.  
  39. It's a choice. You make it.
  40.  
  41. > Steve Piner
  42. > --
  43. >  ____ ____
  44. > / __//___ \  Steve Piner - spiner@sans.vuw.ac.nz
  45. > \__ \ |  _/
  46. > /___/ |_|    [This post is finished - stop reading now]
  47.  
  48. -- 
  49. Hakan "Zap" Andersson | http://www.lysator.liu.se/~zap | Q: 0x2b | ~0x2B
  50. Job:  GCS Scandinavia | Fax:   +46 16 96014            | A: 42
  51. zap@lysator.liu.se    | Voice: +46 16 96460            | "Whirled Peas"
  52. ------------------------------------------------------------------------
  53. GENIUS - Mechanical Design for AutoCAD - http://www.kuai.se/~zap/genius
  54. ------------------------------------------------------------------------
  55. Never underestimate the bandwidth of a speeding truck full of DAT tapes.
  56. ------------------------------------------------------------------------
  57.