1:20 oh my god this slowed down and then sped up visualization was amazing a picture is worth a thousand words, and a video can be worth a thousand pictures :D
Thank you for the video. I've been trying to figure out inverse kinematics for a long time and you helped a lot. I was able to reproduce your Processing in Python. I hope to eventually implement it in Godot and try to add paws to the fish.
You’re welcome. I’m glad it was helpful. Which graphics library do you use with Python? I’ve played with Godot a little bit, but mostly use Unity for game development.
I should have guessed :) I've used the Python version myself a little bit, but I'm so used to Java in the Processing environment that when I switch languages in Processing I make all sorts of mistakes. It's like I need to use a different IDE for each language so my brain knows what language I'm using.
I think it would be really cool to combine this technique with something like Boid's algorithm and get whole flocks of creatures moving around like this!
Thanks! You're right that there's a strong resemblance to tadpoles. I tried to lean away from the look because it's too easy to get misinterpreted as other large headed swimmy things and I didn't want to get in trouble with the TH-cam algorithm :)
This is a great video. I saw that you mentioned working in other languages. You might find better traction on youtube swapping out java for a more popular language/framework. For example, Javascript with p5.js. I'm not super familiar with p5 but I'm sure that it has all of the features needed to recreate this concept with it. This is just one example though. Either way, this was fun to watch.
Thanks for the comment and the suggestion. I've programmed a reasonable amount in Javascript, but haven't taken the time to work with p5.js much. I've been tempted to use C++, but installing it for graphics might be a pain for viewers.
I watched several videos, and read a couple of blog posts, before putting this together. But you one of them was argonaut's video - good spotting. Of the techniques I looked at this one seemed the simplest to code.
Thanks for the reminder. I regularly switch between languages, not all of which have a TWO_PI or use a different convention for formatting constants. So, I find it easier to use 2*PI then to try to remember which form the constant takes. I'm curious if you know if 2*PI would be precomputed when the Java is compiled into byte-code. I couldn't find a definitive answer.
@@programmingchaos8957 As documented it is the number 6.28... and in Java there are no "#define'd constants" only "uppercase variables", so it is at worst a variable fetch. But my point is more the use of the modulo instead of iterating additions/subtractions.
@programmingchaos8957 As documented it is the number 6.28... and in Java there are no "#define'd constants" only "uppercase variables", so it is at worst a variable fetch. But my point is more the use of the modulo instead of iterating additions/subtractions.
Ah, that is a good point. My personal problem is that not all languages handle modulo with decimals (or it's a newer feature). So, in a given language I can't always remember if its valid or not - hence relying on addition/subtraction.
Hi. This is a pretty well known technique that's been around for quite a while. I thought having a version that stepped though the programming could be useful for some viewers. To be clear almost none of the algorithms I present (or that are in most TH-cam videos) are completely original. For example, my previous video was on genetic algorithms, which go back at least to John Holland's work in the 1970's. I'm just trying to present algorithms in a way that is helpful to the viewers. I have to say that argonaut's video is very impressive, and possibly does a better job of illustrating the idea than my own - thanks for pointing it out.
Amazing! Will work with you soon, for Research in machine Learning Algorithm. Thank you!
I'm glad it was helpful. You're very welcome.
This is all so clear to me. You should be a teacher. Thanks Terry, I always enjoy your videos.
Wow, thanks! I am a teacher, so it’s great to hear that I’m doing a decent job at it.
1:20 oh my god this slowed down and then sped up visualization was amazing
a picture is worth a thousand words, and a video can be worth a thousand pictures :D
Thank you for the comment! Coding that example was a last minute decision. So, I’m really glad to hear it was useful.
Thank you for the video. I've been trying to figure out inverse kinematics for a long time and you helped a lot.
I was able to reproduce your Processing in Python.
I hope to eventually implement it in Godot and try to add paws to the fish.
You’re welcome. I’m glad it was helpful. Which graphics library do you use with Python? I’ve played with Godot a little bit, but mostly use Unity for game development.
@@programmingchaos8957 I use a mod in the Processing program, it's called "Python Mode for Processing", by Jonathan Feinberg
I should have guessed :) I've used the Python version myself a little bit, but I'm so used to Java in the Processing environment that when I switch languages in Processing I make all sorts of mistakes. It's like I need to use a different IDE for each language so my brain knows what language I'm using.
I think it would be really cool to combine this technique with something like Boid's algorithm and get whole flocks of creatures moving around like this!
That’s a great idea! It should give really interesting results depending on the length of the creatures.
They seem to all look a lot like tadpoles. That's very nice!
Thanks! You're right that there's a strong resemblance to tadpoles. I tried to lean away from the look because it's too easy to get misinterpreted as other large headed swimmy things and I didn't want to get in trouble with the TH-cam algorithm :)
@@programmingchaos8957 Yeah, hopefully the algorithm will be deterred by the eyes and rainbow colors that most of them have.
Thanks for answering man , for the enviroment,
I am going back to get the whole knowledge i can get from this video..
I hope it you get a lot out of it. I was pretty happy with how the creature movement ended up looking.
Thank you this was amazing
I’m really glad you enjoyed it. Happy programming.
going to try to implement this in 3D haha
Great idea! Let me know how it turns out.
This is a great video. I saw that you mentioned working in other languages. You might find better traction on youtube swapping out java for a more popular language/framework. For example, Javascript with p5.js. I'm not super familiar with p5 but I'm sure that it has all of the features needed to recreate this concept with it. This is just one example though. Either way, this was fun to watch.
Thanks for the comment and the suggestion. I've programmed a reasonable amount in Javascript, but haven't taken the time to work with p5.js much. I've been tempted to use C++, but installing it for graphics might be a pain for viewers.
@@programmingchaos8957Which graphics library u intend to use with c++
Good, but too small for a mobile screen.
Thanks! I’d like to make a mobile version, but I don’t see a good way to handle the programming portion.
for a second I thought this was a follow up from argonaut's video, the creatures are very similar! Was their video an inspiration for this exercise?
I watched several videos, and read a couple of blog posts, before putting this together. But you one of them was argonaut's video - good spotting. Of the techniques I looked at this one seemed the simplest to code.
Nice, but at 26:36, may I suggest a simple: `(TWO_PI + angle % TWO_PI) % TWO_PI;`
Thanks for the reminder. I regularly switch between languages, not all of which have a TWO_PI or use a different convention for formatting constants. So, I find it easier to use 2*PI then to try to remember which form the constant takes. I'm curious if you know if 2*PI would be precomputed when the Java is compiled into byte-code. I couldn't find a definitive answer.
@@programmingchaos8957 As documented it is the number 6.28... and in Java there are no "#define'd constants" only "uppercase variables", so it is at worst a variable fetch. But my point is more the use of the modulo instead of iterating additions/subtractions.
@programmingchaos8957 As documented it is the number 6.28... and in Java there are no "#define'd constants" only "uppercase variables", so it is at worst a variable fetch. But my point is more the use of the modulo instead of iterating additions/subtractions.
Ah, that is a good point. My personal problem is that not all languages handle modulo with decimals (or it's a newer feature). So, in a given language I can't always remember if its valid or not - hence relying on addition/subtraction.
This was borrowed/stolen from the work published here 4 month ago:
th-cam.com/video/qlfh_rv6khY/w-d-xo.html&
Hi. This is a pretty well known technique that's been around for quite a while. I thought having a version that stepped though the programming could be useful for some viewers. To be clear almost none of the algorithms I present (or that are in most TH-cam videos) are completely original. For example, my previous video was on genetic algorithms, which go back at least to John Holland's work in the 1970's. I'm just trying to present algorithms in a way that is helpful to the viewers. I have to say that argonaut's video is very impressive, and possibly does a better job of illustrating the idea than my own - thanks for pointing it out.