05:355.6 Vector Dot Product (Scalar Projection) - The Nature of Code
From the creator
This video covers the dot product and scalar projection with p5.js and vectors, concepts that I’ll need for finding the distance between a point and a line which will lead to the path following steering behavior in the next video! Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/6-scalar-projection p5.js Web Editor Sketches: 🕹️ Angle Between: https://editor.p5js.org/codingtrain/sketches/ORP5Yx7JX 🕹️ Scalar Projection: https://editor.p5js.org/codingtrain/sketches/c4jmHLFQI 🎥 Previous video: https://youtu.be/ujsR2vcJlLk?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 Next video: https://youtu.be/rlZYT-uvmGQ?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM References: 🔗 Path Following: https://editor.p5js.org/natureofcode/sketches/SkMI894DX 🔗 Steering Behaviors for Autonomous Characters: http://www.red3d.com/cwr/steer/ 🔗 Scalar Projection: https://en.wikipedia.org/wiki/Scalar_projection 🔗 Vector Projection: https://en.wikipedia.org/wiki/Vector_projection Videos: 🎥 3D Rendering with Rotation and Projection: https://youtu.be/p4Iz0XJY-Qk 🎥 Unit Vector (Normalize): https://youtu.be/ttz05d8DSOs 🎥 Dot products and duality: https://youtu.be/LyGKycYT2v0 Timestamps: 0:00 Welcome! What are we looking at today? 1:01 What is scalar projection? 3:04 How do we use dot product to find the scalar projection? 6:13 Let's create a scalarProjection() function. 8:01 Modifying the function
Published 2021-10-13 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





