Coding Challenge #123: Chaos Game Part 2

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


References:

Videos:

Thinkercon Shoutouts:

Related Coding Challenges:

Timestamps:
0:00 Introduction
1:15 Make an array called points
2:06 Add the current point
3:04 Show seedpoints
3:50 Lerp between current and next
4:29 Draw point
4:55 reset()
6:30 Place points around circle
7:30 Define angle
8:02 Make vector from angle
9:36 Add percent variable
11:23 Make pentagon
12:06 Add constraint on next point
13:20 What could you do?

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

#chaosgame #fractal #seedpoints #probability #p5js #javascript
Рекомендации по теме
Комментарии
Автор

with four points you get the serpinski tetrahedron. it is hard to see because there is no depth

AB-Prince
Автор

I did a bit a refactoring, added objects, added a HUD, and some stuffs.
Press 1 or 2 to generate a new random config. Right/Left to navigate between passed configs.I plane to add 3D to it and others chaos's formulas.

Velppp
Автор

I love your enthusiasm sir... It just feel like coding is simple and we can do it.

aparajitasatish
Автор

A great song brings a great responsibility! XDD

luismiguelgallegogomez
Автор

That "cloud of points" reminded me of the electron orbiting the nucleus. It made me wonder if the motions of electrons can be represented with this fractal math

anteconfig
Автор

Love the patterns! these videos are priceless! Thank you again!

jahquantum
Автор

How could this be saved as an animated GIF? Any ideas/help? Thank you Mr Shiffman

cuchitp
Автор

These videos keep my coding muscle from atrophy.

MajorMandyKitten
Автор

Thank you for creating this. It inspired me to create some wonderful art.

In a series of experiments, I overlaid the images formed by different alpha values (alpha as in the percent distance covered). For one set of polygons, I overlaid images of alpha zero to alpha one. For another set, I let alpha go beyond one and until two (this created overshooting patterns from the vertices of the polygon). I also did these two experiments with the restriction that no vertex can be visited twice consecutively.


For the future I was wondering if you could do a tutorial about how to pull satellite data from, say, himawari 8. I was really interested in creating a timelapse of the Australian bushfires from the satellite but I could not figure out. Thanks a lot again.

HasnainRaza-dpbw
Автор

This would've helped me so much in my last year university degree... Amazing content btw, this kind of videos were the reason why I started following the channel. Thanks so much :)

Joseayllonll
Автор

As always pre watching the video before release because of description

thomas
Автор

Awesome stuff! Goint to try it out after my exams :)

nassav
Автор

Could anybody tell me what Wikipedia means by "A point inside a square repeatedly jumps half of the distance towards a randomly chosen vertex, but the currently chosen vertex cannot be 1 or 3 places, respectively away from the two previously chosen vertices." ?? I mean you always choose one vertex so what the hell do they mean by 2 previously chosen vertices? I'm sure it's simple but it's either badly worded or I'm just an idiot because I cannot get this rule to work.

AndrewB_NNA
Автор

14:20 am I the only one seeing Aztec faces?!?! 😱

TylerMatthewHarris
Автор

Literally just finished the first part, yay

Smikay
Автор

i added if(next !== previous) condition but fractal not changed

deadpezid
Автор

Anyone reading this try 61.8 percent with a pentagon. That's inverse of golden ratio in percentage.

Makes a beautiful pattern.

lucygaming
Автор

Can someone tell me how to add the neighboring factor into this?
I want to do this:

A point inside a pentagon repeatedly jumps half of the distance towards a randomly chosen vertex, but the currently chosen vertex cannot neighbor the previously chosen vertex if the two previously chosen vertices are the same.


Code:
for (let i = 0; i < 1000; i++) {
strokeWeight(1);
stroke(255);
let next = random(points);
if (previous !== next) {
current.x = lerp(current.x, next.x, percent);
current.y = lerp(current.y, next.y, percent);
point(current.x, current.y);
}
previous = next;
}

ixjaroston
Автор

Did it slightly differently yesterday. For some reason however, for 4 different elements, i just got static noise.

Smittel
Автор

when you inadvertently design a JS graphics engine

j.c.