Asciimation Jumping Jacks This is my first challenge, so I'm keeping it fairly simple.

If you've ever typed telnet towel.blinkenlights.nl on your command line and pressed enter, you will have experienced the joy of asciimation. Asciimation is, quite simply, doing an animation with ascii art. Today we will be doing a very basic asciimation of a person doing jumping jacks.

There will be two ascii pictures that we will put together into one asciimation.
Number 1:

_o_
 0
/ \


Number 2:

\o/
_0_
&lt;blank line&gt;


Note that the second one has a blank line at the end.

So your program should do these steps:


Clear the console screen.
Print the correct ascii art image.
Set a flag or something so you know to do the other image next time.
Wait a moment (about a second).
Continue at 1.


Rules


Your program must be a (theoretically) infinite loop.
The programming language you use must have been created before this challange was posted.
This is code-golf, so shortest code in bytes wins.
Standard loopholes apply.


Enjoy!
CJam, 51 45 42 38 36 bytes

"c\o/
_0_""^[c_o_
 0
/ \^["{_o\6e4m!}g


The above uses caret notation; the sequence ^[ is actually the ASCII character with code point 27.

I've borrowed the escape sequence (^[c) from @DomHastings' answer (with his permission) to save 4 bytes.

Verification

You can recreate the file like this:

base64 -d &gt; jj.cjam &lt;&lt;&lt; ImNcby8KXzBfIiIbY19vXwogMAovIFwbIntfb1w2ZTRtIX1n


To run the code, download the CJam interpreter and execute this:

java -jar cjam-0.6.5.jar jj.cjam


This will work on any terminal that supports console_codes or an appropriate subset.1

How it works

e# Push both jumping jacks on the stack.

"c\o/
_0_"

"^[c_o_
 0
/ \^["

e# When chained together, they contain two occurrences of the string "\ec",
e# which resets the terminal. Encoding the ESC byte in the second string
e# eliminates the need two escape a backslash before the string terminator.

{         e# Do:
  _o      e#   Copy the jumping jack on top of the stack and print the copy.
  \       e#   Swap the order of the jumping jacks.
  6e4m!   e#   Calculate the factorial of 60,000 and discard the result.
          e#   This takes "about a second".
}g        e# Since the discarded factorial was non-zero, repeat the loop.




1 The jumping jacks will look better if you hide the terminal's cursor before running the program. In Konsole, e.g., you can set the cursor's color to match the background color. This has to be done via your terminal's settings, since ^[c resets the terminal.