If we want to create a scene in which a number of performers are standing on a rotating carousel this can be done by using a structure like sprite { source : Disc pos : X, Y, Z rot : 90 animate : T, loopforward, linear, rot, 0, 360, 0 clipSprite { source : clipA pos : 0, -R, 0 rot : -90 animate : T, loopforward, linear, rot, 0, 0, 360 } clipSprite { source : clipB pos : R, 0, 0 rot : -90 animate : T, loopforward, linear, rot, 0, 0, 360 } clipSprite { source : clipC pos : 0, R, 0 rot : -90 animate : T, loopforward, linear, rot, 0, 0, 360 } clipSprite { source : clipD pos : 0, -R, 0 rot : -90 animate : T, loopforward, linear, rot, 0, 0, 360 } } where X, Y, Z are the screen co-ordinates of the center of rotation, T the rotation period and R the distance from the center at which each clip is to be placed. The texture Disc is assumed to be a coloured circle. Note that By nesting the clipSprite nodes within the disc's sprite the clipSprites' coordinates are relative to the center of the carousel and rotate with it. The disc has been rotated from a vertical circle to be a horizontal one representing the top of the carousel. This has to be compensated for by rotating each of the clipSprites by -90 degrees otherwise the performers will appear to be flat on the floor. Similarly the overall rotation has to be compensated for by rotating the clipSprites in the opposite direction. Because of the change of axes due to rotating the disc from vertcal to horizontal the compensation is done by rotating about the new Z axis. However, this leaves a significant problem due to the fixed display priority of the clipSprites. This causes, for example, clip C to always be displayed on top of A or B even if it has been rotated to be at the back of the carousel. The scence file TheEmu = Experiments with Carousels - X1 - The Sprite Display Priority Problem.scn fully implements the scheme and shows the problem with it. The following table shows in plan view of the carousel for steps of 45 degrees +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 | +-------+------+-------+------+-------+------+-------+------+-------+ | A | A D | D | D C | C | C B | B | B A | A | | B D | | A C | | D B | | C A | | B D | | C | B C | B | A B | A | D A | D | C D | C | +-------+------+-------+------+-------+------+-------+------+-------+ What we should see when looking from the front is +-------+------+-------+------+-------+------+-------+------+-------+ | B C D | B C | A B C | A B | D A B | D A | C D A | C D | B C D | +-------+------+-------+------+-------+------+-------+------+-------+ But what is displayed is +-------+------+-------+------+-------+------+-------+------+-------+ | | C | B | A B | A | A | | | | | B C D | B d | A d C | d c | D c B | D b | C D A | C D | B C D | +-------+------+-------+------+-------+------+-------+------+-------+ where the top row represents large images that are wrongly displayed behind a small image and lower case letters represent the small images that should be hidden. The changes in size being due to the change in perspective as the carousel rotates. This problem can be overcome by pairs of identical clips for each performer. It is then possible to modulate their opacities such that only the correct member of each pair is opaque at any instant with the other being transparent. Using a,b,c,d for the low priority sprites and A,B,C,D for the corresponding high priority sprites in plan view each set of four sprites looks like +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 | +-------+------+-------+------+-------+------+-------+------+-------+ | a | a d | d | d c | c | c b | b | b a | a | | b d | | a c | | d b | | c a | | b d | | c | b c | b | a b | a | d a | d | c d | c | +-------+------+-------+------+-------+------+-------+------+-------+ | A | A D | D | D C | C | C B | B | B A | A | | B D | | A C | | D B | | C A | | B D | | C | B C | B | A B | A | D A | D | C D | C | +-------+------+-------+------+-------+------+-------+------+-------+ We could achieve the effect we want by "square wave" modulation of the opacities as shown in the following table where the columns of letters show which clips would be visible. +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | a 1 | a 1 | | 0 | 0 | 0 | 0 | 0 | b 1 | b 1 | b 1 | b 1 | | 0 | 0 | 0 | c 1 | c 1 | c 1 | c 1 | c 1 | c 1 | | d 1 | d 1 | d 1 | d 1 | 0 | 0 | 0 | 0 | 0 | | A 1 | A 1 | A 1 | A 1 | A 1 | A 1 | A 0 | 0 | 0 | | B 1 | B 1 | B 1 | B 1 | B 0 | 0 | 0 | 0 | 0 | | C 1 | C 1 | C 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | D 1 | D 1 | D 1 | D 3 | D 1 | +-------+------+-------+------+-------+------+-------+------+-------+ However there is no "square wave" animation option. We could approximate a square wave by a sine wave - using a high amplitude and relying on opacities being clipped to the range 0.0 to 1.0 - but there does not appear to be any way to set the phases of the animations. We can, almost, achieve the effect we want by ramping the opactities as shown in in the following table. +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 | +-------+------+-------+------+-------+------+-------+------+-------+ | -6 | -5 | -4 | -3 | -2 | -1 | 0 | a 1 | a 2 | | -4 | -3 | -2 | -1 | 0 | b 1 | b 2 | b 3 | b 4 | | -2 | -1 | 0 | c 1 | c 2 | c 3 | c 4 | c 5 | c 6 | | d 4 | d 3 | d 2 | d 1 | 0 | -1 | -2 | -3 | -4 | | A 6 | A 5 | A 4 | A 3 | A 2 | A 1 | A 0 | -1 | -2 | | B 4 | B 3 | B 2 | B 1 | B 0 | -1 | -2 | -3 | -4 | | C 2 | C 1 | C 0 | -1 | -2 | -1 | -2 | -1 | -2 | | -4 | -3 | -2 | -1 | D 0 | D 1 | D 2 | D 3 | D 4 | +-------+------+-------+------+-------+------+-------+------+-------+ The result being +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 | +-------+------+-------+------+-------+------+-------+------+-------+ | B C d | B C | A B C | A B | D A B | D A | c D A | c D | b c D | +-------+------+-------+------+-------+------+-------+------+-------+ | A | A d | d | d c | c | c b | b | b a | a | | B d | | A C | | D B | | c A | | b D | | C | B C | B | A B | A | D A | D | c D | c | +-------+------+-------+------+-------+------+-------+------+-------+ where the lower case letters show when the lower priority sprite of a pair is seen, not a foreshortened image as they did before.. Using the values shown above there would be a minor problem because the opacities would each be in the "partialy transparent" range for a significant fraction of the carousel's rotation, but this is easily overcome by multiplying the above values by a large number. If we complicate matters by adding a fifth performer at the center of rotation then we can see that at various points of a cycle its display priority must vary to keep it between the priorities of the clips in front of it and those behind it. This is shown in the following table showing that, in general, we would need to use three clipSprites for the central performer (or use a more complex pattern of modulations for the other clips). +-------+------+-------+------+-------+------+-------+------+-------+ | 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315 | 360 | +-------+------+-------+------+-------+------+-------+------+-------+ | A | A d | d | d c | c | c b | b | b a | a | | B X d | X | A X C | X | D X B | X | c X A | X | b X D | | C | B C | B | A B | A | D A | D | c D | c | +-------+------+-------+------+-------+------+-------+------+-------+ | B > X > A | A > X > d | c > X > b | +-------+------+-------+------+-------+------+-------+------+-------+ However, it may not always be neccessary to always fully model a central performer, e.g. on a wide carousel some priority inversions may only occur when the performers do not overlap and in these cases it may be possible to simplfy matters. The set of "TheEmu = Experiments with Carousels" scenes comprises three series. The "A" series just explores the basic aspects of rotating co-ordinate frames with the performers simply floating in space while the "B" series constructs an increasingly realistic set of carousels. the "C" series is devoted to carousels of cagedancers. It was found that pole dance performances are particulary suitable for use with the carousels developed here because they have a very well established center and the girls do not move too far away from it, unlike some of the normal standing strips. The same advantage is true of performances in a cage, but these were found to have their own problems which are examined in detail in the "C" series. The final results could be improved by replacing the use of flat colours for the carousel elements by patterned or textured elements, adding shadows or refections and providing some suitable background, e.g. one of the Penthouse Club backgrounds. I also envisage using a carousel as part of a fancy medieval clock where a series of mechanical figures come out of one door, perform some action, and exit through a second door - but I first need a suitable picture to use as the background.