From: Andy Little (andy_at_[hidden])
Date: 2005-06-02 15:56:38
"Deane Yang" <deane_yang_at_[hidden]> wrote in message
> Andy Little wrote:
>> Ideally the two expressions should be equivalent:
>> 2/3 *A +1/3 * B == A + (1/3)*(B - A) = (2 * A + B ) / 3 etc
>> If no multiplication or addition is allowed on points, this is not the case.
>> (Welll.. its possible to work it at compile time, but I believe this is too
>> restrictive) The points implementation is getting in the way of the
>> expression. Expressions will fail for no good reason. OTOH These
>> calculations work correctly if A and B are 'position-vectors'.
> What is the difference between a "point" and a "position-vector"?
I'm sure no expert on this but FWIW this is my understandoing:
A position-vector is a work-around because it is not possible to have adequate
C++ control of operations on points (in affine space), as previously explained.
A position-vector is a just a vector, where one makes the assumption that all
vectors are added to the Point (0,0) and any result is added to the Point (0,0)
(I believe addtion of Point(0,0) to another point is valid as well as
multiplication by 1. By suitable equation bending you can arrive to the above
Therefore all vector ops are allowed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk