Coding Challenge 108: Barnsley Fern

preview_player
Показать описание


Links Discussed:

Videos:

Related Coding Challenges:

Timestamps:
0:00 Introducing today's topic
0:49 Discuss the algorithm
2:23 Explanation of matrix algebra
4:20 Let's Code!
5:24 Input the transformation formula for next x and y
7:15 Remap the values to the width and height of the canvas
8:32 Add other transformation formulas for next x and y
11:12 Pick a random number to choose the transformation
12:08 Add nextPoint, drawPoint functions
13:51 Add probabilities
15:57 Update the range
16:41 Thanks for watching!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#fractals #algorithmicbotany #p5js #javascript
Рекомендации по теме
Комментарии
Автор

Seriously, you are becoming one of my favorite channels.

RexTorres
Автор

I've got it! For the past like 3 weeks I've been binge-watching your videos, Dan, and I've learned more about programming in that short amount of time than I've ever learned before. But, the thing that's been eating away at me is simply how you are such a wonderful teacher with these videos. I've been trying to figure it out, and I have, at least for my experience. It's that it's not like teaching! It's like a conversation! You make mistakes, like we all do and will, and you make silly awesome dad jokes, and most importantly when you explain concepts you use very simple analogies and clear depictions. Many have said this before me, but you a natural teacher, and I truly hope you never stop making these videos, because I know they've reignited my love of programming, and I'll never stop being happy when I see a new video of yours pop up in my subscription box! Thank you!

allaheadflank
Автор

Another excellent challenge. ☺
(I love fractals)

Invalid
Автор

3 hours 45 mins!! So glad I watched the edited version. Great coding challenge as always 👍🏼

MetalStorm
Автор

Man... I'm always amaized how simple this generations are, maths are beautiful!!

keff_cb
Автор

amazing! that feeling when the fern appeared is so satisfying <3

amanadwani
Автор

Huh, this is really cool! ( I played around with it for two seconds and decided to change 'stroke(255);' to 'stroke(random(255));', and it gives it a glittery effect. )

OrangeC
Автор

omg thanks Dan really, i'm learning programming with your processing tutorials videos and this is helping me a lot (also to improve my english). REALLY thank you so much and greetings from Italy XD

Guglioz
Автор

You're giving me all kinds of motivation to do some more casual little coding challenges! Subbed, thanks for the inspiration :)

Rocknoob
Автор

Only when he said it was a fractal at the end did I realise. Amazing video

celiacasimiro
Автор

15:08 I though he was gonna throw that stick :D

Kitulous
Автор

this is so freakin cool. i hope to understand this fully in a few months haha!

senpaibonsai
Автор

At 8:00 this fixed point, if you consider the 3x3 affine transformation matrix A, its actually an eigenvector with length 1!

Av = λv <=> Av=v
(applying the affine transform A to v (Av) gives (=) back the inital vector v)

giorgosd
Автор

Thanks as always for a great tutorial Dan.

dannorris
Автор

You should try doing Recamán Sequence with processing/p5.js

YourSuizo
Автор

I feel like I'm not nerd-y enough everytime when I watch codetrain

snowman
Автор

Daniel I have noticed that when you draw a rectangle on the board it is always a lille bit jagged to the bottom right. Then I realised that from your perspective while you draw it, it should appear fairly rectangular.

Cunit
Автор

Awesome tutorial, idk if you’ve done this before but I would want to see some videos on how to do fluid simulations applying the physics behind it :D

tx
Автор

How do you find all of these neat algorithms? I'd like to research my own but I don't even know what to search for. I'd never think to look up ferns

IsaacAshtox
Автор

oh! thanks for the link to the video about matrix math!

Maolo