|
-
August 8th, 2008, 12:16 PM
#1
Mathematics for programming graphical representation of a carousel?
I would like to program a 3D representation of a carousel of photo images. Anyone know where I can find the mathematical formulas for that? The carousel is rotating about a central axis, obviously, but you also have to make each individual photo (or slide) rotate about its axis in a way that is dependent on the rotation of the carousel.
Picture of a classic slide carousel:
http://images.google.com/imgres?imgu...%3Den%26sa%3DN
Any help would be appreciated. Thanks.
-
August 15th, 2008, 02:53 PM
#2
Re: Mathematics for programming graphical representation of a carousel?
If I understand you correctly, the rotation of the photo is just its starting rotation, plus the rotation of the carousel.
if the first photo (n=0) is defined so that it has 0 starting rotation, then the nth photo of N photos has starting rotation (in degrees) of
(360/N) * (n - 1).
e.g. you want 5 photos
360/5 = 72 degrees. The starting rotation of the photos are as follows:
Code:
n rotation
0 0
1 72
2 144
3 216
4 288
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|