Sample Applet
Here is an equation: