Starting from:

$25

ComputerGraphics - A01 - Paint by numbers - Solved

The WebGL application contained in file index.html, wants to draw the bullet-shaped pattern represented in blue, with the red lines using the code written in file draw.js.

 

If you open index.html in Google Chrome or in some other WebGL supported browser, you will see that the current version of the code written in file draw.js draws an X and a line.

 

Find the appropriate set of normalized screen coordinates to match the blue pattern with red lines and correct the code in function draw() of file draw.js. For the moment, please ignore the content of file index.html. The grid, whose spacing in 0.1, should help you in finding the correct coordinates of the end points of the considered lines. Use the appropriate for() statement, with functions Math.sin() and Math.cos(), to draw the circular part, by approximating it with a 64 small lines.  

 

 

More products