INSS 250 Write programs in JavaScript to accomplish the following
INSS 250 Write programs in JavaScript to accomplish the following
Write programs in JavaScript to accomplish the following:
1. [20 points] Using the line function, create a triangle with vertices at (100, 200), (200, 200), and (150, 100) Write the x, y coordinates of the uppermost vertex next to that point using the text function.
2. [20 points] Create a function that will allow you to draw the triangle you developed in problem one at any place on the screen by passing your function parameters for the upper most x and y coordinates.
3. [20 points] Using the draw function make your triangle move across the canvas, entering on the left side and exiting on the right side.
4. [40 points] Using the draw function make two triangles converge at the center. The triangles should enter the screen from opposite sides, and progress toward each other at equal rates and meet in the center. Fill the triangle that approaches from the right with orange, and the triangle approaching from the left with blue. Change the color of the converged (combined) triangles with red. Set the background color to a pale yellow. Note: make the “step size” a variable. For this problem you are allowed to use the built-in triangle function, it will make it possible to fill the triangle with color. Please do this in the javascript program on khan academy and copy the code on microsoft word. Thanks.
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


