Enter formula. You should leave [x, y] as the top two elements on the stack.

Examples

Example 1 Example 2 Example 3 Example 4

Documentation

Formulas are defined using "Reverse Polish Notation." Here are the different operations it supports:

Example

tcr* tsr*
At t=0, r=1

The formula is evaluated character-by-character

  1. t Push the current time onto the stack. The stack is now [0]
  2. c Take the top of the stack off the stack and push its cosine onto the stack. The stack is now [1]
  3. r Push the current radius onto the stack. The stack is now [1 1]
  4. r Pop the top two values of the stack and push their product onto the stack. The stack is now [1]
  5. t Push the current time onto the stack. The stack is now [1 0]
  6. s Take the top of the stack off the stack and push its sine onto the stack. The stack is now [1 0]
  7. r Push the current radius onto the stack. The stack is now [1 0 1]
  8. r Pop the top two values of the stack and push their product onto the stack. The stack is now [1 0]

Now that we have gone through every character, the circle is drawn at the point specified by the top two values x=1, y=0