The Beauty of Prime Numbers

  Рет қаралды 45,350

Coder Space

Coder Space

Күн бұрын

Пікірлер: 120
@DrGold-ks1mp
@DrGold-ks1mp 2 жыл бұрын
I can't believe I only just found this channel, it's literally perfectly aligned with my interests. Great video!
@jeffcummings3842
@jeffcummings3842 2 жыл бұрын
ditto! Thanks for sharing.
@tyjacobs6822
@tyjacobs6822 9 ай бұрын
0:40
@zack3g
@zack3g 2 жыл бұрын
The ending looks like the pipe screen savers of the 90s.
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
at first i thought the same 😅
@zack3g
@zack3g 2 жыл бұрын
@@CoderSpaceChannel There's something really familiar about the movement. Maybe they used primes to drive those pipes.
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
I think it's more based on randomness, with a check for a free direction of movement
@tyjacobs6822
@tyjacobs6822 9 ай бұрын
1:30
@tyjacobs6822
@tyjacobs6822 9 ай бұрын
1:30
@fredg8328
@fredg8328 8 ай бұрын
Fun fact: get rid of prime numbers and simply play with XOR and OR functions and you will see Sierpinsky triangles appear. In fact it appears in various places when you play with datas like in the "chaos game" or the blood rhesus table.
@Chickenwing38nigeria
@Chickenwing38nigeria 2 жыл бұрын
I'm currently binge watching all of your videos, love it!!
@SeanStClair-cr9jl
@SeanStClair-cr9jl 2 жыл бұрын
DAAAAAAAMN bro. DAMN. Not only did you create a really nice video (love how specific you were with how you implemented things), but that ending structure is fucking INSPIRED lol. Like... what does that shape look like once it is "finished" haha.... damn. So curious. It would be mind-blowing if it somehow returned to the start :P but that seems impossible. So many interesting mathematical implications from a generation like that; I hope someone dedicates more study to your creation!
@Jeremy_Moro
@Jeremy_Moro 2 жыл бұрын
6:02 So that's how grandma made those cool abstract patterns on the carpets. I also realized that you can check if your grandma is good at maths by the patterns of her carpets! That's just amazing! 👍😎
@graxxarecords3456
@graxxarecords3456 Жыл бұрын
Truly a mentor. thanks for the video, superb, watched the whole thing!
@middyjohn
@middyjohn 2 жыл бұрын
I would love to see a continuation of that last test, where a function can detect if any cube (at all) overlaps with one another (by a %) and adds into a counter. Anyway, very interesting to see all the visualizations especially in 3D
@redhen
@redhen 2 жыл бұрын
Prime pipe maze? Prime-steering-informed architecture? Wonderful video. The Sierpinski triangles mind-blowing. Where did they come from?!
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
it is everywhere, I also generated this triangle with the chaos method, with the help of l-systems and now prime numbers
@tagberli
@tagberli 2 жыл бұрын
Found this channel and I want to say that it's amazing, truly fascinating world of visualizing math
@alvarocubi
@alvarocubi 2 жыл бұрын
Great video, the script really showed your passion for this topic
@jerryiuliano871
@jerryiuliano871 Жыл бұрын
The hexagon spiral for primes uses this formula: .75*x^2 + 1.5*x + 23 = mostly prime numbers when x is an even number.
@TimelessTrance1
@TimelessTrance1 Жыл бұрын
It took me a while, but the triangle fractal makes a lot of sense. When you bitwise OR your coordinates you will get repeating sections of odd numbers divided into chunks of powers of 2. What is interesting is that a large number of coordinates are prime numbers.
@jakubkoscioek8637
@jakubkoscioek8637 2 жыл бұрын
That’s something I saved and I will be coming back to. So much hard work and great job done by you! Congratulations. I will be sharing this video to all my friends
@ya2a16
@ya2a16 3 ай бұрын
The primes video is mesmerizing, 0:06 reminds me of my grandma embroidered dress even the same organized colors ,l swear ,it’s embroidery art 😅😂❤
@djohnsto2
@djohnsto2 7 ай бұрын
That's pretty cool! I wonder what it would look like to use randomly selected odd numbers instead of primes - Would you still get the fractal triangles and other patterns?
@4r1777
@4r1777 6 ай бұрын
I'm also really interested in this
@cesarrojas6744
@cesarrojas6744 2 жыл бұрын
It's amazing how well done this video is.
@iGavid_Doggins
@iGavid_Doggins Жыл бұрын
Stunning stuff here... for a beginner programmer and someone who used to hate maths this is just way beyond me.
@Holonet01
@Holonet01 2 жыл бұрын
"Prime Ladder" kinda pops into my head. Or, that scene on the rooftops in Mary Poppins where she forms the smoke into steps and they walk up... but in 3D 😁
@JaskaranSingh-im5hw
@JaskaranSingh-im5hw 2 жыл бұрын
Very interesting take on prime numbers visualizations!
@cooksoni.a
@cooksoni.a 7 ай бұрын
This is amaze, and it is awesome/amazing. It is beautiful and incredible, and it is amazing.
@duoc-moi
@duoc-moi 9 ай бұрын
So beautiful!
@aariskazi9002
@aariskazi9002 Жыл бұрын
Love your work and presentation
@taylor.matson
@taylor.matson 8 ай бұрын
Cool video and nice bg music :)
@thefootles
@thefootles 2 жыл бұрын
This channel is going to get very big!
@MrBrassmonkey12345
@MrBrassmonkey12345 Жыл бұрын
Why is this so insanely good?
@mayankkashyap1877
@mayankkashyap1877 2 жыл бұрын
Awesome video, This video inspired me to make my own engine and code conways game of life algo to visualize the mathematical models. I will try to play around with the rules and lets see what I witness.
@FunWithBits
@FunWithBits 9 ай бұрын
This is really awesome! I have made 2-d prime structures in the past also but never 3d.
@jac556
@jac556 Жыл бұрын
This is amazing. Thank you for sharing!
@ArashRabbani
@ArashRabbani 2 жыл бұрын
Amazing videos indeed. You deserve milloins of subs :)
@mohamedcherifi5376
@mohamedcherifi5376 7 ай бұрын
Thats just amazing 😍😍😍
@antonyshakesby4368
@antonyshakesby4368 2 жыл бұрын
Amazing. Really enjoyed this one!
@jermania7467
@jermania7467 2 жыл бұрын
Awesome skills. First thought that came to mind on your rendition was Labyrinth. It reminded me of the movie the Labyrinth with all the twisting pathways that lead in all directions.
@code-dredd
@code-dredd 2 жыл бұрын
*Some People:* There's no evidence of design in nature. *Prime Numbers:*
@palasaripasar836
@palasaripasar836 Жыл бұрын
You 're expert in python. It's amazing..
@sumongus
@sumongus 2 жыл бұрын
An easier way to tell if a natural number n is prime is to calculate ((n-1)!+1)/n. If the result is an integer, then n is prime (or 1). Otherwise, n is composite.
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
I have tested this and in terms of performance, using Wilson's theorem is a "less" efficient method for checking prime numbers (even if you cache the factorial values)
@killereks
@killereks 2 жыл бұрын
sounds incredibly inefficient for large n values
@simonstrandgaard5503
@simonstrandgaard5503 11 ай бұрын
Regarding the 3d random walk, does it intersect with itself? Beautiful visualizations.
@Matematica_Aplicada
@Matematica_Aplicada 2 жыл бұрын
Amazing video!!!
@mangosorbet8183
@mangosorbet8183 5 ай бұрын
This is very interesting
@yaqult3108
@yaqult3108 2 жыл бұрын
hi !! I love you're videos, I tried running the code but I keep getting the error self.position = glm.vec3(position) AttributeError: module 'glm' has no attribute 'vec3' Do you know how to fix this?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
You may have installed the wrong glm module. Check: pip install PyGLM
@Temu_ko
@Temu_ko Жыл бұрын
there exists chains of consecutive numbers without prime numbers of arbietrary lengh. So the "prime laberynth" can have columns in one direction arbitraery large
@hillaryclinton1314
@hillaryclinton1314 4 ай бұрын
10:47 the mapping can be called the prime elevator
@SCOA57KrutikaAhire-en1ob
@SCOA57KrutikaAhire-en1ob 11 ай бұрын
wooow glad i found my people in this comment section .. not everyone is this excited to watch such stuff
@evanbarnes9984
@evanbarnes9984 2 жыл бұрын
I think you need to call the final render the Number Pipeline! An homage to the early screensaver
@mikefromspace
@mikefromspace Жыл бұрын
A name for your block maze? How 'bout the endless Minecraft dungeon? It would need a world higher than 256 though haha
@kalebpierson1262
@kalebpierson1262 Жыл бұрын
Do the last one again. But instead have it go only right at the number in between twin primes. Then have it alternate from left to right at the number in between twin primes. Look at it then. I did this in on paper and it was pretty cool. Would like to see it in three 3d also at the number in between the twin primes.
@leandrogregorio8801
@leandrogregorio8801 Жыл бұрын
Very interesting
@acle_
@acle_ 2 жыл бұрын
im wondering if the final structure ever self-intersects
@tudastar4646
@tudastar4646 Жыл бұрын
Please more 3D number patterns !
@leewriter4656
@leewriter4656 2 жыл бұрын
I wanna do something like this in Unity 3d. How awesome would it be if the player had a say in how his path is unfolded.
@MarioAbbruscato
@MarioAbbruscato 2 жыл бұрын
infinite amazement
@MrKasenom
@MrKasenom Жыл бұрын
the final prime number structure you made reminds me of random walks
@SimplexonYt
@SimplexonYt Жыл бұрын
ill call the number line a Prime Spagetti
@dimitriosdesmos4699
@dimitriosdesmos4699 2 жыл бұрын
great stuff
@philtoa334
@philtoa334 2 жыл бұрын
Beautiful.
@wagdan79
@wagdan79 Жыл бұрын
The 2d-version works perfectly The 3d-version gives me only a black screen/black window. I think it relates to pygame. I can't find a solution. Do you have a suggestion?
@DerRobert28
@DerRobert28 6 ай бұрын
Challenge: convert these prime number graphics ito a Minecraft map.
@geko2867
@geko2867 Жыл бұрын
You ever see a new visualization following rules with basic maths and wonder if you're looking at the core logic of the universe unfold before you?
@UZPRO11
@UZPRO11 2 жыл бұрын
best of best
@eggs-istangel4232
@eggs-istangel4232 2 жыл бұрын
Why are you checking for prime number from 3 up untill square root of entered number? What's the math behind it?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
If a number n is not a prime, it can be factored into two factors a and b: n = a * b Now a and b can't be both greater than the square root of n, since then the product a * b would be greater than sqrt(n) * sqrt(n) = n. So in any factorization of n, at least one of the factors must be smaller than the square root of n, and if we can't find any factors less than or equal to the square root, n must be a prime.
@zackch2398
@zackch2398 Ай бұрын
When I run the code: line 25, in fillSide self.arr[self.pos[1], self.pos[0]] = [255] * 3 if isPrime(self.num) else [0] * 3 ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: index 1001 is out of bounds for axis 1 with size 1001 Please help me!
@irigima9974
@irigima9974 Жыл бұрын
A serious question: Does anyone know that there is a pattern in factorials of all N ? (N being all numbers inclusive of primes) I have found it. Anyone interested - let me know.
@mayankbhaisora2699
@mayankbhaisora2699 2 жыл бұрын
Man this is so cool
@xjuhox
@xjuhox 2 жыл бұрын
It's the _Prime snake_ 🐍 Btw., could it be possible to change the turn in accordance with the distance difference to the previous and next prime?
@micahcarr2085
@micahcarr2085 2 жыл бұрын
I truly believe that the universe is a holographic reflection of the matrix of mathematics :3 Also maybe 🤔 you could call it a Prime Snake or Snake-map or Snake trailing?
@SkyFly19853
@SkyFly19853 2 жыл бұрын
Truly nice.
@tokajileo5928
@tokajileo5928 Жыл бұрын
I programmed in pascal and c/c++ but this programming language seems way complicated for me.
@kimeg7294
@kimeg7294 2 жыл бұрын
Do you plan to share code .. For educational purposes?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
A link to the source code (for 2d) is available in the video description
@carlfranz6805
@carlfranz6805 2 жыл бұрын
Call your discovery 'Bob'. It's short, a palindrome, and dyslexic friendly. 🤣😎
@anypuppet
@anypuppet Жыл бұрын
Three letters: WOW🎉
@bujitself
@bujitself 2 жыл бұрын
Prime pipes. Cuz that reminds me of a Windows screensaver
@ahole5407
@ahole5407 Жыл бұрын
I will pay money to have you work on a project with me. Been working with primes for years and need a visualization in both 2 and 3D
@PanWojtek
@PanWojtek 2 жыл бұрын
we have great ways to visualize prime numbers, but we still can't derive the formula for n primes
@gokusupersaiyan6
@gokusupersaiyan6 2 жыл бұрын
I saw a small man holding a gun in your wallpaper :D @07:01
@mzakyr342
@mzakyr342 2 жыл бұрын
The end i think its should be prime line or line of the prime
@damianojeda938
@damianojeda938 9 ай бұрын
is 1 not considered prime?
@thecoolcongle5128
@thecoolcongle5128 7 ай бұрын
I think it's useful for one to not be considered prime
@electrictrojan6719
@electrictrojan6719 2 жыл бұрын
What's the music name?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
Traversing - Godmode
@fuzzyelectrons
@fuzzyelectrons Жыл бұрын
Fun video, however, the patterns you see when you apply the xor and or operations has nothing to do with prime numbers. If you change your isPrime function to something completely different that will return true/false in a deterministic way, you will still see interesting patterns. To be sure, I tested this myself and even with a function as simple as isPrime(x) { return ((x % 14) == 0); }, I got complex structures, very similar to what you got using prime numbers.
@landojefferson7215
@landojefferson7215 Жыл бұрын
Great experiments, very interesting and informative. Though, if I could make a suggestion? Just get a mic and record your real voice bro, I can't stand that AI generated robo voice in this. It's not convincing in the slightest, no emotional infliction, dehumanized quantization in the timing. Nobody annunciates words that precise, but I'll admit AI voices are indeed improving.
@Terandium
@Terandium 2 жыл бұрын
Why robot voice :c other than that cool video
@akin.kilic.
@akin.kilic. 2 жыл бұрын
For some reason, this makes me feel insignificant.
@helpeytb
@helpeytb Жыл бұрын
6:41 no we actually do live on a simulation due to me seeing some weird syit happening with balls
@helpeytb
@helpeytb Жыл бұрын
The proof is due to the balls NOT THE SIMULATION
@perpetualrabbit
@perpetualrabbit 8 ай бұрын
name for map of numbers: Prime Chart,
@jackchampagne.r
@jackchampagne.r 2 жыл бұрын
Source code?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
A link to the source code (for 2d) is available in the video description
@jackchampagne.r
@jackchampagne.r 2 жыл бұрын
@@CoderSpaceChannel Thanks! No source for 3d?
@CoderSpaceChannel
@CoderSpaceChannel 2 жыл бұрын
added, link available in description
@NurettinUysal
@NurettinUysal 28 күн бұрын
Polyspace I should say
@shivangyadav5887
@shivangyadav5887 2 жыл бұрын
I am scared
@manuelsuarez7521
@manuelsuarez7521 5 ай бұрын
i love you
@frankconley7630
@frankconley7630 Жыл бұрын
Prime track.
@tamadaanilkumar4738
@tamadaanilkumar4738 2 жыл бұрын
I bet u all took a few screenshots of these patterns
@jankucera8505
@jankucera8505 2 жыл бұрын
make an infinite game based on it
@tamphex
@tamphex 2 жыл бұрын
rEvEnGe 0f Th3 N3RdZ
@SlinkyD
@SlinkyD 2 жыл бұрын
Prime Sierpenski Lattice
@soulblade9142
@soulblade9142 Жыл бұрын
pipes
@dclxviclan
@dclxviclan 2 жыл бұрын
Let's start learn Math 👽
@Slaygee
@Slaygee 2 жыл бұрын
what
@VoidWasHere._.
@VoidWasHere._. 2 жыл бұрын
First
@szebike
@szebike 3 ай бұрын
Urgh AI voices..... I would take any broken english over this mess...
@yurisich
@yurisich Жыл бұрын
You should consider applying these voxel renderings to a cube of rgb color space en.wikipedia.org/wiki/RGB_color_model#Geometric_representation keep up the awesome work
Procedural 3D Engine. Ray Marching OpenGL Tutorial
15:31
Coder Space
Рет қаралды 38 М.
Gaussian Primes Visually
12:29
TheGrayCuber
Рет қаралды 50 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
In 2003 We Discovered a New Way to Generate Primes
22:17
Eric Rowland
Рет қаралды 417 М.
The Most Wanted Prime Number - Numberphile
8:35
Numberphile
Рет қаралды 539 М.
Map of Natural Numbers in 3D
10:19
Coder Space
Рет қаралды 10 М.
The Rhythm of The Primes #some2
10:12
Marc Evanstein / music․py
Рет қаралды 887 М.
The Reciprocals of Primes - Numberphile
15:31
Numberphile
Рет қаралды 1,6 МЛН
Let's code 3D Engine in Python from Scratch
14:55
Coder Space
Рет қаралды 410 М.
How on Earth does ^.?$|^(..+?)\1+$ produce primes?
18:37
Stand-up Maths
Рет қаралды 450 М.
The Pattern to Prime Numbers?
16:27
vcubingx
Рет қаралды 268 М.
The High Schooler Who Solved a Prime Number Theorem
5:15
Quanta Magazine
Рет қаралды 2,2 МЛН
Dijkstra's Hidden Prime Finding Algorithm
15:48
b001
Рет қаралды 169 М.