3d translation in Python.

Terry Reedy tjreedy at udel.edu
Fri Aug 30 13:34:23 EDT 2002


"> Is there a way to translate a point in the global to the member
> coordinate?

If x,y,z are global coordinates of Point to be translated and a,b,c
are global coordinates of member (or reference point thereof), then
x-a,y-b,z-c are translated member coodinates of Point (ie, relative to
reference point of member).  If you want to rotate and/or stretch the
coordinate system also, then you need to do matrix multiplication and
should look up basic info about 3D computer graphics that explains
such.

(Or look at transform? module of something like pygame www.pygame.org
which has such already written.)

Terry J. Reedy









More information about the Python-list mailing list