JavaScript Graphics

Back to index


Your browser is broken Assignment:
The only new function shown in this assignment is quadraticCurveTo. You see it used to create an ellipse and a concaved diamond in the example shown to the left. Here are the input numbers used by the function: quadraticCurveTo(pinchX,pinchY,endptX,endptY); A close inspection of the two figures will indicate that the pinch points in the top example are outside the figure and the pinch points in the bottom example are inside the figure.

Using only quadratic curves create a concaved diamond with a vertice in each of the corners of the canvas and four ellipses, one in each of the quadrants defined by the concaved diamond.