Work on the diagrams library is coming along rather nicely. I’ll have more to say about it soon, but for now here are two things I have learned recently:

- Normals transform as the inverse transpose (see Subject 5.27).
- Be very careful about distinguishing between points and vectors. Otherwise you are likely to get bitten by translations doing the Wrong Thing.

“Be very careful about distinguishing between points and vectors. Otherwise you are likely to get bitten by translations doing the Wrong Thing.”

– Can you explain this a bit more. Ive encountered this advice before, but I always struggle to see what the difference is, and what problems result.

Isnt a point just a vector relative to a particular coordinate frame?

A point represents a location in space (relative to some particular coordinate frame); a vector represents a magnitude and direction, and is independent of coordinate frame. You can form a vector by taking the difference between two points; hence you can add a vector and a point (corresponding to translation of the point), and you can add two vectors (composition of translations), but you can’t add two points. My point about translations is this: imagine you are dealing with affine transformations (= linear transformation + translation). If you apply one to a point, it should act by linearly transforming and then translating the point. If you apply one to a vector, it should act by applying the linear transformation only, since vectors are independent of coordinate frame, i.e. invariant under translation! Actually “translating” a vector by adding another vector to it is likely to give you screwy results. This is tricky to get right unless you actually have two different types for points and vectors.

I wrote a post on points and vectors some time ago: http://monoidal.blogspot.com/2010/07/universal-space.html.

The following are functors between affine/vector spaces:

* Assign an affine space to a vector space by forgetting the origin. An affine map is changed to a linear map (ignoring translation part)

* Assign a vector space to an affine space – vectors are pairs of points (p,q) modulo translation.

* Assign a vector space to an affine space generated by points and vectors (universal space)

A set of vectors is a group. If you denote points with vectors, there is no distinction. If points belong to the distinct set, it is not a group, just a set. Therefore you may not calculate on points by themselves. However, as explained in Wikipedia, there is a regular action of a vector space on the set of points, so you may calculate points via vectors and even determine vectors by points.