Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

EECS 468 Fall 2023 ICP 13, Assignments of Computer Science

EECS 468 Fall 2023 ICP 13 programming paradigms

Typology: Assignments

2022/2023

Uploaded on 04/04/2024

mikaela-navarro
mikaela-navarro 🇺🇸

3 documents

Partial preview of the text

Download EECS 468 Fall 2023 ICP 13 and more Assignments Computer Science in PDF only on Docsity! Mikaela Navarro 2998217 1)// create a variable to be able to reference the context object to be able to use its properties let cx = document.querySelector("canvas").getContext("2d"); // start drawing cx.beginPath(); // start at (20,70) to draw quadratic curve cx.moveTo(20,70); // draw to control point at (60, 10), and ends at (70, 80) cx.quadraticCurveTo(60, 10, 70, 80); // create stroke cx.stroke(); 2)// create a variable to be able to reference the context object to be able to use its properties let cx = document.querySelector("canvas").getContext("2d"); // start drawing cx.beginPath(); // start at (20,90) to draw bezier curve cx.moveTo(20, 90); // draw to control1 at (20, 10), control2 at (100, 10), and ends at (60, 90) cx.bezierCurveTo(20, 10, 100, 10, 60, 90); // from (60, 90) draw a line to (100, 10) cx.lineTo(100, 10); // from (100, 10) draw a line to (20,10) cx.lineTo(20, 10); // close the opening from (20, 10) to (20, 90) cx.closePath(); // fill in the shape cx.fill(); 3)// create a variable to be able to reference the context object to be able to use its properties let cx = document.querySelector("canvas").getContext("2d"); // start drawing cx.beginPath(); // left eye // draw the circle w/ the center=(130, 40) radius=10 angle=0 to 7 cx.arc(130, 40, 10, 0, 7); // fill in the shape
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved