Coding Challenge #14: Fractal Trees - Recursive

  Рет қаралды 894,968

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 554
@voleNTV
@voleNTV 8 жыл бұрын
Your charisma, and personality is a wonderful break from the usual monotonous programming tutorials. Loving it.
@AngelowasBorn
@AngelowasBorn 7 жыл бұрын
he's way better than my programming instructor :)
@maxiewawa
@maxiewawa 6 жыл бұрын
0:36 "What is a recursive definition?" A recursive definition is a recursive definition.
@johng7602
@johng7602 6 жыл бұрын
I would have give you one more like, but seeing you get 42 likes, and I really don’t want to ruin the number
@binaryteddybear8741
@binaryteddybear8741 6 жыл бұрын
To understand recursion, first you really need to understand something else: recursion
@simonraily330
@simonraily330 4 жыл бұрын
GNU as well ;)
@NStripleseven
@NStripleseven 4 жыл бұрын
Ah yes, recursion, that word that means recursion
@Inchara-ud4ul
@Inchara-ud4ul Жыл бұрын
Very good 😂😂
@melogenesis4618
@melogenesis4618 5 жыл бұрын
As a cs student, I can easily say that these videos are better than some of the cs courses given in the university
@jhon-zp5sz
@jhon-zp5sz 4 жыл бұрын
r u in kerala?
@starcrAT1
@starcrAT1 7 жыл бұрын
"that was completely unnecessary, but I did it anyway"
@lukealsmith
@lukealsmith 6 жыл бұрын
Holy shit dude, there needs to be more of you at my university! Thanks so much, I am now addicted to your videos
@edopenroz
@edopenroz 8 жыл бұрын
This is so beautiful and inspiring! Thanks for sharing your knowledge, Daniel!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
+edopenroz thanks for watching!
@nizwiz._.5906
@nizwiz._.5906 4 жыл бұрын
I've been watching your coding challenges for around 1-2 years now, and I never actually thought to try one of these myself. I'm gonna be doing coding challenges every day now, so fun! But I really love your videos, and I think it's because you don't just show the process of making code, you're also super goofy and you show the process of failing to make code properly, and then fixing it. You're awesome, dude.
@zaknelson1887
@zaknelson1887 8 жыл бұрын
3:36. "I am Groot! I am Groot! I am Groot!" That being said, your videos have been all been really engaging. I'm so glad I found your channel!
@ThisIsMMI
@ThisIsMMI 5 жыл бұрын
Wow!! You are probably the happiest programmer on Earth 😁😁 Good job. Keep it up.
@Nightlurk
@Nightlurk 8 жыл бұрын
That's not a fractal tree that's a fractal broccoli!
@AkbarSyarif
@AkbarSyarif 7 жыл бұрын
NightLurk this is made my day
@luisgeniole369
@luisgeniole369 6 жыл бұрын
12:30 thats a dragon curve
@samferrer
@samferrer 5 жыл бұрын
NightLurk that is not even a fractal ... just because it looks like a fractal it doesn't mean it is one ...
@12-343
@12-343 5 жыл бұрын
Froccoli
@SabbirAhmed-cm6hk
@SabbirAhmed-cm6hk 5 жыл бұрын
:D
@eastonhay
@eastonhay 8 жыл бұрын
I messed around with coding for a little bit and watching these videos make me want to try coding again. You make fantastic videos that explain both the math behind the code and the coding itself. Good Job!
@slanglabadang
@slanglabadang 8 жыл бұрын
those push and pop functions make recursive functions so much more simple
@CoderOfBugs
@CoderOfBugs 7 жыл бұрын
I have been binging these videos. Can't get enough! Keep doing what you do, Daniel!
@dreamer097
@dreamer097 8 жыл бұрын
gotta love when you chance upon the exact stuff you've always wanted to learn but never knew where to start. really looking forward to diving into this series!!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
thanks, nice to hear!
@Lostpanda123
@Lostpanda123 8 жыл бұрын
You make math fun. :)
@MrZakrencony
@MrZakrencony 7 жыл бұрын
Dude, math is always fun
@dubsimmons7508
@dubsimmons7508 5 жыл бұрын
MrZakrencony nooooooo
@bobbysingh5666
@bobbysingh5666 4 жыл бұрын
@@MrZakrencony this is legit fun in scholl you do some + and -
@cangeylan3714
@cangeylan3714 4 жыл бұрын
this was the best video for me to understand what recursive function in general does. i've been watching your videos to learn more complex js and you've been so helpful. thank you so much
@CloudC-kj6kt
@CloudC-kj6kt 2 жыл бұрын
what makes you so outstanding than other tutorial video is that you really consider the difficulty learner could face. Thank you so much
@selvalakshmivinayagamoorth9965
@selvalakshmivinayagamoorth9965 3 жыл бұрын
You are the best teacher I have ever seen. Thank you
@XANA96
@XANA96 2 жыл бұрын
This was actually very well explained.. even 6 years later. Thanks!
@bryphi77
@bryphi77 8 жыл бұрын
I think you may have got a bit too excited about "having the trunk". You turned into Dr evil for a second... LOL, you make me laugh!!! Thanks again for all these great vids... I have learned so much from them.
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
haha, thanks!
@tarunramesh8539
@tarunramesh8539 8 жыл бұрын
Your book nature of code is one of the most amazing things ive read in my life
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
So nice to hear thank you!
@BiswasTharakath
@BiswasTharakath 7 жыл бұрын
This channel is a treasure!!
@reggaefreaksplayground569
@reggaefreaksplayground569 7 жыл бұрын
soooooo much energy.Dude you need be in a redbull commercial KEEP up the good stuff PEACE
@suraj__7
@suraj__7 6 жыл бұрын
You're so cool, oh so charismatic, you make me believe in myself. Great teacher you are sir, hats off!!
@yevheniiherasymchuk
@yevheniiherasymchuk 8 жыл бұрын
so incredible, man! it's can be written under every your video. Thank you for all of this, it's really nice
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
Thanks for watching!
@Sercil00
@Sercil00 7 жыл бұрын
Thanks, this just helped me with some homework that was about to cost my sanity. I just learned about recursion and I find it really difficult to plan far ahead with it. And after hours and hours of trial and error, all the code you got to show for it is so short, you barely have to scroll. Oh well. All the pain is forgotten as soon as it finally does its magic.
@borjonx
@borjonx 4 жыл бұрын
Best. Teacher. Ever. (so far). THANK YOU!!!
@cyanozoid2706
@cyanozoid2706 4 жыл бұрын
Man, I got so many details about coding ironed out in this one tutorial. Thank you so much!!
@Yorcont
@Yorcont 8 жыл бұрын
The way you talk through your tutorials is nice, always seems like you love programming, I'll say you're excited about it and that is transmitted to the viewers, some could say it can be annoying, but right now i find it inspiring, i'm not supposed to be into programming but it's interesting. Thank you for sharing.
@Metamor-phosis
@Metamor-phosis 7 жыл бұрын
Just finished following and (basically copying) the snake challenge, I'm definitily following this one, too... will be my second program in JS! Thank you so much for your videos!
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
yay, thank you!
@shailendrachauhan130
@shailendrachauhan130 4 жыл бұрын
The the way of teaching now I’m being fan of yours
@Pygmygerbil88
@Pygmygerbil88 3 жыл бұрын
this man is total energy.
@moonlight.sunlight
@moonlight.sunlight 7 жыл бұрын
Your like a gift from God, thanks for sharing your knowledge in such an easy to understand and fun presentation.
@tuga684
@tuga684 6 жыл бұрын
7:55 You got me there 👌😂
@sebastianfrasher2597
@sebastianfrasher2597 4 жыл бұрын
I love this guy. Your videos are educational and entertaining
@Raffaello_Santiz
@Raffaello_Santiz 7 жыл бұрын
Great work! Your videos are ultimately inspirational. You are not so much one who provide knowledge but the one who inspire the students to do great things.
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Thank you!
@nekosalad8308
@nekosalad8308 5 жыл бұрын
best programming channel ever
@Deafingblow
@Deafingblow 8 жыл бұрын
I think it would be interesting to see a coding challenge done on a ti-84
@kamoroso94
@kamoroso94 8 жыл бұрын
Oh I love programming on those! It's quite a challenge :)
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
INteresting idea!
@Rebornedi
@Rebornedi 8 жыл бұрын
Wow this video was so good! Nice job and keep up the good work!
@pyrokinetikrlz
@pyrokinetikrlz 5 жыл бұрын
You almost got a Koch snowflake fractal at 12:37. haahahah. Great channel!!! love it! choooo chooooooooooooo
@goxr3plus_studio
@goxr3plus_studio 8 жыл бұрын
Better than any teacher !😀
@Driftload
@Driftload 6 жыл бұрын
9:03 I really want to get good at music sampling and make a remix of all the innocuous funny things you say :D You are such a legend and really good at teaching dude!
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
I love the remixes so much! There are a bunch here: soundcloud.com/kristianpedersen/sets/coding-rainbow-remixes
@anthonyatella
@anthonyatella 7 жыл бұрын
you don't need to push and pop, you just need two calls to branch for each branch call.
@RupertBruce
@RupertBruce 3 жыл бұрын
Refactor suggestion: move the block from push to pop to a subbranch(angle) function. You have sold me on this p5 stuff - currently binge-watching your videos. Thank you 🙂
@aronpop1447
@aronpop1447 7 жыл бұрын
at 8:36.. how does it keep translating if the x-coordinate of the translate function is 0? in order for you to keep branching you need to translate to where you left off.Im guessing its the rotate function.. so everytime you rotate, draw a line, bounces back but the rotate angle stays the same so then it makes sense why its 0..
@deltaforce3329
@deltaforce3329 Жыл бұрын
God Bless you Sir !! Thank you for sharing this with us !!
@jithunniks
@jithunniks 6 жыл бұрын
I love it whenever you bring the slider :D
@atextful
@atextful 8 жыл бұрын
Daniel Shiffman, you are like a code showman :D. I really loved your book, keep being awesome!
@elektrozil9728
@elektrozil9728 8 жыл бұрын
D. Shiffman is a Fukin BEAST!!! (in my book)
@Fiskgjusen
@Fiskgjusen 8 жыл бұрын
Alfred Rivera 100% agree
@benturner4368
@benturner4368 8 жыл бұрын
Flawless transition at 6:00. No one will ever know the truth 😄
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
haha! Thanks.
@ChrisOrillia
@ChrisOrillia 6 жыл бұрын
Really good, and worth one's while -- Thank you, sir -- clearly you're the local commanding officer.
@vitorsal1015
@vitorsal1015 3 жыл бұрын
Thank you
@GarrettStelly
@GarrettStelly 8 жыл бұрын
how are you such a great performer? hardly any cuts or edits and still I'm tuned in.
@MistahBradley
@MistahBradley 8 жыл бұрын
I'm subbing to this guy. he'd be an awesome college professor, if he already isn't.
@MRplusfriend
@MRplusfriend 8 жыл бұрын
MistahBradley he actually teaches at a university :)
@MistahBradley
@MistahBradley 8 жыл бұрын
oh nice!
@MrCrazeyBanana
@MrCrazeyBanana 7 жыл бұрын
I learned how to java script out of you! You are my hero, my inspiration
@aakashyadav8327
@aakashyadav8327 4 жыл бұрын
I just love this video thank u for visualizing recursive functions
@andreamichel5115
@andreamichel5115 8 жыл бұрын
I'm glad i recently found about this channel. The way you explain programming is so entertaining and makes me want to try these challenges myself. Keep the good work ( does anyone know about any other channel similar to this one but with C/C++? )
@AnastasisGrammenos
@AnastasisGrammenos 8 жыл бұрын
voidrealms does c++ with QT, i find his tutorials always to the point. Also he has a cat
@TheDogn
@TheDogn 8 жыл бұрын
1:06 What prevents n! from reducing factorial-y beyond 0 into the negatives infinitly?
@Vigibrah
@Vigibrah 8 жыл бұрын
Tyler Toole because the factorial function is undefined for numbers less than zero. Indeed 0! = 1, and any number less than zero that is evaluated using the factorial function is NaN. In computer terms, you would say something like N=0 being the case case in the recursive function, and would simply return 1
@oooBASTIooo
@oooBASTIooo 8 жыл бұрын
yeah, he didn't define it correctly. But this is a programming course and it gives you the right idea. If you want to do it correctly, you'd say for n=0 we define n! = 1. For n>0, let n! = n * (n-1)!. I am not sure if you know it, but the factorial function is actually the number of permutations (rearrangements) of a sequence of length n. Thus, it makes no sense for negative numbers and is undefined.
@dangg6767
@dangg6767 8 жыл бұрын
for the first time i feelling regret to leave my IT majors in the university , coding is hell before i see this man . But i think i have to learn coding again . Thanks dude , P.s Sorry for my bad english
@EpicGames1234
@EpicGames1234 6 жыл бұрын
12:18 if you put that first rotate outside of the if statement you get a different generation with a bunch of circles, did it by mistake but it looks really cool
@dibayuin7859
@dibayuin7859 8 жыл бұрын
omaygod , he make coding looks simple
@0x15k
@0x15k 7 жыл бұрын
You are the best! Thank you for all!
@Beunique143
@Beunique143 3 жыл бұрын
You are great sir. It amazing, wow,and exciting me.👍💝💔💓 Thanks for sharing.
@vishalshiva14
@vishalshiva14 4 жыл бұрын
U are simply amazing👍👍
@Samit-r3h
@Samit-r3h 8 ай бұрын
Hey, just a suggestion, a really good way to teach recursion is to visualize it as a domino specifically am talking about the "reverse domino effect", the first time I heard of recursion that is what I pictured, I could explain it to you but I am sure you would get it the instant you search "reverse domino effect"...
@juschu85
@juschu85 8 жыл бұрын
1:15 Yes, it's allowed to do that. But it only works if you also define "1! = 1" In any recursive algorithm you need a break condition that stops the recurision.
@nabeelahsan504
@nabeelahsan504 5 жыл бұрын
The Bob Ross of coding
@BromanThings
@BromanThings 5 жыл бұрын
Hi Dan, or anyone who can explain this to me: at 5:30 Dan removes var len = 100; ...but the branch() function references the len after the defined variable has been deleted... - and if height - len == the top of the first branch, how does it know what the value of len is? Scratching my head on this one. You're a phenomenal teacher and I've already learned so much. Thanks!
@Linuxdirk
@Linuxdirk 2 жыл бұрын
Old video, but the concept is still great. I absolutely love what can be done with properly using recursive functions!
@vishweshbhalerao6798
@vishweshbhalerao6798 4 жыл бұрын
Thank you Dan! It turned out beautiful : )
@xntoniosm
@xntoniosm 5 жыл бұрын
how can you compile and run the project if you has not define "len" 6:57
@barreirocls
@barreirocls 5 жыл бұрын
how do you run script on a new window on chrome? whats the download link or the website?
@MrLuiyi02
@MrLuiyi02 8 жыл бұрын
Cool video and personality!!
@marythompson9116
@marythompson9116 2 жыл бұрын
I was thinking about Dr.Strange's Mirror Dimension but in VR. Remembered Peter in the last movie calling it a fractal. I decided to look up coding fractals because (Im a BS in CompSci and 10yr desktop .net dev) I hate math and recursion equally. I found myself genuinely enjoying this video. I love the visuals and the concept was easy to understand. I'm a bit troubled on how push/pop are working just thrown in there but it's probably just a java thing I don't know. Anyways. Awesome content!
@TheCodingTrain
@TheCodingTrain 2 жыл бұрын
I love this story! You should research the "Mandelbulb Fractal" that really is in the mirror dimension! If you want to learn more about push and pop you can start here: kzbin.info/www/bejne/pWrWmJ2rnZJ2eK8. Also, I have this video about recursion (that doesn't use push/pop): kzbin.info/www/bejne/oIHWi6qoi56fmpI in case it helps!
@TheaustrianLitrix
@TheaustrianLitrix 8 жыл бұрын
i lerned in 15 minutes of ur video more than in 2 years of programming in my school
@AYMENDEV
@AYMENDEV 4 жыл бұрын
Legend. Wallah Legend.
@PcPROBLEM
@PcPROBLEM 7 жыл бұрын
Which is the #include to use functions like createCanvas( ); , background( ); , line( ); etc that are used in this code challenge?
@yp5387
@yp5387 6 жыл бұрын
P5
@yp5387
@yp5387 6 жыл бұрын
I3
@leluong8743
@leluong8743 6 жыл бұрын
It is a library called p5 which you can download at p5js.org/
@sweethomes674
@sweethomes674 Жыл бұрын
Excellent techniques 😊
@aaronrios6470
@aaronrios6470 8 жыл бұрын
DRAGON CURVE!
@zydrunassavickas1
@zydrunassavickas1 8 жыл бұрын
12:30 when u unknowingly discover the dragon curve
@majakawalio2631
@majakawalio2631 7 жыл бұрын
Love you bro, you are amazing and such a blessing! THANK YOU!!
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Thank you for watching!
@majakawalio2631
@majakawalio2631 7 жыл бұрын
WITH PLEASURE ;'D
@angelcaru
@angelcaru 5 жыл бұрын
10:55 You can call createSlider(0,TWO_PI,PI/4,0); If the 4rth argument is 0 itll move continously
@சிந்தித்துஅறிவோம்
@சிந்தித்துஅறிவோம் 3 жыл бұрын
I love coding... and You...😊
@BlueProgamer212
@BlueProgamer212 3 жыл бұрын
Good shi-
@corvovaro2893
@corvovaro2893 8 жыл бұрын
You explain stuff so well. Do you have a intro to recursion for java tut by any chance?
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
take a look at these kzbin.info/aero/PLRqwX-V7Uu6bXUJvjnMWGU5SmjhI-OXef
@corvovaro2893
@corvovaro2893 8 жыл бұрын
Daniel Shiffman Thanks a lot! You're the best!
@ShivamJha00
@ShivamJha00 7 жыл бұрын
Wew, he is too good at it man... He must be a millionarie
@deadpiece111
@deadpiece111 7 жыл бұрын
i don't know why but i like this channel. (y)
@thinamo7750
@thinamo7750 8 жыл бұрын
you deserve Way more abos
@JABigburls
@JABigburls 8 жыл бұрын
You got great videos, good work!
@elpianisto26
@elpianisto26 8 жыл бұрын
I am not programming at all but I enjoy listening to your videos
@MRRoeleveld
@MRRoeleveld 6 жыл бұрын
This was a great watch, thanks!
@MetallicDETHmaiden
@MetallicDETHmaiden 7 жыл бұрын
I love this channel!!!!!!!!!
@Sorestlor
@Sorestlor 8 жыл бұрын
remember making my first recursive tree in grade 10. We had only been coding about 3 months in python. Good times.
@TamilistTheGamer
@TamilistTheGamer 8 жыл бұрын
Tristhal They taught programming at your high school? I wish mine did that when I was there.
@TetriarchCZ
@TetriarchCZ 8 жыл бұрын
I am mostly c++ programmer, I tried JS few times and it had a charm but not as strong as c++. This video kinda makes me try JS again, not just because of fractals I love so much, but also because of the way a one can develop in it. I wanna try out this p5.js library, can anybody tell me what licence it has? @Daniel Shiffman: I like your way to explain things. ;) Keep up with great work!
@TheCodingTrain
@TheCodingTrain 8 жыл бұрын
thanks so much for the feedback!
@defense200x
@defense200x 8 жыл бұрын
GNU LGPL
@robinchetan8
@robinchetan8 7 жыл бұрын
can u tell me which language/s/w to learn for 3d animation
@edgarspavlovics3540
@edgarspavlovics3540 7 жыл бұрын
Im not even a coder and this is fantastic
@charlie_mk7.5
@charlie_mk7.5 4 жыл бұрын
damn I remember doing those a few years back at school using opengl. That was one of the exams, I actually always thought this was one of the easier ones but it looks so great
@bachana1231
@bachana1231 6 жыл бұрын
Omg i love youuu!!!! I want to learn EVERYTHING WHAT YOU KNOW!!!!! 😍😍😍
@MaxJoyce1
@MaxJoyce1 8 жыл бұрын
nice one dude, you are funny guy, continue to do this staff )) respect from Russia ;)
@svanse45.56
@svanse45.56 6 жыл бұрын
I love you and your channel so much. I will try to learn Javascript.
@themike97_58
@themike97_58 6 жыл бұрын
what is the difference between using "function branch(args) {}" instead of "branch = function(args) {}". I know that the first i can treat as an object so i can instantiate is like "branch = new branch(args)" but otherwise is there really a big difference?
@tomg8671
@tomg8671 7 жыл бұрын
this is a really good challenge video
@anamariaarbelaezlopez4783
@anamariaarbelaezlopez4783 2 жыл бұрын
Thank you for sharing!!! ♥
Coding Challenge #16: L-System Fractal Trees
22:02
The Coding Train
Рет қаралды 229 М.
Coding Challenge #71: Minesweeper
53:46
The Coding Train
Рет қаралды 533 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Coding Challenge 182: Apollonian Gasket Fractal
56:48
The Coding Train
Рет қаралды 90 М.
Coding Challenge 168: MandelBulb 3D Fractal
28:02
The Coding Train
Рет қаралды 378 М.
The Genius Way Computers Multiply Big Numbers
22:04
PurpleMind
Рет қаралды 302 М.
Large Language Models explained briefly
7:58
3Blue1Brown
Рет қаралды 1,1 МЛН
Coding Challenge 181: Weighted Voronoi Stippling
28:59
The Coding Train
Рет қаралды 181 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 202 М.
I Made A Water Computer And It Actually Works
16:30
Steve Mould
Рет қаралды 7 МЛН
The Latest Celebrity Tech Scam…
19:21
Linus Tech Tips
Рет қаралды 383 М.
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 1,1 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН