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:
r
the current radius between 0 and 1t
the current time. elements at a single radius have a time offsetn
negate the previous valuem
absolute 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 valuesd
duplicate the previous values
take the sine of the previous valuec
take the cosine of the previous valuee
Raise the second-to-last value to the last valueP
Pi
Example
tcr*
tsr*
At
t=0, r=1
The formula is evaluated character-by-character
t
Push the current time onto the stack. The stack is now[0]
c
Take the top of the stack off the stack and push its cosine onto the stack. The stack is now[1]
r
Push the current radius onto the stack. The stack is now[1 1]
r
Pop the top two values of the stack and push their product onto the stack. The stack is now[1]
t
Push the current time onto the stack. The stack is now[1 0]
s
Take the top of the stack off the stack and push its sine onto the stack. The stack is now[1 0]
r
Push the current radius onto the stack. The stack is now[1 0 1]
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