nature-of-code / noc-book-2

Nature of Code with p5.js and Notion workflow / build system.
https://natureofcode.com
789 stars 53 forks source link

5.28 move vehicle #195

Closed shiffman closed 10 months ago

shiffman commented 1 year ago

The vehicle should move to the same spot as in figure 5.24. And then a dotted line can connect the hypotenuse of the triangle (as seen in 5.25).

image

zee-em commented 1 year ago

Updated and uploaded to Notion!

zee-em commented 1 year ago

Following up-- I am on plane Wi-Fi and it looks like uploads are not completing. Will try again when I'm on the ground.

zee-em commented 1 year ago

Complete

shiffman commented 1 year ago

Ah! So the vehicle here has to point to the dot at the top of the triangle, it's velocity is not parallel to the dotted line. Rather it's velocity is how the point is chosen (and then the dotted line is connected). see 5.24 for reference

image

zee-em commented 1 year ago

I've made this change, and updated in Notion. Do the the vehicle and vector in 5.24 and 5.28 need to match exactly? If so, because of the way the vehicle is positioned in 5.24, if it's in the same location for 5.28 the dotted line crosses through the vehicle. In this latest version of 5.28 it is shifted and rotated slightly. I can send an overlay if that helps visualize it :)

(btwn the two figures there's more stuff on the right in 5.28 so the positions of everything is a bit different)

shiffman commented 1 year ago

No I don't think they need to match exactly! I think the idea is conveyed and each is accurate to itself, I suppose we could move the 5.24 one if we wanted them to, but I don't think it's a big deal. My one quibble is that the arrow (direction of triangle) looks slightly off. This is very much of an obsessive comment but it should point in a way that it passes through the center of the dot.

I thought maybe this was a case of it being an optical illusion but if I extend the line out it does appear to be a tiny bit off?

image

zee-em commented 10 months ago

edited and uploaded to notion :)

shiffman commented 10 months ago

👏