Friday, February 20, 2009
Draw a custom function in ActionScript
Here you have the sample. Fill the function input text with your custom function. You may use any standard function, sin, cost, sqrt, etc and any arithmetic function. Then you could choose the precision between 0.01 and 10 and of course you may set the scale (the default is 10).
E.g.: write down "sin(x)" function in the input text field. Press then Live Draw Function to see the results.
Source code may be viewed using "view source" context menu.
PS: You may draw some circles using the mouse on the draw surface. It's not a bug, it's a feature! :D
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment