3D Rotation Algorithm?
Posted: Sun Jan 27, 2008 12:12 am
If I'm crazy go ahead and tell me, but it seems that the following should be possible, if not actually rather simple:
I'm looking for an algorithm to simplify 3D (it doesn't have to be EXTREME '28th Century' 3D) graphics rotation, specifically regarding image rotation along the Z-axis.
Think of the old Atari coin-op game, "Battlezone". The enemy tanks (which were vector "draws") could rotate 180 degrees, by increments of around 10. They could face the player, face perpendicularly to the player in either direction, or be aligned along any of several angles in between. I would like to be able to make images do essentially the same thing, without having to compose (and code) every image. Here's what I'm thinking:
There ought to be a way to write a program to plot an image at any angle between 0 and 90. One should be able to provide this program with two images, a "front" (0 degree), and a "side" (90 degree) image. The program would, having read both images, utilize the algorithm to provide a corresponding (by most measures it would actually be a "conglomerate") image for the given angle (between 1 and 89).
Of course, one might well write a program to calculate said algorithm, but such would be way beyond my means.
I searched the web for hours for an answer before coming here to clutter up this forum. Any help would be greatly appreciated.
I'm looking for an algorithm to simplify 3D (it doesn't have to be EXTREME '28th Century' 3D) graphics rotation, specifically regarding image rotation along the Z-axis.
Think of the old Atari coin-op game, "Battlezone". The enemy tanks (which were vector "draws") could rotate 180 degrees, by increments of around 10. They could face the player, face perpendicularly to the player in either direction, or be aligned along any of several angles in between. I would like to be able to make images do essentially the same thing, without having to compose (and code) every image. Here's what I'm thinking:
There ought to be a way to write a program to plot an image at any angle between 0 and 90. One should be able to provide this program with two images, a "front" (0 degree), and a "side" (90 degree) image. The program would, having read both images, utilize the algorithm to provide a corresponding (by most measures it would actually be a "conglomerate") image for the given angle (between 1 and 89).
Of course, one might well write a program to calculate said algorithm, but such would be way beyond my means.
I searched the web for hours for an answer before coming here to clutter up this forum. Any help would be greatly appreciated.