If you want/need to stick with Perl/Tk...then you need to to matrix math. With the right matrix you can re-position, rotate, re-size an object by applying the matrix to each point of the object. Then finally there's a matrix to project each 3d point onto a 2d plane (your viewing canvas.) Now that you have all the co-ordinates in 2d, just draw it with Perl/Tk. Instead of using matrices you can also simulate some (limited) 3d objects or objects in 3d world. A rectangle spinning on Y axis is fairly easy: in a loop first contract corner x co-ordinates (slightly contracting y co-ordinates for one edge to show perspective) until it becomes a line (x co-ordinates for all corners are same), then expand the x co-ordinates to original (increasing slightly y co-ordinates of opposite edge of rectangle.)
Chris