JavaScript Graphics

Back to index


Your browser is broken ASSIGNMENT:
While it would be possible to draw a total of sixteen lines each beginning at the center of the canvas area, instead only eight lines are drawn in this example with each line simple traversing through the center. (Just in case that was too subtle, allow me to point out that that was a big hint on how to solve this problem, BTW.)

You will modify this design only slightly. You will draw an empty circle (diameter = 20) in the center of the canvas area. The compass lines will begin at the edge of the circle and will have end points as shown in the example.

PICKY DETAIL: You may not use a fill at any point in your code (except for the one at the beginning which paints the entire canvas area black).