Here’s a screen shot of a Processing Window containing a program to draw a regular polygon:
Now, to run the program , push the “Play” button, or choose Sketch->Run, and you’ll see the result:
Now, to run this on Android, I commented out the call to the function ‘size’, following is the result on in an emulator window:
You can download Processing here.
To learn more about pure Processing function go to the function reference.