Spinning dancer

The spinning dancer, also known as the silhouette illusion, is a kinetic, bistable, animated optical illusion originally distributed as a GIF animation showing a silhouette of a pirouetting female dancer. The illusion, created in 2003 by Japanese web designer Nobuyuki Kayahara, involves the apparent direction of motion of the figure. Some observers initially see the figure as spinning clockwise (viewed from above) and some counterclockwise. Additionally, some may see the figure suddenly spin in the opposite direction.
The illusion derives from the lack of visual cues for depth. For instance, as the dancer's arms move from viewer's left to right, it is possible to view its arms passing between its body and the viewer (that is, in the foreground of the picture, in which case it would be circling counterclockwise on its right foot) and it is also possible to view its arms as passing behind the dancer's body (that is, in the background of the picture, in which case it is seen circling clockwise on its left foot).
When it is facing to the left or to the right, its breasts and ponytail clearly define the direction it is facing, although there is ambiguity in which leg is which. However, as it moves away from facing to the left (or from facing to the right), the dancer can be seen facing in either of two directions. At first, these two directions are fairly close to each other (both left, say, but one facing slightly forward, the other facing slightly backward) but they become further away from each other until they reach a position where its ponytail and breasts are in line with the viewer (so that neither the breasts nor the ponytail are seen so readily). In this position, it could be facing either away from the viewer or towards the viewer, so that the two possible positions are 180 degrees apart.
Another aspect of this illusion can be triggered by placing a mirror vertically beside the image. The natural expectation would be for the normal image and its reflection to spin in opposite directions. This does not necessarily happen, and provides a paradoxical situation where both mirrored dancers spin in the same direction. 
Psychology of visual perception.
It has been established that the silhouette is more often seen rotating clockwise than counterclockwise. According to an online survey of over 1600 participants, approximately two thirds of observers initially perceived the silhouette to be rotating clockwise. In addition, observers who initially perceived a clockwise rotation had more difficulty experiencing the alternative.
These results can be explained by a psychological study providing evidence for a viewing-from-above bias that influences observers' perceptions of the silhouette. Kayahara's dancer is presented with a camera elevation slightly above the horizontal plane. Consequently, the dancer may also be seen from above or below in addition to spinning clockwise or counterclockwise, and facing toward or away from the observer. Upon inspection, one may notice that in Kayahara's original illusion, seeing the dancer spin clockwise is paired with constantly holding an elevated viewpoint and seeing the dancer from above. The opposite is also true; an observer maintaining an counterclockwise percept has assumed a viewpoint below the dancer. If observers report perceiving Kayahara's original silhouette as spinning clockwise more often than counterclockwise, there are two chief possibilities. They may have a bias to see it spinning clockwise, or they may have a bias to assume a viewpoint from above. To tease these two apart, the researchers created their own versions of Kayahara's silhouette illusion by recreating the dancer and varying the camera elevations. This allowed for clockwise-from-above (like Kayahara's original) and clockwise-from-below pairings. The results indicated that there was no clockwise bias, but rather a viewing-from-above bias. Furthermore, this bias was dependent upon camera elevation. In other words, the greater the camera elevation, the more often an observer saw the dancer from above.
In popular psychology, the illusion has been incorrectly identified as a personality test that supposedly reveals which hemisphere of the brain is dominant in the observer. Under this wrong interpretation, it has been popularly called the "right brain–left brain test, and was widely circulated on the Internet during late 2008 to early 2009.
A 2014 paper describes the brain activation related to the switching of perception. Utilizing fMRI in a volunteer capable of switching at will the direction of rotation, it was found that a part of the right parietal lobe is responsible for the switching. The authors relate this brain activation to the recently described spontaneous brain fluctuations.
Bistable perception.
There are other optical illusions that depend on the same or a similar kind of visual ambiguity known as multistable, in that case bistable, perception. One example is the Necker cube.
Depending on the perception of the observer, the apparent direction of spin may change any number of times, a typical feature of so-called bistable percepts such as the Necker cube which may be perceived from time to time as seen from above or below. These alternations are spontaneous and may randomly occur without any change in the stimulus or intention by the observer. However some observers may have difficulty perceiving a change in motion at all.
One way of changing the direction perceived is to use averted vision and mentally look for an arm going behind instead of in front, then carefully move the eyes back. Some may perceive a change in direction more easily by narrowing visual focus to a specific region of the image, such as the spinning foot or the shadow below the dancer and gradually looking upwards. One can also try to tilt one's head to perceive a change in direction. Another way is to watch the base shadow foot, and perceive it as the toes always pointing away from oneself and it can help with direction change. One can also close one's eyes and try and envision the dancer going in a direction then reopen them and the dancer should change directions. Still another way is to wait for the dancer's legs to cross in the projection and then try to perceive a change in the direction in what follows. One can also try using one's peripheral vision to distract the dominant part of the brain, slowly look away from the ballerina and one may begin to see it spin in the other direction. Perhaps the easiest method is to blink rapidly (slightly varying the rate if necessary) until consecutive images are going in the 'new' direction. Then one can open one's eyes and the new rotational direction is maintained. It is even possible to see the illusion in a way that the dancer is not spinning at all, but simply rotating back and forth 180 degrees.
Slightly altered versions of the animation have been created with an additional visual cue to assist viewers who have difficulty seeing one rotation direction or the other. Labels and white edges have been added to the legs, to make it clear which leg is passing in front of the other. 
Looking at one of these can sometimes then make the original dancer image above spin in the corresponding direction.