Entries for this challenge will display an animated rotating Lissajous figure. The appearance of 3d rotation occurs as the x parameter is successively phase-shifted in each frame.
Input:
The a
and b
parameters (as per the wikipedia article) will be specified at the command line, or read from stdin.
Output:
This is ascii-art, so output will be displayed in a terminal emulator window or equivalent. Output size may be hardcoded, but the Lissajous figure must be at least big enough to fill a 80x24 window.
The animation frame rate will be approximately 50fps. Sleeping for 20ms between each frame is fine, as long as the time to calculate each frame is small compared with the fixed sleep time. If your choice of language cannot calculate quick enough on your chosen platform, then you'll have to calculate the time to sleep dynamically.
Each frame will not be displayed until all calculation for that frame is complete. There is no need to clear the screen between each frame.
The figure will make a full 2*Pi
rotation approximately every 4 seconds.
For each frame, a full closed curve must be generated. At least 1000 points must be calculated along the curve. Line-drawing in between points is not necessary.
Points of the curve will be plotted as #
characters. The rest of the display area will be blank/whitespace.
This is code-golf, so the shortest answer in bytes (deemed acceptable by me) will be the accepted winner one week after this posting.
Ungolfed reference answer.