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.
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.
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.
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.
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...
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));
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!
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!
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).
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)?
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.
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?
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
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.
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?
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.
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.
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.
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
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.
This channel is gold!
Calling him gold does not do justice. Waaay better than that.
He is 100% rainbow.
A programmer's Klondike!
Currently helping a student out with making a puppet in Processing for a very open ended assessment, this has helped a bunch, thankyou!!
I wish Daniel was compensated equivalently for how much he has helped programming initiates like me.
You make learning so easy, I'm watching thse with a smile on my face.
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.
I love you man, been wanting to learn this for a while :D
Hi Jabrils!
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.
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.
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.
Oh awesome idea!
Fourier Series!!!
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...
You could use curveVertex() and make It extra smooth!
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
hoo ooy || i second this.
it was fun
just wait I do this in a video I'm about to release and it's kind of a disaster.
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));
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!
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!
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).
thanks for this great answer!
Amazing, You are the best.
Super cool!
13:37 Would it also work if you didn't copy, but instead just made another reference to the same PVector object?
Awesome , Bur taking that parent angle and self angle is little bit confusing
Yes, good feedback, thank you!
hahahaha I already watched codemath video series about inverse kinematic, but I'll watch this one too :)
Please do coding challenge feeding frenzy, its like the snake game but uses mouse!
Man you should build the segment link with an LSystem! You would have a tree floating in the wind!
Love the shirt
The intro is not recorded post-CC! Unbelievable! ;D
Why copy parent.b to this.a instead of just having it be reference to the same vector?
Excellent point, I think this would be a good optimization.
wow we can make it like an object (warm swim water) for ecosystem simulation
Are you doing this using JAVA only or there's another video with the same thing using MATLAB but without using the robotics toolbox??
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)?
Yes, that is constructor overloading.
Based on variable type and quantity is decides which constructor to call.
28:35 the way it moves reminds me of mimi from super paper mario
Hey bro, did you study Computer-Science or did you teach you yourself? And for how long do you code? :D
Is your T -shirt in any way related to FRC team #148?
I get so confused and have to stop the video and think about everything all over again because Daniel himself gets confused :D
haha
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.
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?
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.
Processing using Java as base language, but much more simpler
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
Is it possible to demostrate how to draw an isosuface with processing? if it needs other libraries, it's ok.
you should really consider using recursion for this kind of stuff
Aman Mahendroo agreed. Especially for updating and rendering the segments.
is there a 3d kinematics example?
can this be done with python?
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.
Make it dance to input audio, similar to clapping flapping bird :)
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?
indeed he could, this is no where as efficient as things could be :P
Yes, I should have really done this.
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.
How can I download this P5 application you are using ?
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.
yes indeed!
how come these are not on your github >:(
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.
can I know on what platform or what ide you R using for all that and which language u R using
He's using processing a framework made on the top of Java, of course the lenguage he's using is Java
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
Yes, this is a good point, if I were more thoughtful about what the segments do, I could create a walking simulation, etc.
I'm struggling heavily
He's wearing the same shirt as in his polar coordinates video :O
They were made one after another!
i love java
Is there a version of this for Python? Or C++?
Wolf Hound yes you can actually just switch to Python and some other languages too in the top right of the processing ide program
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.
Bryce Young
Or you could use SFML or SDL or some other library
28:30 Oh no it's suffering
is it just me, or every time he writes "angle", he's actually writing "ayk"?
das mah d i c c
This is java, right?
or javascript
it's a java library called Processing
thanks
WHERE MY NOTIFICATION SQUAD AT
donno