t
? 250 + 250 * Math.sin(t)
500 * Math.abs(Math.cos(t))
t % 500
250 + 250 * Math.abs(Math.cos(t))
500 * Math.sin(t)
t
) make the object move in a circle? [Math.sin(t), Math.cos(t)]
[Math.sin(2 * t), Math.cos(2 * t)]
[Math.sin(t), Math.cos(2 * t)]
[Math.sin(2 * t), 2 * Math.cos(t)]
[Math.sin(2 * t), Math.sin(2 * t)]
event
at the top left corner of an HTML Canvas, and define let box = event.target.getBoundingClientRect();
, which ones of the following will return 0
? event.clientX - box.left
event.clientX - box.top
event.clientX - box.width
event.clientX
box.left
[x, y]
, which ones of the following draw a square centered at the mouse position. context.fillRect(x - 5, y - 5, 10, 10)
context.fillRect(x, y, 10, 10)
context.fillRect(x + 5, y + 5, 10, 10)
context.fillRect(x + 5, y - 5, 10, 10)
context.fillRect(x - 5, y + 5, 10, 10)
context.translate(4, 4); context.scale(2, 2);
if followed by context.fillRect(0, 0, 1, 1)
? context.scale(2, 2); context.translate(2, 2);
context.scale(2, 2); context.translate(1, 1);
context.scale(2, 2); context.translate(8, 8);
context.scale(4, 4); context.translate(2, 2);
context.scale(4, 4);
context.scale(2, -3); context.fillRect(0, 0, 1, 2); context.scale(-1, 2);
assuming no other transformations are done. 12
24
6
2
0
b
to letter p
)? context.scale(1, -1)
context.scale(-1, 1)
context.rotate(Math.PI)
context.rotate(-Math.PI)
context.translate(-1, -1)
-1
Last Updated: November 30, 2024 at 4:35 AM