1.1: Vectors - The Nature of Code

  Рет қаралды 148,350

The Coding Train

The Coding Train

Күн бұрын

This video covers the topic vectors: What is a vector? How do vectors play a role in programming motion and physics simulation in Processing?
natureofcode.com/
Twitter: / shiffman
Read along: natureofcode.co...
Help us caption & translate this video!
amara.org/v/Qbwf/
📄 Code of Conduct: github.com/Cod...

Пікірлер: 111
@TheyCallMeConfucious
@TheyCallMeConfucious 8 жыл бұрын
Thanks Daniel, you do great great stuff! Nature of Code is one of my favorite programming books period!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
+David Ainley thank you!
@KenzoArts
@KenzoArts 7 жыл бұрын
I am only here for two reasons : 1. My teacher couldn't explain to me clearly what the heck are vectors and more importantly why should we care about them. 2. I love your videos it is so entertaining and fun to watch you explaining stuff in a simple way.
@camsy83
@camsy83 3 жыл бұрын
The 'processing skits' are what I'm tuning in for
@chryscollier
@chryscollier 6 жыл бұрын
I am Daniel's creepy camera lens.
@knowledge_4203
@knowledge_4203 3 жыл бұрын
Me too!
@flavienhenrion4610
@flavienhenrion4610 5 жыл бұрын
Best teacher EVER, can cheer you up AND teach you things ! from France with love
@mmahgoub
@mmahgoub 6 жыл бұрын
"I am applying for a new villain loan go by the name of Vector! It's a mathematical term of quantity represented by an arrow with both direction and magnitude because I am committing crimes with both direction and MAGNITUDE!"
@Mikeanddrea
@Mikeanddrea 7 жыл бұрын
Am I the only one waiting for the circle to hit the corner?
@OonHan
@OonHan 5 жыл бұрын
no
@springbok4015
@springbok4015 5 жыл бұрын
Pam saw it once, I believe she believes she saw it.
@divyekalra8725
@divyekalra8725 4 жыл бұрын
@@springbok4015 XDDDDD
@roosah6749
@roosah6749 4 жыл бұрын
I'm spending the new year watching Dan's videos instead of partying! Dan is probably the best teacher and the coolest presenter I've ever seen. You Dan are a gift to humankind, I salute your greatness my friend, may you inspire countless others as you did inspire me, and make this world a better place. I'm your greatest fan!
@pdoopo34
@pdoopo34 2 жыл бұрын
Just want to say, I found your channel a while ago when this series was fresh and it was this series of videos that got me here. I'm really happy to see just how much you've grown since then.
@saimanoxiconfirmed535
@saimanoxiconfirmed535 4 жыл бұрын
I dont think that this guy knows that he can cut a part of a video if something not planned happens
@bobsherlock2589
@bobsherlock2589 7 жыл бұрын
I think Daniel is very good but also this is very useful
@beefytaquitos
@beefytaquitos 4 жыл бұрын
Imagine 100,000 people sitting in a stadium, watching these lessons. The internet is an amazing tool.
@madsky
@madsky 5 жыл бұрын
The first two minutes were awesome! Subscribed!
@YG-ub4dk
@YG-ub4dk 5 жыл бұрын
"What is a Vector ?... Oh I'm supposed to answer this question so... yeah" :D
@Aryandholakiya
@Aryandholakiya Жыл бұрын
bro i love you a lot of support ily
@wickedclamor4882
@wickedclamor4882 Жыл бұрын
Damn! you are energetic. I have not seen anyone who is this happy to teach. I want you to take this compliment as if I were speaking to you. "You are incredible and I hope to become more like you!"
@magixshiz2543
@magixshiz2543 3 жыл бұрын
Holy shit, his passion just radiates off him! He's a perfect teacher and just like,,,, wow! Hes so excited about everything! :D
@Jamariyah_Zaire_Malakai
@Jamariyah_Zaire_Malakai 2 жыл бұрын
You Sir are a great Human. Thank you so much for all the great tutorials. It has really helped me out, iv learned so much. 🙏
@陈瀚龙
@陈瀚龙 5 жыл бұрын
Dammit, I learned something! Wait, what was I supposed to complain about?
@brunomeida1
@brunomeida1 4 жыл бұрын
I am inside this camera looking at you. thank you very very much
@sugarrush227
@sugarrush227 5 жыл бұрын
and they said sixth grade math doesnt help you in real life
@springbok4015
@springbok4015 5 жыл бұрын
Vectors were way after sixth grade for me.
@shihyuehjan3835
@shihyuehjan3835 9 ай бұрын
Thank you for making this, it helps me create a physics engine by myself!
@satyakighosh4226
@satyakighosh4226 5 жыл бұрын
you a good dancer too xD...awesome videos
@greywolf271
@greywolf271 2 жыл бұрын
This is why you need a science education to be a useful programmer
@randomaccount6146
@randomaccount6146 3 жыл бұрын
Shcool: vector is arrow. Now learn how to subtract and add or else you get F.
@sayeedkhan4886
@sayeedkhan4886 6 жыл бұрын
Rai yanduku raa enta jabaradasth chastunnav 😈😈😈😈😈😈
@sweethomes674
@sweethomes674 Жыл бұрын
Excellent explanations 😊Thank you
@rahulmathew8713
@rahulmathew8713 4 жыл бұрын
This is exactly what we should have learned when we took Computer Science degree. How physics can be applied to simulate reality. Damn I just saw these videos after so many years since I passed by CS. I started my CS in the year 2007.
@enzoqueijao
@enzoqueijao 4 жыл бұрын
GOD DAMN IT I WAS SURE IT WAS GONNA HIT THE CORNER WHEN YOU ENDED THE VDEO
@nathananthony426
@nathananthony426 5 жыл бұрын
"I will accept all complaints" me at work.
@zerodreaming
@zerodreaming 4 жыл бұрын
Whatever drug this guy is on, I want some.
@fabionavarrobiazetti
@fabionavarrobiazetti 2 жыл бұрын
this is true pure dan video. amazing !!!!
@krishk1234
@krishk1234 9 жыл бұрын
Thank you so much Daniel!
@magneticking4339
@magneticking4339 4 жыл бұрын
5:18 S Some, Sine O Old, Opposite H Horses, Hypotenuse C Can, Cosine A Always, Adjacent H Hear, Hypotenuse T Their, Tangent O Owners's, Opposite A Approach, Adjacent
@topgearIQ
@topgearIQ Жыл бұрын
Everyone here . He is a 😊programmer 😂
@charfractal9441
@charfractal9441 Жыл бұрын
sir you are fucking amazing
@brokenrobotgames2577
@brokenrobotgames2577 7 жыл бұрын
Typed Pvector explained into youtube. Found 1.6. Result? Missed my 2302 POLS class because vectors.
@曾淼-g3h
@曾淼-g3h 3 жыл бұрын
I love your video so much! It's clear, compact, interesting, and what's more soooo cute! thanks for making this ~
@markleopol56
@markleopol56 4 жыл бұрын
I am creating a game of checkers in processing, and I am at the point where I have to move images from location x1y1 to location x2y2 and don't know how to do it. Can anyone help me?
@abdulmughais6814
@abdulmughais6814 4 жыл бұрын
can you make video on basic mathem,atics for machine earning plzzzzz?
@gustavoleite7569
@gustavoleite7569 4 жыл бұрын
Brazil, 2020 here \m/
@rakshitrawat581
@rakshitrawat581 4 жыл бұрын
Which ide you are using
@holyone1542
@holyone1542 4 жыл бұрын
hay i can tell your a little nerves..it's okay man this helped a lot. keep up the good work
@cookieyumyum7977
@cookieyumyum7977 5 жыл бұрын
who is in 2019 srry found dis channel late VERY late
@pf8662
@pf8662 3 жыл бұрын
thank you so much, the explanation is great!
@ryacdebarros1904
@ryacdebarros1904 7 жыл бұрын
Hi dan sorry this comment isnt really relevant to this video but your newer stuff is great. What books can you recommend for genetic algorithms and AI that are really worth my money or any other general books that are related to the type of code that you write. Thanks for all your help
@islamguy2905
@islamguy2905 5 жыл бұрын
So vectors are basically displacement.
@prpheizungsanitar6050
@prpheizungsanitar6050 5 жыл бұрын
Genial...einfach die Beste online. 1000 vielen dank. :)
@kaellumfriesen9928
@kaellumfriesen9928 3 жыл бұрын
Aligned with both direction and magnitude
@UnbornFamas
@UnbornFamas 5 жыл бұрын
Hi Daniel, I have a question. How does Xpos being > than the Width or Xpos being < 0 cause the ball to bounce back I understand the code underneath does this however how does the Software detect the size of the canvas and bounce back? does the value drop to 0 on Xpos when the ball has traveled past 640 pixels?
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
@Fman261
@Fman261 4 жыл бұрын
@WolfeyVGC
@gerasimosmataragas353
@gerasimosmataragas353 8 жыл бұрын
Hello Daniel! I am an architect new to processing and I started by looking at the tutorials at the processing.org page (I've reached until the objects tutorial). Now I found this series of videos however, I saw that you take some things for granted like the bouncing ball code. Would you recommend going back to the processing.org page to finish these tutorials before wathcing your videos or should I carry on?
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
I would start with these videos before Nature of Code: kzbin.infoplaylists?view=50&sort=dd&shelf_id=2
@TheRemiRODRIGUES
@TheRemiRODRIGUES 6 жыл бұрын
I guess the equivalent of PVector in P5 is p5.Vector, and the method createVector(x,y) ?
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Correct!
@tshichan
@tshichan 5 жыл бұрын
it is my 5th time watching this video, and I still enjoy
@lilystoddart3439
@lilystoddart3439 4 жыл бұрын
this man is the bob ross of coding
@filipemecenas
@filipemecenas 2 жыл бұрын
Thanks
@immaginariumworld1914
@immaginariumworld1914 6 жыл бұрын
how muche do you have to know about maths to learn coding? what are the basic of maths to know to learn coding?
@TheRemiRODRIGUES
@TheRemiRODRIGUES 6 жыл бұрын
It depends on what you want to do. It is not compulsory to know about maths to code some project, but it could be interesting to know about math if you want to create an optimize algorithm.
@zanzaraloggan3713
@zanzaraloggan3713 7 жыл бұрын
nice lesson! I am subscribing :D
@suchescribbles2529
@suchescribbles2529 5 жыл бұрын
I am not creepy 🙃😝
@ChristopherAkiki
@ChristopherAkiki 8 жыл бұрын
Who was that at the door?
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
+Christopher Akiki I wish I could remember!
@ilustrado7291
@ilustrado7291 7 жыл бұрын
It was Ken Perlin.
@polyclickkkkk
@polyclickkkkk 7 жыл бұрын
kzbin.info/www/bejne/bKu7daJqmbFqibc
@cybern9ne
@cybern9ne 8 жыл бұрын
Just found this video series and I'm interested in using this with high school students. I just wanted to know if PVector() was actually a wrapper class for another java class or did someone code all the functions. For example, javafx has the Point2D class with all the same functions. I'm asking because I don't want the student to rely on external libraries.
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
it's written from scratch! Source code is here: github.com/processing/processing/blob/master/core/src/processing/core/PVector.java
@CaseLogsTrades
@CaseLogsTrades 8 жыл бұрын
Dude you are in a good place. i go to sheridan for game design and our programming class uses his books
@benjibluebird
@benjibluebird 5 жыл бұрын
Why not represent the direction of the vector using slope?
@danieloliveira9815
@danieloliveira9815 3 жыл бұрын
you could represent it using polar coordinates (length and slope) but then you would have to convert it back to x, y in order to apply it to the 2D canvas that has x and y coordinates :P
@jrayalac
@jrayalac 4 жыл бұрын
I love you Daniel
@funtret12
@funtret12 8 жыл бұрын
im kind of a noob on programming, if someone could respond x+= speedX; is equal to x = x + speedX;
@Kstolen23
@Kstolen23 8 жыл бұрын
exactly
@funtret12
@funtret12 8 жыл бұрын
+kris Stopher thanks !
@lastskynet4346
@lastskynet4346 7 жыл бұрын
good job you help me god help you
@gtpc779
@gtpc779 6 жыл бұрын
nice explanation :-)
@ling6701
@ling6701 5 жыл бұрын
Let's do this.
@zoilo87
@zoilo87 6 жыл бұрын
Hello daniel pls give me the link where i could find the definition of pvector
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
processing.org/reference/PVector.html
@zoilo87
@zoilo87 6 жыл бұрын
I mean the class itself.. Thanks dan
@zoilo87
@zoilo87 7 жыл бұрын
Sir can i have a decompiler for PVector just to see the content within the methods into it??
@zoilo87
@zoilo87 7 жыл бұрын
Thank you very much sir!! I hope someday i will soon meet you :)
@rahulmathew8713
@rahulmathew8713 4 жыл бұрын
The pdf explains the source code for PVector. Its supersimple
@yagamilight4321
@yagamilight4321 4 жыл бұрын
Thank you
@JayTailor45
@JayTailor45 5 жыл бұрын
1K th like :D
@carlosbabu9227
@carlosbabu9227 6 жыл бұрын
wow
@diegoferreira3444
@diegoferreira3444 7 жыл бұрын
keep it up
@lukasvojir_x
@lukasvojir_x 8 жыл бұрын
Thank you Daniel!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
you're welcome!
@Bunglay
@Bunglay 6 жыл бұрын
OMG I FEEL SO COMFORTABLE
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
And yet I am so uncomfortable.
@Bunglay
@Bunglay 6 жыл бұрын
lol
@springbok4015
@springbok4015 5 жыл бұрын
This is awesome, but yikes it needs a re-recording, vid quality is quite bad and audio out of sync.
@riptide74
@riptide74 4 жыл бұрын
I made it exactly 4 minutes and some change. Completely awful.
@niharranjanbhuyan9839
@niharranjanbhuyan9839 7 жыл бұрын
How to change the icon of the app developed by processing
@dasten123
@dasten123 6 жыл бұрын
You are programming and don't know about Google? :/ www.google.com/search?q=processing+change+icon
@Ykurdii
@Ykurdii 2 жыл бұрын
What is wrong with this guy, it look like he explains for children
1.2: PVector class - The Nature of Code
14:47
The Coding Train
Рет қаралды 98 М.
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 939 М.
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
1.5: Acceleration - The Nature of Code
14:20
The Coding Train
Рет қаралды 63 М.
I used to hate QR codes. But they're actually genius
35:13
Veritasium
Рет қаралды 440 М.
100 Hours Of Graphics Programming
6:48
Tantan
Рет қаралды 155 М.
Characters, Symbols and the Unicode Miracle - Computerphile
9:37
Computerphile
Рет қаралды 2 МЛН
What's The Longest Word You Can Write With Seven-Segment Displays?
8:56
The Boundary of Computation
12:59
Mutual Information
Рет қаралды 1 МЛН
What is a vector? - David Huynh
4:41
TED-Ed
Рет қаралды 1,9 МЛН
I Made an AI with just Redstone!
17:23
mattbatwings
Рет қаралды 1 МЛН
Coding Adventure: Boids
8:35
Sebastian Lague
Рет қаралды 1,5 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15