How I made my own Fractal
ฝัง
- เผยแพร่เมื่อ 22 พ.ค. 2024
- In this video I explain how I came up with my own fractal and also how you can do the same.
Music used: 1812 overture and waltz of the flowers both by Tchaikovsky
chapters:
0:00 intro
0:46 how it works
2:29 Level 4
3:43 other levels
8:20 shadow versions
9:12 bi versions
10:58 shadow skew
12:02 psychedelic versions
13:04 shadow psych
13:43 product versions
16:27 outro - วิทยาศาสตร์และเทคโนโลยี
You didn’t make one fractal, you’ve made infinite families of fractals.
Are fractals made or just discovered?
A fractal?!
A fractal of fractals lol
@@JackSalzmanjust a regular fractal
@@readtruth6670 you could ask that about anything in math
I remember being obsessed with Conway's game of life and trying to make a 1D version of it on a spreadsheet (with time progressing on the vertical axis). In doing so I accidentally discovered rule 126 (if three adjacent cells have a sum of 1 or 2, then the center cell underneath has a value of 1, otherwise it has a value of 0) and created a Sierpinski triangle, which pleased me greatly. I assume it's a specific case of your class of fractals, and follows the same rule as your n=3 instance at 4:17.
For those wanting to replicate it, in LibreOffice Calc, you can paste the formula =IF(OR(SUM(A1:C1)=1,SUM(A1:C1)=2),1,0) in the B2 cell and drag the formula across the whole sheet (don't drag it on the col A and row 1 though, leave those empty), and write 1 in any cell in the first row. It's particularly fun to see the patterns it builds when you have more than one full cell in your initial conditions.
Very smart idea! I had a similar obsession a few years ago.
now i gotta see conways game of life with time on the third axis
This was super interesting! I wonder if that has already investigated before. If not, I'm definitely rooting for the term Kuvina Triangle!
You obviously put a lot of work in these videos, and the content is really good. I'm kind of amazed that you put this video out so quickly after the last one *checks channel* 13 days ago. This is severely awesome ^^ All the best to you! Hope you have fun, and don't overwork yourself.
thank you! It's really considerate of you to be concerned whether I'm overworking myself, and I assure you I'm not. I do these for fun, and I have a lot more time for that now that it's summer break and I finished my 3rd year of college.
@@Kuvina don't know if you've figured this out but i found a connection between these fractals and John Conway's game of life.
As you may know John Conway's game of life or "Life" for short is a case of celular automaton a.k.a. a game of zero players, wich means once the initial state is set; the "game" plays itself.
The thing is that the Sierpinski Triangle can also be generated with the simple rules that make celular automaton so special, the difference is that while life takes place in a 2 dimensional grid, the Sierpinski Triangle (or any of your versions) in a 1 dimensional array, but each generation is plotted in each row of the triangles, unlike with like, in wich you usually just see one iteration at a time, here's what I mean:
To start the Sierpinski Triangle start with an infinite array of black squares with only one being white:
⬜⬛⬛⬛⬛⬛⬛⬛
This is the first iteration/row of the Sierpinski triangle, for the next iteration each square checks if the square above and the one above to the left have different states, giving arise to the next generation:
⬜⬜⬛⬛⬛⬛⬛⬛
This operation of checking if two states are different is also known as the bitwise xor operation, a.k.a. the summation mod 2, wich also gives arise to the pascal triangle. Iterating this process over and over again, such as done in celular automaton finally generates the Sierpinski Triangle:
⬜⬛⬛⬛⬛⬛⬛⬛
⬜⬜⬛⬛⬛⬛⬛⬛
⬜⬛⬜⬛⬛⬛⬛⬛
⬜⬜⬜⬜⬛⬛⬛⬛
⬜⬛⬛⬛⬜⬛⬛⬛
⬜⬜⬛⬛⬜⬜⬛⬛
⬜⬛⬜⬛⬜⬛⬜⬛
⬜⬜⬜⬜⬜⬜⬜⬜
Each of your own versions can also be expressed as a celular automaton with its unique rules, with the modulus being the ammount of different states/colors.
@@Tarou9000 For anyone else reading these one dimensional cellular automata are called the Elementary Cellular Automata (ECA), and there is a lot of research done into these.
The most famous one is called rule 22 (from the binary number that defines its ruleset) which creates the Sierpinski triangle.
Not sure why this needs a specific name when it's really the combination of the Pascal's Triangle and the Sierpinski Triangle, which are both not new.
@@Tarou9000 holy shit images in youtube comments
That's pretty interesting, this is like a fractal that you can infinitely zoom out on instead of infinitely zooming in on. One thing I've noticed is that the level 2 one is actually just rule 150, the 1D cellular automata, which is "one of the eight additive elementary cellular automata" according to Wolfram and as a result, it's already fairly well studied. Looking at Rule 150 might give more insight to the family itself.
not really, thats kinda the same as saying, oh if i copy this triangle down there, and down there, i can zoom out, so the Sierpinski triangle is actually infinitely large and you can zoom out, not in
I invented with same fractal about 8 years ago a different method. Its cool to find someone explore and re-discover/ also found this fractal
oh!
You invented eh?
ah yes, *you invented with* same fractal
@@orrinpants yall are ripping into this person damn 😭
i have a weakness for these kinds of explorations. amazing video kuvina!
Heya, I came up with this 2 years ago! Cool that someone else thought of it independently, though I took it a bit farther in a different direction. This isn't really a 2d fractal, or well it is, but it can be thought of as having 1 spacial dimension and 1 temporal. I use 2 spacial and a time dimension. There is a defined list of "neighbors", and between each update each cell will add itself to all its neighbors. Some especially pretty ones are the neighbors being knights moves, and having it reach in all 8 directions!
I saw you in 3blue1brown's comment section, not gonna lie I dont regret coming here.
The basis for this fractal is the trinomial triangle, so named because the terms of each row correspond to the coefficients of expansions of trinomial expressions. I independently discovered this when trying to figure out how to describe the outputs of the probability distribution of rolling 3 dice, then found there's already a body of research on it, from Euler to Wikipedia!
I love your variations of it, and I particularly like how the fractal for n = 127 looks like it has cool sunglasses on, and how product 48 makes the pan flag. You might also be interested in Rule 90 and other related 1D cellular cellular automata. I spent a while nerding out about these.
pan flag?
you high?
@@TheRookieWarrior look up “pan flag”
the wow jumpscare
Spooky, we are on sync, I did the exact same 6 months ago.
But a Trinomial Triangle is for when you roll 3-sided dice.
If you want to get the odds for regular dice, you need a Sextic Triangle
Since each composite triangle is a composition of its factors, you could theoretically use this for encryption
Or rather decryption
These are so cool! I also really love the lesson at the end of, if you have something, tweak and change it to see what happens. I still remember sometimes where I was trying to solve something, and that tip helped so much. Also to answer your question: My favorite is Product 30
I found this while watching TV. I do not regret it. Very underrated and well done!
I fully support your documentary style TH-cam content! I just discovered this channel yesterday with the spectral lines video, and immediately subscribed. ❤
Keep up the good work and amazing content!
The fact that there are distinct triangles mage out of squares is amazing
ah yes, *mage* of squares
wait till you hear about pixels
a lot of the prime fractals there look like they could make for great noise generation! Like especially when you look at one corresponding to 107, you can already see how it is incredibly irregular, looking like some sort of fog! I like it very cool
I liked level 3 and any variations on it :)
This is criminally underrated, at least in my opinion! This is so cool and experimental, and I just love it. I would like to know how you generated these so I can play around with similar things. Keep doing what you are doing, and I hope you get more love!
Woahhhhh this is so cool, glad I found your channel with this video!
Hmm, now wondering about the possibility of Shadow Product variations, since division is a defined operation for the integers mod p. Sadly I don't think there's an intuitive rule that works for non-prime bases, though. I do love how composite numbers literally show up as a *composite* of their factors. Amazing video
Im curious how you generated the images used. I certainly may be able to make my own code to do something similar, but if the code used for this video was available it'd make it a lot easier for people to implement their own variations!
I made the program myself and set the default value from 0 to 1 and made the "seed" 2 instead of 1. This makes the product versions without the 1 added work! Fun fact: Natural product level 3 looks identical to normal level 2!
Very cool! I love your presentation and imagination, also this reminds me of the elementary automata
bro great job!! this is legitimately so underrated.
This was awesome, thank you for creating this!
You forgot to mention how product 10 is an arrow pointing upwards
7:55 cool glasses tho
13:14 THE GAY SEED
These types of things are my favorite applications/uses of math where the creativity and exploration really shines, awesome concept and great variations
The Kuvina triangle fractal looks very similar to the IFS version of the Sierpinski triangle but with an additional choice point at the center of the base of the triangle, which is also a projection of the 3D Sierpinski pyramid.
The generated family appears to be an extension of the way that 1D cellular automata have been shared for quite some time.
I remember discovering these about 8 years ago when i was 16, there was a Processing IDE for android and I used to mess around with little code snippets. I wanted to see what pascals triangle would look like mod 2, and was surprised to come across the familiar sirpinsky triangle, tried it out with different moduli and found they made amazing shapes. I looked it up though and found that many had discovered this before me. oh well!
really enjoyed the video! the pretty colors are nice on my deliriously sleep-deprived brain
level 5 and 7 are beautiful but my favorite one has to be 29
127 looks like a static triangle with triangle sunglasses
You did not just make a fractal you made a whole family for that fractal
Such awesome content!
You make the doodles I draw, but wish I could program.
The product 10 one looks like it could an alien spaceship in some DOS-era video game shooting a laser downwards
Don't forget to check out my new video on the almost platonic solids!
th-cam.com/video/_QxrkEqOrWM/w-d-xo.html
Also, the name I would now propose is the trinomial fractal.
YOOOOOO 34 MINUTES AGO
What only a few minutes ago poggers
he the
For everyone going off about how they found the video right after the person who made it commented:
It's probably because the video's been up for a year, but just now hit the YT algorithm and is being shown to a lot more people, and the channel owner noticed this and made a comment.
(also kuvina if you see this, this is a really great video)
@@bluetintedchromee3881
ꙡ́ѯ̑ҁир҄ѳꙡйцаицп
[1[1∆2]∆⁵3Ꙙ²3]
13:20 makes sense, the first layer is all zeroes, so a, b, c are same. So we can represent them by x. So we have x-x+x+1, or 2x-x+1. This results in x+1, meaning that every row is 1 more then the earlier row, causing the rainbow. Isn’t math beautiful sometimes?
product 10 looks like an octopus driving a car
product 16 looks like people in a boat paddling
This is very similar to if you perform the mod (2) on the pascal triangle you get the Serpinksy triangle. Blew my mind as a kid
A great video! You commented on a fractal post I made on Twitter; that’s how I found this. 😊
This is sooo cool!
after this video, my keyboard floated to unknown lands
@0:18 Fractals are not necessarily self similar. Source: th-cam.com/video/gB9n2gHsHN4/w-d-xo.html
@2:33 beautiful!
@6:34 Your audio recording quality went way up at this point.
Very nice video! I saw your comment on the 3B1B summer of math exposition and I decided to check your videos out. Good luck in this years competition!
Thank you for your compliments! I'm fully aware that fractals aren't necessarily self similar, but I just wanted a simple definition that I could get through quickly, so that's what I went with. I made sure to say that it's only a *colloquial* definition, ie. one that is commonly used but not necessarily correct. But I do kindov regret not making it clear enough, because I really don't want to spread false information
I find it interesting how our intuitions differ, you seemed somewhat surprised by the results, while i expected them from the formulas you used, they're all very interesting, specially the bi ones
My favorite was definitely product! 😍
I've done a lot of work on the p = 5 version with rows with a finite width where it wraps around, so if you have a row with m elements, the rule for x[n + 1] is
x[n + 1][k] = (x_n[(k - 1 + m) % m] + x_n[k] + x_n[(k + 1) % m]) % p
In my case, I wanted to study questions like "How long does it go before it repeats?" and "How long is the delay before it gets into a cycle?" It turns out you can study both of those by converting the rule to a matrix and then finding the generalized eigenvalues in some finite field of characteristic p. The problem with this approach is that it only works if p is prime, but this video gave me an idea. As you've pointed out, though, you can make the composite triangles out of the triangles made of their prime factors. I can then use this insight to study the p = 6 case by studying the p = 2 and the p = 3 case and then combining their results with the Chinese Remainder Theorem. This should definitely work as long as p can be factored into unique primes, but it might get stuck on cases like p = 4. I'll have to think more about it.
Anyway, I'm definitely subscribing to this channel. Keep making cool stuff.
That's awesome!
This is so cool!!! I’m very curious, which number generations of the product variation produce solid color backgrounds??
The psychedelic shadow fractals are just the worst rainbow generator
Product is the most variation I like it the most cause it’s produce actual unique ruglar patterns I mean tge patterns it produces are coherent and great in a special way
This brings me to a great idea for a prime factorization algorithm.
Generate this fractal and compare it to all fractals of the number below!
Now thats peak efficiency.
The formula for the product version looks similar to things which are often used as pseudorandom number generators, and the patterns exhibit some of the behaviours found there. For some moduli it falls into a repeating pattern, for others it goes through all possible state values in a randomish way. Except here there are infinitely many states, so some of the patterns will continue to grow forever without repeating.
I discovered the prime/composite thing myself a while ago while playing with Pascal's triangle mod n. If you plot with just two colours for zero/nonzero the pattern for primes shows up very clearly. In simple cases you can look at a pattern and kind of see its prime factors.
I wondered briefly if I'd discovered a useful algorithm for identifying primes, but it turns out to be just as much work as doing it one of the traditional ways. :-(
what if the product version only multiplied non-zero numbers and if there was nothing left to multiply, then it's just zero 🤔
pchycedelic 107 gotta be one of my favorites.
who knew a 1-year old video would push me into making my own fractals?
What about adding the two left and right numbers and multiplying by the one in the middle, i.e. (a+c)*b? You might be interested in looking into Stephen Wolfram's book "A New Kind of Science" - he explores similar ideas there (the book title is a bit over the top, though - in my humble opinion).
This is so cool.
(16:09) Fun fact: I once saw the number 103 in a dream. It was the age rating of a movie that my parents were watching on Netflix.
I'd really like to see the product versions with more generations. The seemingly random colors inside the triangles seem to have some sort of pattern, but the image is too small to show them fully.
now that is awesome
It's also really cool if you use decimal numbers above 1 (1.1 is really cool)
Something about the regular 5 felt very festive to me.
That's definitely new. Also it's similar to 1d game of life, I recommend checking that one out some day
7:55 don't fool us level 127 is just a triangle with sunglasses
this is really cool
what happens when the start conditions are randomized during the fractal creation?
I'd love to play with the code, have you published it anywhere?
I'd like to see the standard one at n= a high prime, at high resolution, so see if there's any pattern to the colors of the body
this is not just one fractal, but an entire family! the "Kuvina Set" i guess
I made a fractal on desmos with the equation "cos(ln(x²)) > cos(ln(y²))"
The Kuvina triangle is equivalent to a history diagram (I'm not sure what the proper technical name is) of a 4 color one dimensional cellular automaton. I can't be bothered to work out the rule number though.
@Kuvina Saydaki my fav number is 4 too
omg the one with the full rainbow
idea: basically take the original fractal with the module factor but n decides the module AND the amount of rows a number checks.
I remember making a program to draw Sierpinsky's triangle in Scratch (sorry i was like 13, don't make fun) than I made this fractal since it was an obvious generalization but I didn't realize that it had these nice properties
I've independently found the level 2 one a long time ago (not sure if that was before or after the video was published)
This is how the mind works! Starting with Stephen Wolfram's ideas and running. I wonder if you've seen the equation y=rx(x-1)? It produces chaos after bifurcating. There's a special factor "r" that can model predator prey simulations. I wonder if you could add a spice of randomness to eliminate the mirror down the middle effect? Anyway, great video! Math is all related. So is thought. My work deals with creating AI. There's something called the AI alignment problem. Could an AI be good in all of its decisions? What would make AI "fair and balanced?" Why fractals of course. And symmetry! Like a tree grows, so do thoughts.
Could you elaborate on your thoughts about the AI alignment problem?
What happens if you add 1 for each row? Or if you add the difference between the background and 0, so that the background is always black, what happens to the triangle?
if you do the one above, the two on the edge, and the two on the left and right of them are included, what happens?
cool also my fav was shadow psychadelic
I love how psychedelic 13 is just Germany on r/place
Product 10. Nice arrow.
Cool, you rediscovered cellular automata! Even with multiple states, not just binary. You should test if you can create one that exhibits Class 4 behavior like Rule 110! Perhaps you can see some glider behavior!
so i was messing around with this, trying out some different rules for generating the numbers and i found some cool stuff mostly by messing with exponents
a^2+b^2+c^2 is really boring except mod 3 for some reason, i suspect my code might be bugged but if it isnt that fascinates me
a^2-b^2+c^2 is very interesting however, especially for powers of 2
a^2*b^2*c^2 is pretty cool
a^b+c is quite interesting
a^3+b^3+c^3 is pretty fun
a*b+c is also very interesting
a^b^c is surprisingly boring but a^b^c+1 is really cool
a+b^2+c^3 is cool also
a+b*2+c is fun, especially on powers of 2
a*b+a+b+c*3 is fascinating
(a*c)^b+1
i believe these technically qualify as one dimensional cellular automata, and a lot of the patterns are quite reminiscent of elementary cellular automata
alright found some more
(a*b*c)^(a+b+c)
a^b^a^c+1
a^2*b^2*c^2+1 is very chaotic on most primes except 17 for some reason, also with very big numbers something interesting happens
elementary cellular automata but more ✨fabulous✨
I wonder if you could do this without the modulo operator at all (the same as mod infinity), it would contain every version of this fractal in the same way as composite numbers. if so, were one able to see all the infinite wavelengths of light, and of course generated it with an infinite or at least much larger resolution, it would be possible to see the entire fractal all at once in its full glory.
moral of the story: modulos are f****** awesome!!!!!!!
In higher maths land it's considered a bit self-aggrandizing to name anything at all after yourself. You give it a generic name and then it's up to other investigators to decide what to call it in their own work. Sometimes people will put some effort into figuring out who really came up with an idea first, and call it by that person's name; or they will choose the person who did the most to popularize or investigate the object. Ideally of course, things get defined mathematically, so it doesn't matter which option is taken.
Amazing. No favourites, awesome
it would be cool to have a program where we could mess around with the rules and make our own patterns with this kind of idea :O
I love the psychedelic ones!
My favorites were the product power of 2, I like how they look lol me a spine.
Have you tried averaging all of these different fractals to see how they combine?
How about shadow product? Multiply a and c and divide by b? Or product skew? Or shadow product skew?
I hope you'll do a new video with new ideas to add to this family someday ^^
the psychedelic bi versions are missing and I hinted a f(a,b,c) =(a+1).(b+1).(c+1)-1 to "solve the background" of the regular psychedelics
the product one was definitly my favorite
I think bi versions are most uninteresting. It's just "Prime numbers dividing triannge into T(n) pieces and composite numbers reflecting their prime factors". Bi skew versions are same, but skewed. I think shadow skew versions are most interesting, because they're not actually skewed and primes make unique pattern that are different from regular versions. Product version are also interesting, because they don't make triangles, just stripes with patterns.
I'm a bit sad that we didn't get to see product fractal 25 does it still die out random point? Does it have random other triangles? what happens there
multiply the sides, add the middle?
i would be so happy if you made a website that let us generate these
14:47 wait wait wait product 5 just dies?!?! Why 5? Are there any other primes that eventually just make the entire row the same value but we didn’t get enough rows to see it happen?
awesome