Coding Challenge #64.2: Inverse Kinematics

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 239

  • @glogan2016
    @glogan2016 7 лет назад +385

    my favorite part of these videos is it shows the struggle, it shows the work of making a program work. I often get discouraged because I struggle so much sometimes... this allows me to understand that it's not just me and all the people who look like they do it flawlessly also have this same process.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +59

      Thank you for this feedback!

    • @ximecreature
      @ximecreature 5 лет назад +17

      Absolutely ! Coding is learning from one's mistakes repetitively :)

    • @SerBallister
      @SerBallister 3 года назад +9

      @@ximecreature It feels like programming is 10% writing code and 90% of the time fixing it.

    • @NotEnoughAlpacas
      @NotEnoughAlpacas 3 года назад +1

      Absolutely! I have to keep in mind that when I watch someone's video of a project, most of the time they have cut out hours of frustration and trying to find solutions online. Very few of us are these absolute genius's that can figure everything out on our own. Especially when it comes to coding.

    • @MiTheMer
      @MiTheMer 3 года назад +3

      Always keep in mind, programming is 10% coding, 90% debugging ;) This is true in rough industry just like in games development.

  • @241lolololol
    @241lolololol 7 лет назад +556

    this man gives me hope in life.

    • @TheOlian04
      @TheOlian04 7 лет назад +2

      Michael Douglas why?

    • @Texplanations
      @Texplanations 7 лет назад +15

      Because the answer to life universe and everything is 42 which equals to JS

    • @cpdorli
      @cpdorli 7 лет назад +8

      He's using Processing, which is Java based...

    • @EJM07
      @EJM07 6 лет назад +1

      cpdorli java and javascript are a world of a difference. processing.js already tells you its not java.

    • @Nicolas-ir9xy
      @Nicolas-ir9xy 5 лет назад +5

      @@EJM07 There's processing and also processing.js which is a JavaScript port of Processing. The original version of Processing is written in Java.

  • @WiperTF2
    @WiperTF2 3 года назад +36

    I know nothing about Java but just randomly ended up watching this entire video, this was so brilliant! Your fun demeanor and the way you don't take yourself too serious makes a video like this so much fun to watch, and I learned a lot just watching it! Subscribed.

  • @wuzzems2850
    @wuzzems2850 6 лет назад +541

    The Bob Ross of coding

    • @PurushNahiMahaPurush
      @PurushNahiMahaPurush 5 лет назад +37

      If Bob Ross snorted a tablespoon of cocaine before filming

    • @glowiever
      @glowiever 5 лет назад +4

      @@PurushNahiMahaPurush looool tru. he was speeeeedyyyy but I like it!

    • @nullpointerworks4036
      @nullpointerworks4036 4 года назад +31

      There are no errors, just happy little refactoring.. :)

    • @fragly
      @fragly 4 года назад +2

      lmfao

    • @TECHN01200
      @TECHN01200 3 года назад +4

      "Happy little trees", "Happy little clouds", "Happy little mountains" and "beat the devil out of it!"

  • @KelvenOne
    @KelvenOne 5 лет назад +3

    You're the best channel to teach scripting, thank you a lot, it's been months since i started searching for Inverse Kinematics, and now i found this video, your video for sure made it all easy

  • @DD1tspk
    @DD1tspk 7 лет назад +17

    your videos are the best. hilarious and I learn a lot. 10/10 would watch again.

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +8

      thank you!!

    • @olatunjiomisore3461
      @olatunjiomisore3461 7 лет назад +2

      Very right. I am busy right now but gonna put on my mobile and watch in train!

    • @cognasti
      @cognasti 4 года назад

      Me coming back to watch this for the third time..

  • @OleZZ222
    @OleZZ222 4 года назад +1

    Even tough, I'm not familiar with Java, you explained the idea well enough so I can adapt this project for another programming language without rewatch anything. Thank you!

  • @TheWeepingCorpse
    @TheWeepingCorpse 7 лет назад +168

    please do something about constraints, that's the hard part of IK.

    • @PaulGoux
      @PaulGoux 5 лет назад +10

      Check out my implementation, its done in javascript though but it has some detailed notes.
      www.khanacademy.org/computer-programming/kinematics/6459923859341312

    • @plazmotech5969
      @plazmotech5969 4 года назад +6

      @@PaulGoux Cool but it doesn't have constraints...

    • @TheTessatje123
      @TheTessatje123 3 года назад

      github.com/tessavdheiden/tentacle_3d constraint in the base, is that what you mean?

    • @boywithacoin
      @boywithacoin 3 года назад +1

      What do you mean by constraints?

    • @SerBallister
      @SerBallister 3 года назад +8

      @@boywithacoin For bones you have limited angle ranges (e.g. elbows and knees don't go backwards and are limited in how much they can twist) - this makes the IK solve more complicated as several different solutions can exist for certain poses. Think about a punching action, your shoulders, hips, elbows and everything is involved in the arm extension.

  • @3dilson
    @3dilson 3 года назад +3

    Randy would love this video

  • @bombayvega7021
    @bombayvega7021 4 года назад

    This is my first video of ur channel, im not even half way done, and Im already your fan, Subscribed already.

  • @thetruth45678
    @thetruth45678 4 года назад +16

    Whenever he runs into a problem, and has to do a jump cut, my brain inserts the Spongebob meme:
    🌸 _Three hours later..._ 🏵

  • @johnlime1469
    @johnlime1469 3 года назад +4

    I wish I was this enthusiastic about casual programming, like how I was like 5 years ago.

  • @MrJellekeulemans
    @MrJellekeulemans 3 года назад +8

    I'd do the follows thing by keeping track of the end of the tail, and then calling a recursive function like:
    void follow(Seg current, XY mousepos) {
    if(current.parent == null) {
    current.follow(mousepos);
    return;
    }
    follow(current.parent, mousepos);
    current.follow(current.parent);
    }
    Of course updating and drawing also needs to happen, but with this example I wanted to show the power of recursion. It first sets the last segment to follow the mouse, and then back traces to its childs without needing a reference to child segments!

    • @GooverBloodstream
      @GooverBloodstream 2 года назад +1

      I've got the similar thing... actually we do not need both side of parent and child, only need one side when initializing it, and other side to keep follow

  • @Kino-Imsureq
    @Kino-Imsureq 6 лет назад +11

    btw, in order to do heading() function, you can just normalize the vector, and you get all of the results for the axes easily.
    EDIT: idk if this is right but it works for me. I'm giving this to you so your videos will be a lot easier if you try to replace PVector.heading() in 3D.

  • @deefstes
    @deefstes 7 лет назад +14

    14:36 - "There's probably some redundancies in the way I'm thinking about calculating this, as there always are, but let's just do this."
    That right there is why I enjoy these videos so much. Sure, you can always spend more time to think of a more elegant way to code a given task, but then you could spend your whole day refining your thinking and never actually coding. I'm often guilty of that; I waste so much time coming up with better ways of coding the thing that I need to code that I end up taking much too long getting it done.

    • @HermanWillems
      @HermanWillems 3 года назад

      Yes just make it work. Then if you walk against limits you can rewrite the code anyway.

  • @billybollockhead5628
    @billybollockhead5628 2 года назад +1

    Game programmer of 30 years.. never seen this explained in such a fun way.. wish I had this video 20 years ago .. I had to figure it out with boring man books

  • @cutesexybabe69
    @cutesexybabe69 7 лет назад

    I never fully understood the Follow1, Follow2, Follow3 examples in Processing. This is an excellent explanation of them, thanks for that.

  • @pattisimus5944
    @pattisimus5944 Год назад

    I'm so glad I found you on RUclips

  • @derderrr7220
    @derderrr7220 Год назад

    i love the formulation and ease of comprehension of this coding squence

  • @pascalsigel
    @pascalsigel 3 года назад

    That it is not exactly what inverse kinematics is, but is great to see other way to solve similar problem via other ideas.

  • @kenan2386
    @kenan2386 3 года назад +2

    He is one of the reasons why i dont give up

  • @yuxiang3147
    @yuxiang3147 6 лет назад +2

    This channel deserves more subs than PewDiePie

  • @turtle8558
    @turtle8558 3 года назад

    I love this man's enthusiasm

  • @ImErin.
    @ImErin. 2 года назад +1

    This is so cool. Ive been trying to make inverse kinematics work inside of a vr game called Resonite for like a year now and this finally get me to the answer and now it works! Thank you

  • @RS3helper
    @RS3helper 2 года назад

    Software engineer here.. Thank you so much for breaking this down in terms of code.

  • @WikiPeoples
    @WikiPeoples 3 года назад +1

    This guy was born to be a teacher.

  • @justinrose5700
    @justinrose5700 7 лет назад +1

    Thank you so much for doing this. You are a wonderful teacher!

  •  7 лет назад +1

    what did u do at 21:27 that fixed it? i cant see any change in code

  • @Jarko1401
    @Jarko1401 5 лет назад +1

    Great video. Now we are waiting for IK with angle constraints,

  • @DMSG1981
    @DMSG1981 6 лет назад +16

    This whole loop thing somehow defies the nesting idea... Why don't you just call the parent's update() inside of update?
    Same for show().

  • @BlueyMcPhluey
    @BlueyMcPhluey 4 года назад +1

    it's wild to see the code just pour out like this

  • @pianochannel100
    @pianochannel100 3 года назад +4

    This final product looks suspiciously like forward kinematics. You should be able to move the end effector and have the starting position of the chain remain where it is.

  • @simpasalsunda7244
    @simpasalsunda7244 9 месяцев назад

    the approach is a bit different than classic mathematical model of inverse kinematics and feels so realistic to follow and implement on my project, gonna try this but on 3D plane.

  • @dwrobotics2180
    @dwrobotics2180 7 лет назад

    Argh, I've just started getting back to this for my full size humanoid robot. I forgot how much maths was involved. I'm a bit of a dummy when it comes to maths so I'll be watching this one a few time until it clicks back in my mind.

  • @ashish_prajapati_tr
    @ashish_prajapati_tr 3 года назад +1

    amazing

  • @thischurchbasement
    @thischurchbasement 6 месяцев назад

    epic resource for ideas :) big thank

  • @valshaped
    @valshaped 7 лет назад

    This would be really good for budget mocap stuff (like using the position and rotation of a small number of points to plausibly move a 3-D model, for example)!

  • @kevnar
    @kevnar 3 года назад

    Inverse Kinematics + flocking simulation = mindblown

  • @niugytdrdytfrte
    @niugytdrdytfrte 3 года назад

    35:42 what example ?

  • @cameron6464
    @cameron6464 5 лет назад +4

    I perfectly translated this code from processing to p5 and it's completely broken. Why do processing functions behave differently depending on their platform?

    • @nothingnoone8752
      @nothingnoone8752 4 года назад +3

      P5 is only related to processing in spirit, definitely not syntax. Virtually *all* of the math functions work differently, most notably rotation and random()

  • @wolf123450
    @wolf123450 7 лет назад +6

    Good video, but you should be setting the child segment inside the segment class. Just parent.child = this; Doing this will help with portability of the segment class.

  • @Nastomeya
    @Nastomeya 7 лет назад

    This man make we think things easier..

  • @jesielr.lofhagen643
    @jesielr.lofhagen643 2 года назад

    I actually did manage to follow this tutorial, and translated to a game engine, I'm really surprised by that

  • @disdis6127
    @disdis6127 3 года назад +1

    That grey background is so pleasing to eyes,

  • @ventezcamilo
    @ventezcamilo 7 лет назад

    You Sir Are Brilliant!

  • @alexandrosaugo7538
    @alexandrosaugo7538 6 лет назад +3

    That was very good but it wasnt the inv kinematics i expected :)

  • @kstansimit4252
    @kstansimit4252 3 года назад

    you are genius! you are the man!

  • @vvp_id
    @vvp_id 3 года назад

    first i saw you, i remember the "Professor" on a Money Heist Movies.... some kind of genius man....

  • @NotEnoughAlpacas
    @NotEnoughAlpacas 3 года назад +1

    I really wish that the math classes required for my CS degree were CS specific. I would have had so much more interest in the math if it had been applied to code or things like this. Instead it was memorize this formula. Now plug and chug.

    • @coldspade1590
      @coldspade1590 3 года назад +1

      took me forever to realize this but the whole point of that plug and chug was so you would be able to do stuff like say "i have a problem...and i know an equation i can use to solve it".
      one great way to stay motivated is to find fun things to do with the math you learn. simple as rewriting a new equation in code or as complex as making a snake arm thingy move or whatever you want.

  • @reissner1967
    @reissner1967 5 лет назад

    Love watching your videos! I don't have a JavaScript IDE on my iPad Pro, but if I did I would follow you.

  • @terraprint9183
    @terraprint9183 2 года назад

    Helped me to make inverse kinematics in roblox, with only a few changes to work with the different coding language, and the difference in how each segment would be made/represented!

  • @chaitanya1999
    @chaitanya1999 3 года назад

    How do you adjust the speed by which the segment follows the cursor ?

  • @lordofutub
    @lordofutub 3 года назад

    This guy is absolutely building terminator robots in his basement to subjugate humanity 100%.

  • @linaalrashid
    @linaalrashid Год назад

    any one can tell me , what's the using editor ?

  • @quillaja
    @quillaja 6 лет назад +1

    To drive a group of 'snakes' around using steering behaviors/boids would be sweet.

    • @quillaja
      @quillaja 6 лет назад

      Here's a simple example for anyone interested. I implemented my 'snakes' using a singly linked list instead, though. www.quillaja.net/snakes/

  • @furtosstelianemanuel85
    @furtosstelianemanuel85 7 лет назад +1

    i am doing this in netbeans and i dont know what function to replace heading() with ,the Vec2d class doesnt seem to have anything like that ,what should i do ?

    • @furtosstelianemanuel85
      @furtosstelianemanuel85 7 лет назад +1

      nvm i used angle=Math.atan2(ty-a.y, tx-a.x); and it seems to work

    • @furtosstelianemanuel85
      @furtosstelianemanuel85 7 лет назад

      i cant belive it , i just made another java class , droppeD the source code for the pvector class ,and now i can use almost everything from it,THANK YOU

    • @Iconejey
      @Iconejey 6 лет назад

      @@furtosstelianemanuel85 isn't it (tx - a.x) before (ty - a.y)?

    • @furtosstelianemanuel85
      @furtosstelianemanuel85 6 лет назад

      @@Iconejey nope , that seemed strange to me at first aswell

  • @PacVan12
    @PacVan12 Год назад

    I would really like to see you do this again, but then make a character walk with two legs or something

  • @michalski9141
    @michalski9141 3 года назад

    what is he using to make windows and draw lines?

  • @abundantharmony
    @abundantharmony 3 года назад

    What could those backwards rainbow stickers possibly mean?

  • @TsetTsyung
    @TsetTsyung 6 лет назад

    Wow, subbed. Looking forward to watching you fixed point video on the same subject. Many thanks.

  • @chaitanya1999
    @chaitanya1999 3 года назад

    Why do we need a = target vector + dir vector ? We can just directly set a = targetVector

    • @chaitanya1999
      @chaitanya1999 3 года назад

      Got it myself. We need to set the point B on the target and not point A.
      PLUS- We can actually subtract dir from target vector instead of multiplying by -1 then adding to it.

  • @sasuke2910
    @sasuke2910 6 лет назад +1

    Why would you use heading()? Isn't the point of this to explain the maths? This turns it into a Processing specific tutorial where now we have to look for other sources or the Processing source code to write an implementation.

    • @KnakuanaRka
      @KnakuanaRka 6 лет назад

      Jeru Sanders I think it would be pretty easy to implement calculating the heading in other languages, but yeah, that was an oversight.

    • @avananana
      @avananana 6 лет назад

      Mate, if this was about maths, he wouldn't be using Processing to begin with.

    • @PaulGoux
      @PaulGoux 5 лет назад

      Thats what i thought too, but you can do it all withought processing or Pvector. The mouse sets the point for the first heading, take its x and y component separately and calculate the distance to the first point, then just apply dy/dx and do atan(dy/dx) to get the heading angle. Probably otherways of doing this but it works. Heres an example.
      www.khanacademy.org/computer-programming/kinematics/6459923859341312

  • @ipadize
    @ipadize 3 года назад

    Kinematics is also used in CNC machines

  • @Bisskuits
    @Bisskuits 6 лет назад +1

    Hi everyone! This is working well in a 2D environment. But I'm trying to apply that inverse kinematics in a 3D environment. Any idea on how to calculate B based on xyz instead of just xy? Thanks by advance :)

    • @nikkiofthevalley
      @nikkiofthevalley 3 года назад

      Did you figure it out at some point? I have the same problem

  • @baarg8672
    @baarg8672 3 года назад

    34:09 great you've made artistic lazy stroke!

  • @masterjcoz
    @masterjcoz 2 года назад

    the 'we're actually done' xD (16:15)

  • @rishilshah7334
    @rishilshah7334 5 лет назад +1

    Can anyone suggest the same for c++ and opengl

    • @zoltankurti
      @zoltankurti 4 года назад

      I suggest the same for c++ and opengl.

  • @yinghaohu8784
    @yinghaohu8784 5 лет назад

    Is the method described here called: Cyclic-Coordinate Descent ?

  • @veyselsari23
    @veyselsari23 7 лет назад

    You are the best.

  • @That_0ne_Dev
    @That_0ne_Dev 3 года назад

    I would love to just sit in a room with this man and let him talk.

  • @ninjagong
    @ninjagong 7 лет назад +1

    The way it moves reminds me of how claymation moves

  • @grahambo-42
    @grahambo-42 5 лет назад

    I envision the next uber snake game. No more NSEW only. Now you can go at 30,45,60 degree turns.

  • @lepruconx
    @lepruconx 6 лет назад

    how could you combine inverse and forwards kinematics and what would it become?

    • @melficexd
      @melficexd 6 лет назад

      Apply forward kinematics then inverse on the calculated pose, that's the normal approach. IK is usually used to fix FK into proper positioning

    • @PaulGoux
      @PaulGoux 5 лет назад

      Something like this perhaps, please note its a work in progress.
      www.khanacademy.org/computer-programming/kinematics/6459923859341312

  • @RickTrajan
    @RickTrajan 3 года назад +1

    When I was just looking how to use inverse kinematic in programming, and instead realize the importance of a goal.

  • @KevysNotHeavy
    @KevysNotHeavy Месяц назад

    I actually wrote myself an IK system first try in Godot w/o much hassle, this is a test (me hoping) of your ability (that you put a magnet property bc mine is barren of it)

  • @tagaiismailov4235
    @tagaiismailov4235 4 года назад

    Please please please make DS and Algorithm series!!

  • @coreyredmon5611
    @coreyredmon5611 7 лет назад

    If you wanted to make it so that it takes a second to catch up to the mouse, would you limit the magnitude of the target vector of the head?

    • @TheCodingTrain
      @TheCodingTrain  7 лет назад +1

      Love this idea! You could also look at my "seek" example.

    • @coreyredmon5611
      @coreyredmon5611 7 лет назад

      I made it in JavaScript: redmoncoreyl.github.io/snake/

    • @olatunjiomisore3461
      @olatunjiomisore3461 7 лет назад

      Nice work on the link!
      This is very close to my project. Please can you share some experience on this with me. My email address is ootsorewilly@gmail.com.
      I expect your email for conversation.

    • @olatunjiomisore3461
      @olatunjiomisore3461 7 лет назад

      Hi Corey, I wonder if you got my last reply so I had to hit a reminder. I am currently working on modelling Inverse Please I will be glad if you offer to discuss with me. My email is ootsorewilly@gmail.com.

    • @sambeard4428
      @sambeard4428 4 месяца назад

      You could interpolate between the current position and the target position using some constant (let's say 1/10th) and then use that to update to. If you do this 10 times a second (not sure if you have any control over the framerate/ update rate) you'll have it follow you with a second delay

  • @hattybin
    @hattybin 6 лет назад

    Is it possible to incorporate a z axis?

    • @Fool672
      @Fool672 6 лет назад

      Mike Hatfield For sure, it would just need some calculus if you wanted the segments to retain their volume

  • @fikriaziz3194
    @fikriaziz3194 4 года назад

    how can i know this guy at 2020
    so awesome !!!

  • @mrpantsful
    @mrpantsful 7 лет назад

    So much love

  • @kingdavid_p
    @kingdavid_p 3 года назад

    Does someone know what the benefit of him using java instead of something like python which is what most use for IK?

    • @VRNC-kn5tf
      @VRNC-kn5tf 2 месяца назад +1

      Being able this use this IDE

  • @deter4122
    @deter4122 4 года назад

    What font is he using?

  • @bungercolumbus
    @bungercolumbus 5 месяцев назад +1

    Just hit the gold mine

  • @foxfyre3600
    @foxfyre3600 7 лет назад +69

    This is like my 'rope' simulation I made many years ago. I did not know it was called Inverse Kinematics back then.
    I used an array for the coordinates, the segments were at maximum a pixel apart.
    A mouse cursor/box/reticle, when clicked would grab a segment (search through and find a segment inside the cursor)
    While dragged, the algorithm would make the 'grabbed' segment follow the mouse.
    Let's say index 25 was grabbed. It would loop both directions. 24 follows 25, 23 follows 24 and so on back to index zero. Then 26 follows 25 and 27 follows 26 and so on to end of the rope.
    It behaved similar to yours, more like cotton thread than rope. Perhaps some damping might work?
    I am this.this close to subscribing and downloading P5, is your setup unique or default? Link video to setup? I use Windows 7

    • @Yourrrr
      @Yourrrr 7 лет назад

      fox fyre3 1. this comment was so unnecessary and lengthy lol why? who asked??
      2. one of his first videos shows his work space set up

    • @adamthedog1
      @adamthedog1 7 лет назад +78

      Unique Antoinette, I thought it was an interesting comment. No need to rag on someone for a relatively long comment.

    • @Garfield100
      @Garfield100 7 лет назад +36

      Unique Antoinette, who asked you :P I thought it was a nice comment.

    • @clonkex
      @clonkex 5 лет назад +15

      @@Yourrrr Why do you have a problem with long comments? Nothing wrong with it. They're called comments for a reason. You don't ask someone for a comment, they just make it.

    • @vaibhavpandey6640
      @vaibhavpandey6640 3 года назад

      @@adamthedog1 yeah

  • @anuragsati4825
    @anuragsati4825 7 лет назад

    Can you do something other than p5.js

  • @TheCatull
    @TheCatull 3 года назад

    You rock!

  • @자방랑-k5s
    @자방랑-k5s 6 лет назад

    Thank you .

  • @yggdrasilthousandsand3124
    @yggdrasilthousandsand3124 7 лет назад

    3:20 "jadi jada jada" this took away my last doubts about your broad general IT knowledge.

  • @lt4376
    @lt4376 3 года назад

    Motivating

  • @roizdoci
    @roizdoci 7 лет назад +1

    I guess you can offset the alignment and make a lot of "fishes" following the mouse

  • @PacVan12
    @PacVan12 Год назад

    This dude is so cool

  • @qwertoony4243
    @qwertoony4243 3 года назад

    THIS GUY IS BIG SMART

  • @tx6723
    @tx6723 6 лет назад

    Can you do this in p5

    • @PaulGoux
      @PaulGoux 5 лет назад

      Yes, ive done it in khan academy code environment, to convert it to p5 just rename the funtion calls and create a setup function for the canvas the rest is exactly the same. Ie if you have
      Var x = function(){};
      It becomes function x(){}; in p5
      Thats it, that easy.
      Heres the link, please note its not entirely finished
      www.khanacademy.org/computer-programming/kinematics/6459923859341312

  • @MrDimonsky
    @MrDimonsky 5 лет назад

    Why do we again, in the very beginning, make a statement ,that every next segment has an angle related to X, but not related to previous segment? In robotics with real motors it is actually so. The drive controller has no idea about orientation of the linked motor related to X. It has only a hardlink to the previous segment(s), and therefore the angle related X axis at every time moment is an unknown value, available only on a master-controller level - the controller that manages the motion of the whole "arm" can calculate it.

  • @angelcaru
    @angelcaru 5 лет назад +1

    I changed the follow() function.
    Now it looks like this:
    void follow(PVector target){
    follow(target.x,target.y);
    }

    void follow(float tx,float ty){
    PVector target = new PVector(tx,ty);
    PVector dir = PVector.sub(target,a);
    angle=dir.heading();

    dir.setMag(len);
    dir.mult(-1);

    a=PVector.add(target,dir);

    if(parent!=null){
    parent.follow(a);
    }

  • @justinbuzon2225
    @justinbuzon2225 6 лет назад +2

    hahah you're great. Thanks for this. xD

  • @numero7mojeangering
    @numero7mojeangering 6 лет назад +2

    your anlge is just:
    atan2(x2 - x1, y2 - y1)

  • @phucwall121
    @phucwall121 3 года назад

    he's really funny inside and outside :))

  • @Kabodanki
    @Kabodanki 6 лет назад +1

    Memory efficient ? Not really in the way you explainded, the last object get garbage collected, and the new object is allocated, no waste, just a slightly more computation.

  • @dave6012
    @dave6012 3 года назад

    Perlin noise: *exists*
    Daniel: 👁👄👁