Chris Angelico wrote: > I'm not sure there's any distinction between a "point" and a "vector > from the origin to a point". They transform differently. For example, translation affects a point, but makes no difference to a vector. There are two ways of dealing with that. One is to use vectors to represent both and have two different operations, "transform point" and "transform vector". The other is to represent them using different types and have one operation that does different things depending on the type. The advantage of the latter is that you can't accidentally apply the wrong operation, e.g. transform_point on something that's actually a vector. (There's actually a third way -- use homogeneous coordinates and represent points as (x, y, z, 1) and vectors as (x, y, z, 0). But that's really a variation on the "different types" idea.) -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4