This is fantastic. You are speaking your mind as you go. This is a highly valuable teaching tool.
@TheCodingTrain8 жыл бұрын
thank you!
@dashl50698 жыл бұрын
You are amazing!!!
@tylerwilson72148 жыл бұрын
It's cool how you don't do a bunch of takes to have one smooth, flawless video. Instead it feels more like I'm in a classroom and learning extra from your mistakes. Thanks for the vids.
@Graywoolf258 жыл бұрын
I love the way you teach and explain. I wish my Java professor would show a fraction of your motivation. God bless man keep doing what your doing.
@CloroxBleach-fl8ky7 жыл бұрын
whats school do you go to? my teacher sucks aswell so we might go to the same one
@marcusaureliusregulus28334 жыл бұрын
Is he using Java? I am new and I don't know
@AAAAAA-gj2di3 жыл бұрын
@@marcusaureliusregulus2833 Processing is based on java
@marcusaureliusregulus28333 жыл бұрын
@@AAAAAA-gj2di ok thanks
@magsudhajiyev78108 жыл бұрын
You're the person who i looked for to find among my teachers in university. It's so fun to watch your videos and get inspiration from them. Thank you for this amazing job. Good luck :)
@TheCodingTrain8 жыл бұрын
+Magsud Hajiyev thank you!!
@LordBax6 жыл бұрын
You may never see this (and it is also a sentiment shared by others) but I just want to say that the fact you keep in all your mistakes are invaluable in teaching me how to code. It makes these videos not only entertaining but by showing how you make mistakes and then show how you rectify them teaches me how I can do the same.
@TheCodingTrain6 жыл бұрын
I do see this! Thank you!
@lhpaoletti4 жыл бұрын
Watching you do this while ignoring a couple of physics' laws got me inspired and do my own simulation where real physical laws would apply! Thank you so much!
@marks32088 жыл бұрын
Discovered this channel few days ago. You are literally now my new mentor. Gad! I love your enthusiasm.
@mctuble8 жыл бұрын
This right here proves the value of a good university and good professors. I went to a university where the subject matter was difficult with professors with thick indian accents along with other accents. So step 1: hear what they say step 2: decode the actual words step 3: apply to the context of the lecture and by the time I'd decode the words they'd be onto the next one. If you ever asked a question he'd say this is simple and just say the same thing but slower. I do wish my universities professors had your passion and I hate to say it but because it would have benefited my education... lack of accent.
@jikojj36807 жыл бұрын
mctuble is it only indian accent u have problem with or does the professor have to be native english? If the latter then would Canadian or Aussie be acceptable for u?
@CMaC2538 жыл бұрын
You seriously have no idea how much you revitalized my understanding of why I veer towards programming and Computer Science as a passion. I've been reading The Nature of Code for a while now and lamented the fact that I couldn't find any good Processing tutes online, but I never realized that you've been here the whole time LOL. Thank you Daniel!
@TheCodingTrain8 жыл бұрын
+CMaC253 Thank you so much, I'm so glad to hear!
8 жыл бұрын
Thanks David, i enjoyed so much how you deal with your mistakes, more mistakes = more "how to resolve problems " essential skill in programming (adding your enthusiasm = more pleasure & fun) merci ;-)
@TheCodingTrain8 жыл бұрын
+laurent Mattlé Thanks so much for the nice feedback!
@yxmordarbert7 жыл бұрын
You have a new fan! Love how you explain all your mistakes too. Great balance between fast pace and good insight in your thought process.
@griseld7 жыл бұрын
I love the parts where you think you figured out why something's not working and then you realize it's ok, that's not the problem and you need to find it elsewhere, so funny! :)
@TheCodingTrain7 жыл бұрын
Thank you!
@ABaumstumpf8 жыл бұрын
A few things: For solar-systems all planets should rotate in the same direction (if not the orbits would be unstable). the orbit-speed should be related to 1/root(distance). And it would be good if the planets and moons don#t constantly collide :P
@redhen7 жыл бұрын
Good info, thanks. Do you know if orbit direction also refers to satellites (moons)? Oh -- and what about individual spin of a planet/satellite?
@ABaumstumpf7 жыл бұрын
If there are several moon orbiting a planet then yes - all in the same direction. The spins of the planets? pretty much. all the moons in a star system? kinda yes - they normally follow the rotation of the planet. Even planets can sometimes go the other direction, but this is rare due to the way they form. Only if something big happens and slings planets around will you get different orbital directions. the rotation of the planet is not linked that strongly, but for our system 6 out of 8 planets spin the same direction as they move around the sun. And moons too - they pretty much all follow the spin of their respective planet. this mostly comes down to how star-systems form. When a gas-cloud starts collapsing to form stars and planets it will have a slight spin. and the more the cloud collapses the faster it will spin (conservation of momentum). But because this is the whole cloud it also means that everything formed that way will spin in the same direction. Only if something happens like planetary billiard or baseball will a planet move very differently.
@redhen7 жыл бұрын
ABaumstumpf Thanks!
@JonathanChute5 жыл бұрын
Also, I'm pretty sure solar systems are relatively flat, are they not? That is everything rotates on the same(ish) angle and the example video at the beginning where you have planets going sideways, vertically, and everywhere in between, but in actuality all the planets would be on a similar plane. From my limited knowledge the only changes in the planet rotations are speed and radius.
@RedHair651 Жыл бұрын
@@JonathanChute That's correct. The orbital planes vary a tiny bit but overall it's all in the same plane.
@XGamersGonnaGameX8 жыл бұрын
Orbital velocity is dependent on distance from sun so the closer planets should orbit faster.
@paulthecurtains22858 жыл бұрын
It's good to see the mistakes you make and then the debugging. I'm learning such alot from your tutorials.
@TheCodingTrain8 жыл бұрын
+PAUL THE CURTAINS Thanks, I'm so glad to hear!
@smitr3768 жыл бұрын
It's like coding 'No Man's Sky'
@mmtf8 жыл бұрын
so close! Just the procedural generation and No Man's Sky killer.
@AcornFox6 жыл бұрын
Except this works.
@tiileaf6 жыл бұрын
The multiplayer here is better than no man sky's
@RobertMan2684 жыл бұрын
Its completely unlike coding no man's sky, i will tell you why if you have 3 hours
@zhabinsky8 жыл бұрын
It's been two days since I found your chanel and I am already your biggest fan ever, I am not very good at making compliments and comments, but I could not try to do one. You are the BEST! You are so potive and excited which is very nice, If only a third of my teachers were motived like this I would go to my school with a great will. You are a bright man. :)
@TheCodingTrain8 жыл бұрын
So nice to hear, thank you!
@charlvanniekerk80093 жыл бұрын
sorry can we just appreciate that beautiful circle at 2:35 Anyway! I love your channel and cant wait to use it to learn all about java script. Thank you for your beautiful explanation and wonderful videos.
@ShaneLeeCoding5 жыл бұрын
It's thanks to you and videos like this that I learned Javascript so quickly.
@h3x7 жыл бұрын
the orbital speed should be some function of the distance from the sun. e.g closer to the sun = faster orbital velocity. might make it look more like a real solar system. also, i just bought the book version of nature of code. amazing book! thanks a ton!
@sevfx8 жыл бұрын
I love your videos so much. You are just my kind of programmer! In this sketch, you definitively could have picked better names. For example parentBody, childBody instead of planets and planets of planets in a spawnMoons function. That way, it would have been easier for me to keep track of the recursions. But as always, great video :)
@TheCodingTrain8 жыл бұрын
those are great suggestions, thank you.
@rmz16615 жыл бұрын
@@TheCodingTrain The function spawnMoons(int) does not exist. I am stuck pleas help
@collinstump97067 жыл бұрын
17:22 "Notice they are all on the X-axis... Y?"
@gloubiboulgazeblob5 жыл бұрын
So fun ! The Crazy Locomotive Guy :-D In the spawnMoon function, checking level should be the first thing to do BEFORE any sub-planet creation. This kind of behaviour is typical in recursive things. First check, then do.
@sergiomendez88523 жыл бұрын
No entiendo mucho el ingles, pero me has enseñado mas tu que mi profesor, excelente trabajo!!!
@sumanpahari89494 жыл бұрын
very helpful for my son. thank you
@brookestephen4 ай бұрын
why not use the tree branch and leaf model - the Composite Design Pattern? That way, you can have stars, planets and satellites through-out the data model, but they are simply nodes... the leaves in the model have no satellites. This way you can have stars orbiting stars, and each has planets. You can use the Barycenter model to replace all the satellites and planet, when calculating their cumulative effect on the other planets and star. FYI radius of the orbit and radius of the body are different!
@simplecastic8 жыл бұрын
omg i remember you now i was trying to learn processing 4 years ago i loved your tutorial on processing i forgot about that software because at the time i was learning CPP i am going to look at that for sure now
@Jimanator8 жыл бұрын
for the size of the "moons" it should have been radius/(level +1) rather than radius/(level *1.2) by making it multiply you give it exponential decay.
@TheCodingTrain8 жыл бұрын
+James Butler (Jim) Oops, thank you! Great correction!
@mannyc66494 жыл бұрын
I was about to comment the same thing
@benholmes36965 жыл бұрын
This is Bob Ross reincarnated.
@fxois33188 жыл бұрын
Pointer null exception: "You see, he's just a man !" I wish I had your skills... Really, my work day would then be like 8-9, work, 9-18 screw around, coffee, etc. And no stress !
@AJMansfield18 жыл бұрын
I did a thing like this with processing once. Except I used kepler conics for the large bodies and RK4 integration for smaller asteroids.
@harutmargaryan99806 жыл бұрын
do you have code?
@ectospasm8 жыл бұрын
A simulation of Conway's Game of Life for a 10 minute code challenge!
@TheCodingTrain8 жыл бұрын
Check out: kzbin.info/www/bejne/qnaxhHZ7hJJ_e8U (would be glad to do this again though in p5.js suggest here: kzbin.info/www/bejne/qnaxhHZ7hJJ_e8U)
@michaelzermeno28 жыл бұрын
wow you make this seem so easy, when I was trying to learn to code I was so lost
@VLAHECO8 жыл бұрын
I really enjoy this videos from Mr Daniel... it is not boring :) thank you for sharing
@TheCodingTrain8 жыл бұрын
+VLAHECO Thank you, appreciate it!
@maddo82937 жыл бұрын
loved the video . that one direction analogy though got me laugh :) , thank you.
@endofmysteries8 жыл бұрын
you make this all so easy to learn and understand! thanks Daniel!
@TheCodingTrain8 жыл бұрын
+endofmysteries thank you!
@suprememaximus79248 жыл бұрын
Kepler would not approve of this video hahaha
@brotherrain10248 жыл бұрын
I simply love all your videos. Thank you very much.
@TheCodingTrain8 жыл бұрын
+brother rain I'm so glad to hear, thank you!
@timmorphine8 жыл бұрын
I think your videos are great and entertaining to watch, but although I understand the language and see what does what, I sometimes fail catching up with the logic of your sketches. Like I'm okay if I repeat after you, but I will have no idea how it all works. I could only wish for a more thorough explanation of the logic, maybe having a diagram or something. From your tutorials I see how but I don't get why (sometimes).
@IIronGoat697 жыл бұрын
24:28 "take a walk" ..man, it's 3am and -3°C outside.. lol, great video btw :D
@KartikayBagla4 жыл бұрын
“Show your children! You don’t have any children? Null pointer exception.” - Dan
@loadingninjavods46485 жыл бұрын
x = planets[i].distance*cos(planets[i].angle); y = planets[i].distance*sin(planets[i].angle); translate(x, y); Do that inside the for loop in you draw method and you are good to go^^
@georgea62056 жыл бұрын
Billie joe Armstrong went from being a rockstar to a programmer, is there anything the man can’t do?
@flinggonza56886 жыл бұрын
I am not a coding nerd, but for sine reason I enjoy watching this.
@charliejulietdavies87157 жыл бұрын
i see your "space is a dark, black place" and i raise bones' "Space is disease and danger wrapped in darkness and silence"
@aleenaselegy5 жыл бұрын
HAHHA !!! OMG !!! ON 2X SPEED THIS IS THE MOST FUNNIEST REAL LIFE CARTOON I HAVE YET TO SEE!!!XD
@hazengalilei26434 жыл бұрын
SHOW YOURSELF! THEN SHOW YOUR CHILDREN!
@aryakhanna1175 жыл бұрын
this is a satisfying application of OO
@ShaneEngelman8 жыл бұрын
I wish you were more explicit in your variable names!
@MrNolimitech4 жыл бұрын
Great video. But i think, next time you should use Vector.translate and Vector.rotate, instead of using restricted p5 method. It will let other language programmer to use and try it. pushMatrix, popMatrix,, rotate(), translate()... is restricted to high level language like python (numpy.translate). Which is not the case for F#, C#, C++ ....
@amanmahendroo17847 жыл бұрын
considering you have a variable keeping track of its children, say total, you may want each of those children to have floor(random(total/2)) children... the more moons a planet has, the more its probability to have its own children...
@ekarademir8 жыл бұрын
If the planets formed around the sun then all of them should be on the same plane, but nice demo.
@mikejones-vd3fg6 жыл бұрын
pretend your looking at the sun from a top down view, then they're all on the same plane! :)
@HDMensur8 жыл бұрын
svn === sun ? what are you, Roman ?! Anyways, i still love your videos! keep it up!
@jikojj36805 жыл бұрын
No === None of that here
@MichaelBuergerArt8 жыл бұрын
I wrote a similar program in p5.js and it wouldn't work when recursion happened for orbiting the planets, when I copied and pasted to processing and fixed up the code, it worked fine. Why is this happening Dan?
@job2k6568 жыл бұрын
22:42 - The Vomit Solar System
@TheCodingTrain8 жыл бұрын
+job2k6 indeed!
@mmtf8 жыл бұрын
7:30 Moons are generally bigger than planets in Processing ;D
@JkeyKong6 жыл бұрын
p5.js!!! let me have a rest for my brain!!
@oFoxo17 жыл бұрын
Hello from Italy! Found your channel some days ago and now I'm actually in love with you! You're awesome man! I study computer engineering and your coding challenge are also challenges for me trying to find out what and how you're going to do. In this particular case I'd create a class called like "celestial body" and then classes like "star"-"planet"-"moon" that extended it. what do you think about it?
@TheCodingTrain7 жыл бұрын
Great idea!
@toshb13848 жыл бұрын
Would this be easier with inheritance? Maybe you can revisit this challenge with inheritance, I haven't seen you do a video about that yet.
@gernhartreinholzen45246 жыл бұрын
Great Video! Thanks for sharing Bro!
@i.i6 жыл бұрын
can you do the same thing with p5 :
@crochet666 Жыл бұрын
Can you maybe make something to transform a picture into a grid that people can use as a pattern for crocheting/knitting? I'm trying to make this but I'm stuck with it....
@fishyperil21536 жыл бұрын
ain't no life gonna spawn in that solar system of yours bro ^^ ....just kidding, your book and the videos are awesome
@smzakirhussain76042 жыл бұрын
Like your job!
@braincoder90555 жыл бұрын
Sir you are great
@parker74547 жыл бұрын
Your videos are just awesome, I've learned so much! Could you do some tutorial videos on getting started in Python? Could you suggest any other videos?
@tranquaLongboard6 жыл бұрын
I've just discovered this channel but I'm already in love with it, lots of interesting and original projects and your enthusiasm is a perfect mix to get involved people who aren't in the field . I have a question about the vector planets: when I create new planets in the array, the addresses of the new Planet variables are inserted. When the moons are created, a new planets array is created, where the addresses of the new Planet (moon) variables are inserted. How is it possible that the show () method, which runs the array planets, also designs the moons? Printing the planets array {printArray (sun.planets); } in the draw () function I see only the addresses of the planets (how, where and with what criterion the moons are saved, how can I access them, for example, to see their attributes?). Thank you so much for the help and congratulations again for the channel !!!
@Jjunior1308 жыл бұрын
I translated this to clojurescript. Behaves identically to video. jjunior130.github.io/coding-challenges/#/solar-system Sketch: github.com/Jjunior130/coding-challenges/blob/master/src/cljs/coding_challenges/solar-system/views.cljs Planet: github.com/Jjunior130/coding-challenges/blob/master/src/cljs/coding_challenges/solar-system/planet.cljs
@jonmayer7 жыл бұрын
The sun should be first "Planet". the Planet object should have an optional parent property of type Planet. Everything should have a parent assigned except for the Sun. But I'm only 10 minutes into the video, so I'm not sure if things will change.
@tristanlee11717 жыл бұрын
You should code the circle game by Shea Barton
@arturfidelus1293 жыл бұрын
I dunno why, but in your case, you assign value to sun in setup() but not in draw() and it works but if I do that it throws nullpointerexception on sun.show() :/ Had to assign value at the start of the file and it works but I still don't know why it didn't throw anything in your case.
@angelcaru5 жыл бұрын
Solar System in Processing - Part N (N+1D)
@Streicher19938 жыл бұрын
is there a library similar to processing for c#?
@slowdown_8 жыл бұрын
would really like to know that too. but for now im learning java with processing because i already know c# and its not that hard
@jikojj36807 жыл бұрын
C# is a Java dialect at this level. When it comes to .net stuff or java ee things can be remarkably different but u wont ever need that in processing.
@skaramicke3 жыл бұрын
I’d say it’s time to start encouraging data oriented coding for graphics rather than oop, since it’s way easier to optimise for gpus and oop leads beginners down a useless rabbit hole 🕳
@sebby1386 жыл бұрын
Hello! What does "for (int i = o; i < planets.length; i ++) " mean?
@tacodiva77297 жыл бұрын
Oh, no children? Null pointer exception
@michaelmartinez32356 жыл бұрын
Amazing
@firephoenix55566 жыл бұрын
No, I am not going outside. It is 11 pm and quite snowy.
@moshadj4 жыл бұрын
It's funny to comment on 4 year old videos but gosh I wish you made the orbit speed inversely proportional to the distance.
@TheCodingTrain4 жыл бұрын
Doh!
@redpug50422 жыл бұрын
the orbital periods are way off, just saying... right now, they are all circular orbits at different heights but with completely random speeds gravity doesn't agree with your orbits
@joaago14 жыл бұрын
please help, I copyed the code to processing 3.5.4 and it does not work.. Never programed java before only some python.
@Nulono8 жыл бұрын
Real planets only orbit in one direction. :)
@melissaselviani64097 жыл бұрын
can you tell me what program you used?? :) Thankyou :)
@mmtf8 жыл бұрын
I didn't know processing was java, it really doesn't use the general principal of Java in its libraries.
@jonnylaw45695 жыл бұрын
1:32 I love it lol
@TileBitan2 жыл бұрын
love the videos but i dont understand why you include gravity in purple rain and not here lmao
@Salted_Potato8 жыл бұрын
Excellent video. Subbing.
@tomdog1326 жыл бұрын
Are you able to do this same type solar system demo with atom, p5, and p5js?
@TheCodingTrain6 жыл бұрын
Yes, check thecodingtrain.com for a p5 version if it's not there file a github issue!
@coldsoup7538 жыл бұрын
How would you draw the orbits and ellipses instead of circles?
@TheCodingTrain8 жыл бұрын
+coldsoup753 Do you mean as ellipses? Try varying the radius depending on the angle. You could also do something more sophisticated where you model the physics more accurately.
@saldme76554 жыл бұрын
oow it is amazing!
@cooldj25522 жыл бұрын
is there anything as plug in to add to Unity?
@mototechvlogsPH6 жыл бұрын
What softwares do i need to create this?
@tegirikalbur97056 жыл бұрын
No offence but technically planets only spin in the direction the star is spinning, they do not spin counter to the star. Amazing tutorial though.
@TheCodingTrain6 жыл бұрын
Thanks for the feedback!
@oktaybekar3196 жыл бұрын
isn't it better to give every planet a parent planet?
@haroldmcbroom78072 жыл бұрын
Couldn't follow along. I'm using cs1300 mingw32 :(
@syruptree8 жыл бұрын
I would contact you via twitter, but at my school its blocked. I have a Processing program that I have been adding to over the course of several months and would love to share it with you. I was hoping you could give me some advice on optimizing it. You may use the program for anything you would like (even in your youtube videos) the only thing I would prefer is that the code not be released to the public, until I make it more user friendly. Right now there is a lack of sliders, but the keyboard keys are set to work fine (assuming you memorize each keys use) I'll include a diagram of which keys do what and how to use the program. The program is a 3D graph visualizer for fractals and various other objects (ton of real time controlling). Let me know if this would be something you would be interested in taking a look at.
@TheCodingTrain8 жыл бұрын
+syruptree Sounds interesting! The best place to discuss code and optimizing is at forum.processing.org. Feel free to link to any posts you make from here!
@thedankatheist34666 жыл бұрын
I made something bery similar to this at school using VB lol. If you want the cade just ask
@mahbubzaman50138 жыл бұрын
Amuzing !
@fanitram7 жыл бұрын
hi, how can I make 1 planet have 1 moon?
@En_theo5 жыл бұрын
Hi, the link to "Source Code For This Challenge" is no more avalaible