Graphic JavaScript

Back to index


Sometimes creating images using beginPath, moveTo, lineTo, and stroke can be a little tedious and frustrating. To ensure that you are organized and ready to begin the coding portion of a project, its often a good idea to draw your image on paper and figure out the coordinates for your lines BEFORE you actually start coding. Professional programmers generally take a lot of time for the planning stage BEFORE they start actually coding. This planning stage is often referred to as the DESIGN phase of the software development cycle. For a really big project the DESIGN phase could take a few weeks. For this project, the student will probably only need about five minutes to complete the design phase.

EXAMPLE:
This applet is an approximation of what the student will be expected to create. The student will create a star with more points, but otherwise the final project will be similar to this example.


ASSIGNMENT:
Basically, the student will draw a seven-pointed star. The only trick here is figuring out how to place the seven lines required to create a properly proportioned star.


Your browser does not support the HTML5 canvas tag.