Expression Calculator: type a numerical expression and it will be calculated, considering operator order, ( expoents are buggy ) type a graph equation and it will be ploted on screen, try: x*x+y*y-10000 to make a sphere Random Graph a random equation is selected from a list and cool stuff is ploted HOW IT WORKS: the expression you type, is a String of characters, with leading spaces and the numbers and operators... Step 1: " 10 + 5/2 " turns out in a list like 10 + 5 / 2 Step 2: this is the Infix notation, but to compile it i need Reverse Polish Notation, (wikipedia: https://en.wikipedia.org/wiki/Reverse_Polish_notation) to do this i use the Sunting-yard algrithm (wikipedia: https://en.wikipedia.org/wiki/Shunting-yard_algorithm) so the expression becomes: 5 2 / 10 + Step 3: i need to convert this to bytecode, similar to java bytecode (wikipedia: https://en.wikipedia.org/wiki/Java_bytecode) so the expressin becomes: push 5 push 2 div push 10 add and them this is converted to a numerical representation to be iterated trought switch: push:0 add:1 sub:2 mul:3 div:4 rem:5 pow:6(don't work) so the expression is turned to: 0 5 0 2 4 0 10 1 and this runs in a virtual machine, stack based, like a very very simplified java virtual machine: https://en.wikipedia.org/wiki/Java_virtual_machine
A D D E D : Longer time to draw. (8 to 4 to 2 to 1) R E M O V E D : The grey square /rectangle