Coding Challenge #64.1: Forward Kinematics

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 92

  • @guzman-do
    @guzman-do 7 ปีที่แล้ว +78

    This channel is gold!

    • @kuskus_th13
      @kuskus_th13 7 ปีที่แล้ว +4

      Calling him gold does not do justice. Waaay better than that.

    • @_inabox
      @_inabox 7 ปีที่แล้ว +15

      He is 100% rainbow.

    • @Kitulous
      @Kitulous 6 ปีที่แล้ว

      A programmer's Klondike!

  • @user-ri7fo6tp5e
    @user-ri7fo6tp5e 5 ปีที่แล้ว +10

    I wish Daniel was compensated equivalently for how much he has helped programming initiates like me.

  • @bhuhuhuhuhbuhuh
    @bhuhuhuhuhbuhuh ปีที่แล้ว

    Currently helping a student out with making a puppet in Processing for a very open ended assessment, this has helped a bunch, thankyou!!

  • @jgiuguigiugigiugugiuuig4050
    @jgiuguigiugigiugugiuuig4050 3 ปีที่แล้ว +2

    You make learning so easy, I'm watching thse with a smile on my face.

  • @patplunkett7337
    @patplunkett7337 7 ปีที่แล้ว +2

    I really enjoy watching these! I love your enthusiasm, and I'm learning a lot! Thank you so much for taking the time to do your live streams and edit these videos! Your students are really fortunate to have a professor like you.

  • @akinoreh
    @akinoreh 7 ปีที่แล้ว +18

    19:40 gave me a weird clock idea. Hands can be lines connected to each other. Minute spinning at the tip of hour, and second spinning at the tip of minute. I wonder how that would look like.

  • @jabrilsdev
    @jabrilsdev 7 ปีที่แล้ว +8

    I love you man, been wanting to learn this for a while :D

    • @Kitulous
      @Kitulous 5 ปีที่แล้ว +1

      Hi Jabrils!

  • @realcygnus
    @realcygnus 7 ปีที่แล้ว +4

    superb content !.....as per usual......btw no BIG worries about going too far off track.......imo your frequent tangents are just a consequence of unscripted/real-time programming....& its crucial for the flavor/level of your channel.......in other words don't change a thing.

  • @RedsBoneStuff
    @RedsBoneStuff 7 ปีที่แล้ว +5

    13:37 Would it also work if you didn't copy, but instead just made another reference to the same PVector object?

  • @hooooy566
    @hooooy566 7 ปีที่แล้ว +39

    daniel, you need to bring the time limit back. that was a lot of fun watching you geting disturbed by the time left. good show

    • @RoddyDev
      @RoddyDev 7 ปีที่แล้ว +3

      hoo ooy || i second this.
      it was fun

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +23

      just wait I do this in a video I'm about to release and it's kind of a disaster.

  • @mukulbarai82
    @mukulbarai82 7 ปีที่แล้ว +2

    Daniel, thanks a lot for your great videos on programming. Most of your programming videos are on the basis of computational geometry and graphics. In your videos, you have shown that programming is not a context of boring. It is a topic of fun and mystery. Now it would be helpful for me, if you kindly explain the sequence of topic that I should follow to be a programmer like you. I want to be expert in algorithm and computational geometry based program. Like you so much...

  • @kevnar
    @kevnar 2 ปีที่แล้ว +1

    You really only need PVector b. The length and angle are inherent in the vector relative to 0, 0. If you just supply b and translate a.x and a.y to 0, 0 before drawing, you have the length and angle already.

  • @markoftheland3115
    @markoftheland3115 7 ปีที่แล้ว +5

    You could use curveVertex() and make It extra smooth!

  • @DMSG1981
    @DMSG1981 6 ปีที่แล้ว +1

    Another reason for the child reference: Give the child in the constructor, not the parent, and the code looks like this:
    Segment tentacle = null;
    for (int i = 0; i < 20; i++) {
    tentacle = new Segment(tentacle, 10, 0);
    }
    tentacle = new Segment(tentacle, 10, radians(-90));

  • @michalbotor
    @michalbotor 6 ปีที่แล้ว

    i like this topic a lot!
    i think, that if we changed the linked list data structure into a tree data structure, we might be able to animate something resembling a swaying tree. and using what we already have we might be able to add something like a grass too.
    neat!

  • @brycefrank6107
    @brycefrank6107 7 ปีที่แล้ว +2

    When he uses two constructor functions, how does the program know which one is called when they both have the same name. Does it have to do with the types of variables included when seg2 is created (at around 11:30)?

    • @GenAITutorials
      @GenAITutorials 7 ปีที่แล้ว +2

      Yes, that is constructor overloading.
      Based on variable type and quantity is decides which constructor to call.

  • @lfernandods
    @lfernandods 7 ปีที่แล้ว

    Amazing, You are the best.

  • @dougboblas
    @dougboblas 7 ปีที่แล้ว +3

    This is such an amazing demo. It is so useful to be able to see the code develop piece by piece directly reflected alongside the corresponding visual results
    I only know a bit about coding so forgive me if my question is dumb. Is this a recursive kind of solution with the function calling itself?
    This video is so exciting because the kinematics you derive is a fundamental component of my artwork for which I use a kinematics application in a physics engine and I create dynamic constrained chaotic behaviour with it.
    Thank you for your efforts!

    • @redhen
      @redhen 7 ปีที่แล้ว +3

      Not a dumb question at all. This is what's called 'object orientated', rather than using a truly recursive function. That is, he's creating an object called 'Segment', and then just creating lots of Segment objects that can refer to one another for some of their properties (e.g. angle, origin position). If it were truly recursive, then there would need only be one object, which would *call itself* in order to create itself again with new parameters (so, not just new instances of an object prototype).

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +1

      thanks for this great answer!

  • @wfcreations
    @wfcreations 7 ปีที่แล้ว +1

    hahahaha I already watched codemath video series about inverse kinematic, but I'll watch this one too :)

  • @cabbage4254
    @cabbage4254 7 ปีที่แล้ว

    Super cool!

  • @alekmoth
    @alekmoth 7 ปีที่แล้ว +7

    Why copy parent.b to this.a instead of just having it be reference to the same vector?

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +10

      Excellent point, I think this would be a good optimization.

  • @nagesh007
    @nagesh007 2 ปีที่แล้ว

    Awesome , Bur taking that parent angle and self angle is little bit confusing

  • @osenseijedi
    @osenseijedi 7 ปีที่แล้ว

    Man you should build the segment link with an LSystem! You would have a tree floating in the wind!

  • @AvrilSk8erboi27
    @AvrilSk8erboi27 7 ปีที่แล้ว +1

    Please do coding challenge feeding frenzy, its like the snake game but uses mouse!

  • @TobyDillman
    @TobyDillman 7 ปีที่แล้ว +1

    Love the shirt

  • @SAMANS
    @SAMANS 7 ปีที่แล้ว

    can this be done with python?

    • @ximecreature
      @ximecreature 4 ปีที่แล้ว

      Of course !
      Processing has a python mode if you want to try it out. It's on py.processing.org
      Only difference is that python doesn't do method (or constructor) overload, but there are ways around it, for example optional parameters, another method, or declaring the only constructor with positions.

  • @midomostafa5751
    @midomostafa5751 2 ปีที่แล้ว

    Are you doing this using JAVA only or there's another video with the same thing using MATLAB but without using the robotics toolbox??

  • @superbem1
    @superbem1 3 ปีที่แล้ว

    is there a 3d kinematics example?

  • @GABRIELFILMSTUDIOS
    @GABRIELFILMSTUDIOS 7 ปีที่แล้ว

    The intro is not recorded post-CC! Unbelievable! ;D

  • @ningwang3780
    @ningwang3780 7 ปีที่แล้ว

    Is it possible to demostrate how to draw an isosuface with processing? if it needs other libraries, it's ok.

  • @TF2Gaming101
    @TF2Gaming101 6 ปีที่แล้ว

    28:35 the way it moves reminds me of mimi from super paper mario

  • @thecongo8505
    @thecongo8505 3 ปีที่แล้ว

    How can I download this P5 application you are using ?

  • @coreyredmon5611
    @coreyredmon5611 7 ปีที่แล้ว

    At 30:00, you already had a reference to parent in the second constructor so you didn't really need the t variable as an input; you could have gotten it from parent.

  • @TheRandomSpectator
    @TheRandomSpectator 7 ปีที่แล้ว

    So I'm still learning the basics (more or less) of java in school, so I'm trying to understand a few things. When you write a new method, why don't you have to write "public" at the beginning of it (I've noticed you just write "void"). Also, do you have to import a special library to use the set up and draw functions (i.e. how can I take what I'm seeing here and use it in Eclipse), or is that a default function of the Processing IDE?

    • @stumcgorman5527
      @stumcgorman5527 7 ปีที่แล้ว

      He's using an environment called processing. I think he has a few videos on how it works or you could go to the processing website to read about it.

    • @bayusetiaji161
      @bayusetiaji161 7 ปีที่แล้ว

      Processing using Java as base language, but much more simpler

    • @YohanHarvey
      @YohanHarvey 7 ปีที่แล้ว

      public just tells you who can use the thing, you can use other things like private and protected, leaving it blank means its automatically public, this isnt just for methods, but classes, variables etc.
      I don't know much about processing but if you want to draw stuff the easiest way would probably be using a jpanel in a jframe and using the paint function

  • @krunchykrisp7003
    @krunchykrisp7003 7 ปีที่แล้ว

    I get so confused and have to stop the video and think about everything all over again because Daniel himself gets confused :D

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว

      haha

    • @anteconfig5391
      @anteconfig5391 7 ปีที่แล้ว

      lol. I think your paying attention too hard...
      Don't worry I can never really find the sweet spot either. I'm always rewinding videos to see what I missed.

  • @takkir4123
    @takkir4123 5 ปีที่แล้ว

    wow we can make it like an object (warm swim water) for ecosystem simulation

  • @eyalmeltser4296
    @eyalmeltser4296 7 ปีที่แล้ว

    Is your T -shirt in any way related to FRC team #148?

  • @DowzerWTP72
    @DowzerWTP72 7 ปีที่แล้ว

    When you open the new tab to add the class Segment, what file type does that become? Because I am not using the same editor as you, and so I have to create other files and link them, but I am not sure which file extension to save this new file which contains 'class Segment...' inside.

  • @proude7337
    @proude7337 7 ปีที่แล้ว

    Hey bro, did you study Computer-Science or did you teach you yourself? And for how long do you code? :D

  • @LarsGavris
    @LarsGavris 7 ปีที่แล้ว

    Couldn't you do:
    a = parent.b; (without the .copy)
    Wouldn't that make "a" refer to exactly the same PVector as "b" of the parent?
    Thus you wouldn't have to update that?

    • @legotechnic27
      @legotechnic27 7 ปีที่แล้ว

      indeed he could, this is no where as efficient as things could be :P

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว

      Yes, I should have really done this.

  • @ebuddiess
    @ebuddiess 7 ปีที่แล้ว

    can I know on what platform or what ide you R using for all that and which language u R using

    • @netoskin
      @netoskin 7 ปีที่แล้ว

      He's using processing a framework made on the top of Java, of course the lenguage he's using is Java

  • @woulfhound
    @woulfhound 7 ปีที่แล้ว

    Is there a version of this for Python? Or C++?

    • @mrfincher
      @mrfincher 7 ปีที่แล้ว

      Wolf Hound yes you can actually just switch to Python and some other languages too in the top right of the processing ide program

    • @KayOScode
      @KayOScode 7 ปีที่แล้ว

      If you want to make this in c++, you will have to start by making a render engine. Most people watching this wouldnt even know where to begin when it came to making one of those.

    • @mateface1313
      @mateface1313 7 ปีที่แล้ว +1

      Bryce Young
      Or you could use SFML or SDL or some other library

  • @JustMeJustADude
    @JustMeJustADude 7 ปีที่แล้ว

    Isn't this just the segments/joints and no kinematics? Shouldn't just the first segment move and the rest respond dynamically to its movement? This is just random movement or am i wrong

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +1

      Yes, this is a good point, if I were more thoughtful about what the segments do, I could create a walking simulation, etc.

  • @randomguy4738
    @randomguy4738 4 ปีที่แล้ว

    how come these are not on your github >:(

  • @haideralipunjabi
    @haideralipunjabi 7 ปีที่แล้ว

    Make it dance to input audio, similar to clapping flapping bird :)

  • @amanmahendroo1784
    @amanmahendroo1784 7 ปีที่แล้ว

    you should really consider using recursion for this kind of stuff

    • @KayOScode
      @KayOScode 7 ปีที่แล้ว

      Aman Mahendroo agreed. Especially for updating and rendering the segments.

  • @darthtorus9341
    @darthtorus9341 7 ปีที่แล้ว

    He's wearing the same shirt as in his polar coordinates video :O

    • @TheCodingTrain
      @TheCodingTrain  7 ปีที่แล้ว +1

      They were made one after another!

  • @Glyn-Leine
    @Glyn-Leine 7 ปีที่แล้ว

    couldn't you have just used two vectors? one vector for its base position, and the other vector for the b position. and then length will be the magnitude of vector b, and angle would be the angle of vector b.

  • @deadAdzy
    @deadAdzy 2 หลายเดือนก่อน

    I'm struggling heavily

  • @lxjuani
    @lxjuani 6 ปีที่แล้ว

    28:30 Oh no it's suffering

  • @mathgamer0537
    @mathgamer0537 7 ปีที่แล้ว +3

    i love java

  • @InFlamesGrowTopia
    @InFlamesGrowTopia 7 ปีที่แล้ว

    This is java, right?
    or javascript

  • @cabbler
    @cabbler 7 ปีที่แล้ว

    das mah d i c c

  • @tomasmejia6370
    @tomasmejia6370 7 ปีที่แล้ว

    is it just me, or every time he writes "angle", he's actually writing "ayk"?

  • @charlesst.george9845
    @charlesst.george9845 7 ปีที่แล้ว +1

    WHERE MY NOTIFICATION SQUAD AT

    • @ICEreal
      @ICEreal 7 ปีที่แล้ว +2

      donno