Article View: comp.lang.pascal.borland
Article #44Re: 3d programming
From: Mr 'Zap' Andersson
Date: Thu, 15 Feb 1996 11:28
Date: Thu, 15 Feb 1996 11:28
45 lines
2605 bytes
2605 bytes
Steve Piner wrote: > > :> Sorry to quibble, but... > :> > :> A VECTOR IS NOT A POINT!!!! > :> > :> Now back to our regular program. > : > :Points are vectors. > > A vector is a direction with a magnitude. A point is a direction and a > distance *from an origin*. Vectors are not relative to anything else, points > are. > > Although the two can be coded interchangeably they are not the same thing. THIS is the interesting part: A point is 3 numbers, so is a vector. Sure, you can set up your system to separate points and vectors if you want. But I often think that is unnecessary. What if you subtract two points? (C++). Do you get a point, or a vector? The "real" answer is "a vector". But I've seen 3D libraries that religiously keep vectors and points separate (making some creative constructs difficult, just for the sake of semantical clarity), and yet others that use the same class/structure for both, which, IMHO, is "easier", but can get you into difficult semantics. It's a choice. You make it. > Steve Piner > -- > ____ ____ > / __//___ \ Steve Piner - spiner@sans.vuw.ac.nz > \__ \ | _/ > /___/ |_| [This post is finished - stop reading now] -- Hakan "Zap" Andersson | http://www.lysator.liu.se/~zap | Q: 0x2b | ~0x2B Job: GCS Scandinavia | Fax: +46 16 96014 | A: 42 zap@lysator.liu.se | Voice: +46 16 96460 | "Whirled Peas" ------------------------------------------------------------------------ GENIUS - Mechanical Design for AutoCAD - http://www.kuai.se/~zap/genius ------------------------------------------------------------------------ Never underestimate the bandwidth of a speeding truck full of DAT tapes. ------------------------------------------------------------------------
Technical Details
Message-ID:
<312318D7.3370@lysator.liu.se>Path:
arc1-ca.pugleaf.net!fizban.solace.mh.se!usenetReferences:
<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>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fizban.solace.mh.se!usenet From: Mr 'Zap' Andersson <zap@lysator.liu.se> 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 Subject: Re: 3d programming Date: Thu, 15 Feb 1996 12:28:23 +0100 Organization: GENIUS CAD Software (http://www.kuai.se/~zap/genius) Message-ID: <312318D7.3370@lysator.liu.se> 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> NNTP-Posting-Host: @sl1.yin.kuai.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (WinNT; I)