6.5: Vectors: The Dot Product – The Nature of Code

[ad_1]
This video provides an overview of the formula for and applications of the vector dot product. It serves as the basis for the next video about Path Following.

Read along:

More info:

Code from video:

Help us caption & translate this video!


Posted

in

by

Tags:

Comments

9 responses to “6.5: Vectors: The Dot Product – The Nature of Code”

  1. Stasis Avatar

    Thanks for the great videos. It's rare to see someone actually explains the logic and process behind the code. Can't tell you enough how much I appreciate your videos. Keep it up!

  2. Markus Burrer Avatar

    Does this code also works for 3d vectors? Or how can I calculate the scalar projection for 3d vectors?

  3. Musa Karatu Avatar

    Brilliant presentation. Could you please help me with the code for 3D flow field. Thank you

  4. Kyle-Ben Snyders Avatar

    I laughed out loud when you said "I wish I had a kitten. Pet the kitten". Never have I been so entertained and educated at the same time. Been watching your videos for a while now. There are so many! I want to thank you so very much for them. They are helping a lot not only with web development (for visual effects), but also game development, and just generally becoming a more well rounded person. THANK YOU!

  5. corey333p Avatar

    You explained very clearly how to calc the dot product, but I didn't feel like I really "got it" until I came across this: "The dot product tells you what amount of one vector goes in the direction of another." It makes more intuitive sense when explained like that. You might've made that clear, but I missed it. In any case, maybe it will help someone!

  6. Mrelevatorman Avatar

    All your videos are first rate. Thank you so much for making them. I have one questions. How can I use the dot product to determine whether the angle relative to my current vector is negative or positive with respect to the vector I'm comparing it with?
    Thanks again.

  7. Fratean Tudor Avatar

    This explanations were super clear. Thank you!

  8. Jai Lopez Avatar

    another great video dan , useful sketch thanks

    now i have to ask, what determines how the vectors are setup in https://github.com/shiffman/The-Nature-of-Code-Examples/tree/master/chp06_agents/FlowfieldImage in there you have 3 photos which give diff outcomes, how and why dan? further more i imported my own pic just to test something out and i got diff vectors then all others so what is it that tells vector how and or where to setup shop? more specifically how do i get the vectors to follow this road but not that road? how do i tell vectors to change their magnitud of speed if a condition is met? i see in you face.jpg in the data folder that the vectors are following the face profile pretty good but this is the only photo that vectors line up so neat following that contour that makes up the face , pretty cool dan

  9. MrBostich83 Avatar

    You should have a million views. Perfect videos, really well done!

Leave a Reply

Your email address will not be published. Required fields are marked *