This pattern was created using SVG. Inspecting the values used for points in polygon will reveal certain patterns which will enable you to write an efficient and reusable JavaScript function to produce a hexagon. |
ASSIGNMENT: Here's a basic embedded for-loop: for(x=0;x<3;x++){ for(y=0;y<2;y++){ drawHEX(10+x*70,10+y*70); } } |