Enter formula. You should leave [x, y] as the top two elements on the stack.
Examples
Example 1 Example 2 Example 3 Example 4Documentation
Formulas are defined using "Reverse Polish Notation." Here are the different operations it supports:
rthe current radius between 0 and 1tthe current time. elements at a single radius have a time offsetnnegate the previous valuemabsolute value of the previous value+add the previous two values*multiply the previous two values-subtract the previous value from the one before it/divide the previous value from the one before it&bitwise-and the previous two values|bitwise-or the previous two values^bitwise-xor the previous two valuesdduplicate the previous valuestake the sine of the previous valuectake the cosine of the previous valueeRaise the second-to-last value to the last valuePPi
Example
tcr*
tsr*
At
t=0, r=1
The formula is evaluated character-by-character
tPush the current time onto the stack. The stack is now[0]cTake the top of the stack off the stack and push its cosine onto the stack. The stack is now[1]rPush the current radius onto the stack. The stack is now[1 1]rPop the top two values of the stack and push their product onto the stack. The stack is now[1]tPush the current time onto the stack. The stack is now[1 0]sTake the top of the stack off the stack and push its sine onto the stack. The stack is now[1 0]rPush the current radius onto the stack. The stack is now[1 0 1]rPop 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