Coding Challenge #50.1: Animated Circle Packing - Part 1

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


References:

Videos:

Related Coding Challenges:

Timestamps:
0:00 Introduction
0:47 Circle Packing by Marius Watz
1:09 Create a Circle class
3:06 Add show()
4:22 Create an ArrayList
5:34 Null pointer exception
6:26 Add a grow() function
6:52 Add an edges() function
9:25 Add new circles at random x, y
10:07 Only add valid circles
14:03 Check for overlapping circles
16:02 Make sure circle is not checking itself
20:53 Seed circles based on pixel color
22:06 Read the pixels of an image
23:30 Add circles based on brightness of pixel

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

#loadpixels #circlepacking #processingpixels #processing
Рекомендации по теме
Комментарии
Автор

You are like the Bob Ross of programming :)

WnuckVader
Автор

I'll never get tired of your videos, Dan <3 This was awesome

nahueljo
Автор

Shuffle the ArrayList spots during initialization, then, when choosing a spot later, simply .pop() off the last element. When spots becomes empty, you are done.

BenjaminGoldberg
Автор

guess what, I had no previous experience with java before, only C++ base level, and after watching this video I was able to take this program a step further and make the circles smaller when they collide, then growing again and so on. I am so proud of myself

paulfarcas
Автор

he's such a great mentor and programmer. It blew my mind.

ShoSho-cqct
Автор

Thank you so much for this tutorial. Helped me to make a Happy Birthday message for my mom during this quarantine. Even my 7 year old sister is doing a lot of projects while watching your videos. We both absolutely love your channel and videos. Keep making such awesome stuff.

anjalisethi
Автор

Dan, você tem a melhor forma de ensinar:
Inicia do ponto zero, erra e mostra o porquê e ainda não se prende a explicações cansativas.
Para aqueles que estão começando, mostra como um programador pensa. Isso é uma riqueza que você dá de graça.
Nós programadores pensamos assim, mas de forma mística, não conseguimos transformar esse pensamento em fala, quando ensinamos a alguém.

Alem disso, o inglês é bem "suitable" para estrangeiros, além de divertido!

("Circle, you are my friend!")

DiegoSayron
Автор

Back in the day (Atari 800 or IBM PC) if we wanted to work with the shapes of characters you could find the piece of memory where they were defined and grab the actual 8 bytes of the bitmap info for a character. Those were the days! Dan has brought me back to coding after a long time!

zrodger
Автор

I love when I search for a problem I'm having and The Coding Train has a video up on it because I know it will have everything I want to know!

nacs
Автор

14:30 When you check if c overlaps with other, you could stop both c and other from growing, instead of just c.

tetamusha
Автор

during checking, if the circle is valid (not intersecting with another circle)
I added a +1 or +(strokeWeight) to c.r
so its if(d<c.r+1) it generates much better this way.



Love your coding challenge hope you the best for your channel

kyukitagawa
Автор

This man and his enthusiasm make me want to pick up programming again

MrMinusguy
Автор

I know next to nothing about coding, but I can't stop watching your videos, they are fascinating. Thanks for posting them!

Miklethun
Автор

i believe, that the condition 'if (d < c.r)' in the function 'newCircle' should read 'if (d < c.r + r)', where 'r' is the radius of the new circle.
Consider this: let nc = Circle(x=0, y=0, r=1), c = Circle(x = 5/2, y = 0, r = 2). they clearly overlap (just draw them), yet 5/2 = d(nc, c) > c.r = 2. on the other hand 5/2 = d(nc, c) < c.r + r = 3.
my point is, that new circles already have a positive radius, and we probably shouldn't neglect it.

michalbotor
Автор

Hello, it has taken your videos to make me love coding enough to learn it. Thank you! It has been something I have always wanted to do but you got me to do it.

benbirch
Автор

As a person, that could create such a code mabye at an entire weekend with lots of searching in the internet, I need to say: You are AWESOME!

cirithor
Автор

I did this one today. Mind blowing. Need to get back on the subscription service.

djtygre
Автор

Dthis guy is amazing, i love how he solves problems !!

MrVaunorage
Автор

These Challenges are really good I love them

KhaledAlmunla
Автор

This was awesome! Sometimes I like to wake up in the morning and watch one of these to get my brain working before I start my day, and this certainly deserves a re-watch!!

DowzerWTP