JavaScript Graphics

Back to index


Your browser is broken ASSIGNMENT:
As of the creation of this assignment, the ellipse function only works in Chrome and so if you're using another browser, chances are all you'll see to the left is an empty black box. So, if you don't see anything but black, switch browsers!

The ellipse function takes seven input values (add an optional value for clockwise or counter-clockwise and there's actually eight). Here's how it works:

ellipse(x,y,r1,r2,rot,start,end); The first two values designate the center of the ellipse. The next two are the radii (an ellipse has two values for radius for obvious reasons), the next one is the rotation (in radians), and the last two are the start and end angles which will always be 0 and Math.PI*2 if you are rendering a full ellipse.

So, with all that out of the way, your assignment is to draw a daisy with eight yellow petals and an orange center!