You know you're doing it right when you get two pictures on the first few rows of google images.
@mikeb2575
7 жыл бұрын
With porn I feel attracted and my wife feels repulsion !!! ; )
@TheWeepingCorpse
7 жыл бұрын
i'll never complain, your videos are stunning.
@RedsBoneStuff
7 жыл бұрын
What a Parker Square of a project. (the chosen ones will understand)
@theheckl
7 жыл бұрын
almost everyone here is a chosen one xD
@prtysh
7 жыл бұрын
clearly not me.
@lorca3367
7 жыл бұрын
Pratyush Raman you need to watch numberphile
@steveburrus9347
6 жыл бұрын
What the hell is "Parker Square" anuyway?
@angelcaru
6 ай бұрын
Who tf chose me?
@siddharth_singh9
7 жыл бұрын
I think you should code PACMAN as a challenge.
@kevnar
6 жыл бұрын
If you made all particles repel each other, and also repel the walls around the screen, and kept adding new ones every frame, they would eventually reach some strange gaseous equilibrium in the 2D space.
@DustinRodriguez1_0
7 жыл бұрын
Those images you showed of strange attractors are not produced in any way even close to what you describe. There is no 'attraction' going on beyond the fact that the equations are nonlinear, sensitive to initial conditions, and through repeated iteration of the function on its own outputs they tend to concentrate in particular regions. There is a great book available online which contains tons of code (unfortunately in very antiquated BASIC, though some similarly antiquated C code is available as well) called 'Strange Attractors: Patterns in Chaos' by Julien Sprott. Relatedly, if you ever need new ideas for graphical projects like you do on this channel, check out some of Clifford Pickover's older books like 'Computers and the Imagination' or 'Computers, Patterns, Chaos, and Beauty'. They contain loads of little projects, most with example code.
@TheCodingTrain
7 жыл бұрын
Thanks for this important feedback.
@k1monfared
5 жыл бұрын
E.g. particles themselves could be the attractors and repellers.
@marcelv7641
3 жыл бұрын
Watching this video at 0.5x speed = 100% education + 150% drunken Daniel. Your content is always worth the time.
@beaverjoe9171
6 жыл бұрын
So many great effect learned from this tutorial.
@ramseybeing
5 жыл бұрын
Hey Dan can you recreate centripetal (inwinding) and centrifugal (outwinding) forces as a coding challenge, and spirals and vortexes? Btw thanks for your coding mentorship!
This is my favorite video of yours. Thank you for bringing this awesomeness to my life.
@grmmhp
7 жыл бұрын
that live stream was crazy.
@ariseyhun2085
7 жыл бұрын
I think this kind of thing would be better with processing honestly. I wanna learn more about processing!
@TheCodingTrain
7 жыл бұрын
yes, I agree this example is a bit more suited to Processing.
@Tsskyx
7 жыл бұрын
If I make a particle and let it gravitate towards a random attractor, the effect should be that of a pendulum, but instead the particle gets launched away at an insane speed. Is there an error?
@Tsskyx
7 жыл бұрын
I tried 1/(abs(x)+100)^2, which does seem to work well, but it's still rather erratic. I'd like the movement of the particle to be that of a pendulum, so that when I launch it at an attractor, it doesn't come back with even more (or less) speed. I know that that's not how it really works in reality, but I would like that.
@kuskus_th13
7 жыл бұрын
I wasn't really watching the stream when you were doing that, because I was playing games but now I will definitely watch the challenge
@kuskus_th13
7 жыл бұрын
but I surely did mess with your Google document if you remember that... Kappa
@fergusjanissen226
7 жыл бұрын
15:39 Ill take Ham tickets too!! haha using your tutorials for college study and LOVE Hamilton too!
@mhmdalharbi2370
7 жыл бұрын
It's like a dust overlays!
@stephenmcconnell7868
3 жыл бұрын
Don’t know if you have heard of the “Lenord Jones Potential”. It is used in doing particle attraction/repulsion problems in Molecular Dynamics.
@forwardphysx6167
7 жыл бұрын
thats exactly what I was thinking, like perfect electron shells... Do you think you could make a realistic atom simulation with this?
@__jan
5 жыл бұрын
classical atom models are nothing like what atoms are in the real world. it's a mesh of probability of where the electron could be, not where it actually is
@redhen
7 жыл бұрын
This is less coding than flirting. Very successful, Platonic flirting. X
@chanasiegel2706
4 жыл бұрын
You are amazing (as usual)!
@glaukpataj9521
8 ай бұрын
I'm a bit late with the challenge, but here I am. I tried doing this in C++ with some game library (raylib for those interested) and I tried doing exactly the same approach with the same line order in code but somehow i can't really figure out why my particle is going farther away from the attractor each time it crosses it and not maintaining that max distance from the beginning. It gets to a point where it goes out of my screen.
@marioytambor
3 жыл бұрын
It’s pronounced as Euler. Every mathematician in the world: My boy!
@AkshatRamanathan
7 жыл бұрын
I love your videos man!! it inspires me to code! even though I dont know JavaScript. I'm mostly a newby in c++
@quassseabass2770
7 жыл бұрын
I have an idea... Thanks as always for the inspiration Dan
@jimmatheson9125
3 жыл бұрын
Make the particles attractors, you can call them planets!
@Apollo1_
7 жыл бұрын
Sup My Dude, Keep up the interesting good work !!
@justgame5508
7 жыл бұрын
Would have been interesting if you had made each particle interact with each other instead of the attractors this is an intractable problem if brute forced of complexity O(n!) so only a few particles could have been rendered in real time however would have been cool to see the erratic orbital paths the particles had taken. Regardless great video as usual!
@TheCodingTrain
7 жыл бұрын
Great suggestion!
@prtysh
7 жыл бұрын
the gravitational concert~~
@dragonhunter250utub
7 жыл бұрын
Hi, I was searching for your coding challenge on how to randomly generate a dungeon with rooms, doors and corridors but can't find it in the playlists.
@pandorolo3167
7 жыл бұрын
0:41 "....and, Oh! My video in google image!" xD
@octaviovivar5482
7 жыл бұрын
Man you're awesome!
@dynamicgecko1213
7 жыл бұрын
Interesting. i was just thinking about making a processing simulation for gravity the other day.
@angelcaru
5 жыл бұрын
The "weight" that you talk about is just mass
@leoaireshenry
7 жыл бұрын
You would be a great professor
@leoaireshenry
7 жыл бұрын
If you're not already! lol
@patrickmurphy7442
7 жыл бұрын
tisch.nyu.edu/about/directory/itp/1984778605
@chilliam65
7 жыл бұрын
Patrick Murphy .
@ariseyhun2085
7 жыл бұрын
19:16 I have this exact same code (in processing) but my result is a lot different... the particle just keeps going faster and faster every time it swings past the attractor... yours seems to stay within the same distance every time is fly's past it. I have the same numbers as you at this point too.
@thfreakinacage
7 жыл бұрын
Same here. I actually found your comment while scrolling down hoping to find a solution. Haha
@thfreakinacage
7 жыл бұрын
Actually, not exactly the same. I am following this video in p5js, not processing, but my result is the same as yours. It speeds up with every pass.
@arturbien9725
7 жыл бұрын
stop at 30:07 where you can see update method of particles.Not sure why but it seems like the order of operations there matter. you should have this.vel.add(this.acc); then this.pos.add(this.vel); and then this.acc.mult(0);
@thfreakinacage
7 жыл бұрын
For my issue I believe it's related to p5js rather than the code. I made the exact same orbit idea with both Processing and p5js. And when I say the same, I mean I literally copied the javascript into processing, then went through and fixed the syntax errors. So the calculation is 100% identical in both. However, running in p5js the particle as it orbits the center slowly gets further and further away, creating a bigger orbit. The same calculation in Processing however and the particle always remains at the same orbit distance and behaves as it should. It seems to me there is a bug with the calculation in the p5js library somewhere.
@felixmuhlenberend7919
6 жыл бұрын
thfreakinacage the movement of the particles gets integrated by a euler-cromer integrator. This means it is just an approximation. The accuracy is dependent on your stepsize dt between your calculations. A Better computer might have faster loops and thus a smaller dt. A smaller dt will result in a stable I integrator.
@kuskus_th13
7 жыл бұрын
17:30 queue the this dot song!
@kuskus_th13
7 жыл бұрын
I seriously have been probably infected with the this.syndrome.
@neilbolima9694
6 жыл бұрын
KusKusPL cue
@TheAwesomeDudeGuy
7 жыл бұрын
Hahahaha that train whistle is amazing
@anatole4115
7 жыл бұрын
Soooo interresting !
@BenBrayhoof
7 жыл бұрын
Maybe you would get a better result if the points had a constant velocity, and the attractors only affect the direction, in which the particles are going. I don't think this would result in the pattern, that you desired but all in all i think it would still make a more satisfactory result.
@TheCodingTrain
7 жыл бұрын
Great idea!
@Paul5-0
7 жыл бұрын
Really interesting video im finishing school at the moment and after that i will study IT with the application subject Physics to do such things
@AlexLul-13
6 жыл бұрын
Wow, it would be my favorite tutorial!
@kuskus_th13
7 жыл бұрын
4:00 MAY THE 4TH BE WITH YOU
@jorgerafaelcallejoflores67
6 жыл бұрын
Excelente video!!, eres un capo
@thesnups
7 жыл бұрын
Particles attracted to blobs from computer vision!
@milorojaz
7 жыл бұрын
videos on 1080p will be awesome in this channel i hope you improve the quality soon Keep it up. :)
@IbakonFerba
7 жыл бұрын
Looks a bit like a whole buch of Bacteria buzzing around :D
@CharIie83
6 жыл бұрын
order of operations doesnt matter when multiplying/dividing
@jjppmm29
6 жыл бұрын
I feel like what you may be thinking of is a simplified version of N body physics
@gaverealjohn
6 жыл бұрын
the gravitational concert
@zman7211
7 жыл бұрын
I have the same exact code as you, but my particle is somehow gaining energy. In other words, its elliptical path gets bigger and bigger with each orbit, so it will never retrace its path. Why is this happening? I sort of wanted to have little particles orbiting indefinitely like a little solar system, but it won't :(
@mllelafortune
6 жыл бұрын
The attracted function in your video is so 'controlled'. When applying the same, the lines' acceleration is so strong. Can't figure what I can do to have low amplitude and slow down the lines's animation :/
@TheRoostersound
2 жыл бұрын
Great I love your masterfull tutorials! Just want to point out: At some you rearanged: but don´t show or explain why in the video but this changes the behaviour dramatically. this.update = function () { this.vel.add(this.acc); this.pos.add(this.vel);
@thedaniel1769
7 жыл бұрын
Good sensation watchin' your videos!!!
@TheCodingTrain
7 жыл бұрын
Thank you!
@alessandrojeanteur6965
7 жыл бұрын
wouldn't it be more realistic to simply have each particle being attracted to all the others? I mean fixed attractors make for cool stuff, but modeling the actual formation of stars or solar systems would be quite more interesting!
@TheCodingTrain
7 жыл бұрын
Yes, there is very little about this that is realistic!
@ΛεωνίδαςΓκώγκος
5 жыл бұрын
So i could make a vector which has the pos of each particle?
@taihatranduc8613
3 жыл бұрын
an amazing video
@shedow1234
7 жыл бұрын
like it
@TheCodingTrain
7 жыл бұрын
Glad to hear!
@ariseyhun2085
7 жыл бұрын
but... it's been 4 minutes.
@shedow1234
7 жыл бұрын
Acidic i just like all of his videos.
@ariseyhun2085
7 жыл бұрын
lol yeah who doesn't
@accidentalengineering
7 жыл бұрын
Train whistle FTW
@lukealdrich
7 жыл бұрын
You are very similar to the guy on RSBN.
@mikamulperi
7 жыл бұрын
I would like to see these with pure JS :) Otherwise very nice videos!
@angelcaru
3 жыл бұрын
"Pure JS" Canvas APIs are very confusing...
@kamoroso94
7 жыл бұрын
Do you think you make better videos when you're livestreaming or when you do them on your own?
@kamoroso94
7 жыл бұрын
Jose Hoyos I know how he does it, I'm asking his opinion on which way he feels makes better videos.
@TheCodingTrain
7 жыл бұрын
It's a good question. I'm not really sure, at this point I'm *only* doing them while live streaming. I think my videos might improve with more preparation, right now I do almost everything spontaneously.
@MrMyhz
7 жыл бұрын
And we love you for it. It's surprisingly motivational to see someone as experienced and talented as yourself mess up really simple things like JavaScript's "this." every now and then. "I've done something terrible, this is great!" is my favorite quote ever, it's an inspiring attitude to have. I'm incredibly thankful that I discovered your channel. Everything about you is contagious and makes me want to not only become a better programmer, but also a better person in general.
@Gazzar19
7 жыл бұрын
stuff like this would be great to teach physics leason.
@fachriem
7 жыл бұрын
its amaze me..
@coleraby
7 жыл бұрын
The "lack" of recognizable patterns you are missing, is due to the low number of particles you're using. Make them smaller (1-2 pixels in diameter) and drop a huge bunch of them into your scene (> 100000). I encountered the same "problem" when I implemented such particle-systems for the first time and wondered why my solution looked nothing like what I was expecting. With enough particles you'll see these patterns "emerge". I've 2D and 3D-versions (although only in C++/OpenGL) you can borrow from kzitem.info/news/bejne/0mqisKBmo51qooI kzitem.info/news/bejne/mIxmsGtpqXWppG0 sources can be obtained here code.launchpad.net/~macslow/glsl-transform-feedback/trunk Enjoy!
@coleraby
7 жыл бұрын
Using p5's WebGL-support or the GL-support of Processing is highly recommended I'd say, otherwise it's not much fun to freely play with huge number of particles.
@andrehallqvist449
7 жыл бұрын
I made a gravity thing in processing. Since then added "camera" movement and "numerical suffix" K M G T etc.. Had some problems with balls falling into each other and if I should make them stop or bounce at each others surfaces. Tried making the attraction reveres to repulsion at short distances and although not physically accurate worked pretty well. www.openprocessing.org/sketch/410859
@Mr_nn23
7 жыл бұрын
I am beginner, I started to learn coding less than 1 week ago ( I learned Html and Css fundamentals). My goal is to make apps, but I don't know if learn swift with Xcode or Js using later react native for develops my apps.. Can somebody out there tell me what should I do??? Please!!
@lolpop3027
7 жыл бұрын
Great tutorial, as always you make everything look so easy! I have a request - can you maybe do a tutorial on perspective projection (en.m.wikipedia.org/wiki/3D_projection) of simple rotating 3d figures, that would look awesome. i'm currently working on such a program and would certainly enjoy your look on that. thanks!
@vrppaul
7 жыл бұрын
Does Daniel have any videos about neural networks on his channel?
@TheCodingTrain
7 жыл бұрын
Not yet, but soon!
@vrppaul
7 жыл бұрын
The Coding Train Thank you! Your videos are the best about programming
@ricardolima5206
7 жыл бұрын
Hi! Following the implementation, I couldn't get the result shown in 20:28, it seems that the acceleration is getting faster at each step. The code is the same, I don't know what is wrong.
@ricardolima5206
7 жыл бұрын
I found the error. I was updating the velocity, acceleration and position in a different order.
@RockWolfHD
7 жыл бұрын
Hi Daniel!!!
@TheCodingTrain
7 жыл бұрын
Hello!
@RedsBoneStuff
7 жыл бұрын
18:17 To fall into a black hole
@GABRIELFILMSTUDIOS
7 жыл бұрын
Didn't you want to upload this in 1080p? Or has KZitem just not processed it yet?
@TheCodingTrain
7 жыл бұрын
I did. Unfortunately, the computer I used just can't handle 1080, it was all choppy. Going to try to upgrade sometime if I can. But for now everything will be 720p.
@GABRIELFILMSTUDIOS
7 жыл бұрын
Ah ok, was just wondering. 720p is just fine for me :)
@TheGallanomen
5 жыл бұрын
Can we use particles to draw an image in canvas?
@prabhanshuwakodikar2082
6 жыл бұрын
Invisible contract that dosen't exist thats funny XD XD XD
@gime1945
7 жыл бұрын
Where can I find that wallpaper ? :)
@alfonshomac
7 жыл бұрын
I *am* the internet... [spartacus]
@Zakiyfarhanfuad
6 жыл бұрын
how to make p5 interface black?
@jdmeesey
7 жыл бұрын
Just a few weeks ago I coded an electric potential 3-D visualization in processing on my phone. All I need to do to show electric field force instead of potential is to change the calculation from one over R to one over R squared.
@Fazal828
6 жыл бұрын
YOUUUUUULURR
@may007ank
7 жыл бұрын
Watching him joke makes me think that this channel should really be called The Coding Train-wreck.
@TheCodingTrain
7 жыл бұрын
Oh, this is an excellent suggestion!
@EnergiaRocket
7 жыл бұрын
Will you ever write in python?
@angelcaru
3 жыл бұрын
🤷
@lucasmontec
7 жыл бұрын
Your repulsion seems too strong and activating too close to the points. Also the atraction also seems too strong but not as strong as the repulsion. Also it is nicer to have separate attractors and repulsors with the same area of effect.
@f4ngzofh4tred
7 жыл бұрын
what software do you use for coding?
@markmendez1014
7 жыл бұрын
FunKy He's using javascript and an HTML canvas. All you need is a simple editor to write the code and a browser to run it. No need for a compiler or a server.
@Grizix
7 жыл бұрын
FunKy Atom for editing, Chrome for running
@voidforce4828
7 жыл бұрын
Sharingan!
@RRgamingmovies
7 жыл бұрын
how can i see my website in sublime text 2?
@angelcaru
3 жыл бұрын
You use a web browser (Firefox/Chrome) to see a website. You use a web server to host the website. You can also use editor.p5js.org
@RRgamingmovies
3 жыл бұрын
@@angelcaru thx for the fast response
@sargeento
7 жыл бұрын
Who has the code?
@celestinsv957
7 жыл бұрын
im french
@TheCodingTrain
7 жыл бұрын
Salut!
@gustipakastin
7 жыл бұрын
CHARLIE SLAT Omelette du fromage
@quassseabass2770
7 жыл бұрын
CHARLIE SLAT oui oui baguette eiffel tower
@insanecat1
7 жыл бұрын
@Paskasaurus +10000 for that Dexter's Laboratory reference!
@masterflamaster6377
7 жыл бұрын
J'apprende francais et j'habite en Pologne.
@ahdiaachabbak7379
7 жыл бұрын
can you make PLEAAASE some Challenge but in JAVA
@flobiish
7 жыл бұрын
Thanks. I used this lesson to add asteroid tracking to the lasers from your Asteroids lesson. Love your stuff. Oh, www.flobi.com/ if you want to see how it turned out.
@flobiish
7 жыл бұрын
Basically I insert an attraction to a location where the adjusted position of the vectors of the laser (partial) and the asteroid will be based on their relative distance from each other. Works pretty well and the targeting overlay turned out pretty sweet. All the code is client side.
@donaldderrick1595
4 жыл бұрын
lol im back.
@nihkz494
7 жыл бұрын
I go told u don't need the this. u can just have whatever for example where u put this.attracted u could just have attracted = so on
@wudufff
2 жыл бұрын
dude your tutorials are really good but could you talk a little less its actually making it boring
Пікірлер: 165