No video

The Beauty of Prime Numbers

  Рет қаралды 39,927

Coder Space

Coder Space

Күн бұрын

Immerse yourself in the Incredible and Wonderful World of the Beauty of Prime Numbers. This video is an author's exploration of prime numbers using knowledge of the Python language (Pygame, OpenGL)
------------------------------------------------------------------------------
I have no monetization on the channel, but if you wish to support the channel:
BTC:
bc1qpmpk4swlwtj8kvwva5j7zlth6c33vzp8epx8w9
Any crypto on ETH or BNB:
0x855a59b4c926b96206e492774cd93d81287490ef
Any crypto on TON:
UQCnBXmaYswK9chnjw_KDPbf9uYGd6ZChexNc_iyLKllVKxd
Email me ( coderstandalone@gmail.com ) that you supported the channel and I will thank you in the next video!
------------------------------------------------------------------------------
Source Code (2d visualizations):
drive.google.c...
Source Code (3d visualizations):
drive.google.c...
Video inspired by this article:
www.cantorspar...
#coderspace #primes #primenumbers

Пікірлер: 115
@DrGold-ks1mp
@DrGold-ks1mp Жыл бұрын
I can't believe I only just found this channel, it's literally perfectly aligned with my interests. Great video!
@jeffcummings3842
@jeffcummings3842 Жыл бұрын
ditto! Thanks for sharing.
@tyjacobs6822
@tyjacobs6822 4 ай бұрын
0:40
@zack3g
@zack3g Жыл бұрын
The ending looks like the pipe screen savers of the 90s.
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
at first i thought the same 😅
@zack3g
@zack3g Жыл бұрын
@@CoderSpaceChannel There's something really familiar about the movement. Maybe they used primes to drive those pipes.
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
I think it's more based on randomness, with a check for a free direction of movement
@tyjacobs6822
@tyjacobs6822 4 ай бұрын
1:30
@tyjacobs6822
@tyjacobs6822 4 ай бұрын
1:30
@Jeremy_Moro
@Jeremy_Moro Жыл бұрын
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! 👍😎
@SeanStClair-cr9jl
@SeanStClair-cr9jl Жыл бұрын
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!
@fredg8328
@fredg8328 3 ай бұрын
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.
@redhen
@redhen Жыл бұрын
Prime pipe maze? Prime-steering-informed architecture? Wonderful video. The Sierpinski triangles mind-blowing. Where did they come from?!
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
it is everywhere, I also generated this triangle with the chaos method, with the help of l-systems and now prime numbers
@middyjohn
@middyjohn Жыл бұрын
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
@Chickenwing38nigeria
@Chickenwing38nigeria Жыл бұрын
I'm currently binge watching all of your videos, love it!!
@jerryiuliano871
@jerryiuliano871 11 ай бұрын
The hexagon spiral for primes uses this formula: .75*x^2 + 1.5*x + 23 = mostly prime numbers when x is an even number.
@graxxarecords3456
@graxxarecords3456 Жыл бұрын
Truly a mentor. thanks for the video, superb, watched the whole thing!
@tagberli
@tagberli Жыл бұрын
Found this channel and I want to say that it's amazing, truly fascinating world of visualizing math
@alvarocubi
@alvarocubi Жыл бұрын
Great video, the script really showed your passion for this topic
@experimenteeer
@experimenteeer 10 ай бұрын
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.
@cooksoni.a
@cooksoni.a Ай бұрын
This is amaze, and it is awesome/amazing. It is beautiful and incredible, and it is amazing.
@FunWithBits
@FunWithBits 4 ай бұрын
This is really awesome! I have made 2-d prime structures in the past also but never 3d.
@JaskaranSingh-im5hw
@JaskaranSingh-im5hw Жыл бұрын
Very interesting take on prime numbers visualizations!
@cesarrojas6744
@cesarrojas6744 Жыл бұрын
It's amazing how well done this video is.
@djohnsto2
@djohnsto2 2 ай бұрын
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 20 күн бұрын
I'm also really interested in this
@DaRza17
@DaRza17 11 ай бұрын
Stunning stuff here... for a beginner programmer and someone who used to hate maths this is just way beyond me.
@Holonet01
@Holonet01 Жыл бұрын
"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 😁
@SCOA57KrutikaAhire-en1ob
@SCOA57KrutikaAhire-en1ob 5 ай бұрын
wooow glad i found my people in this comment section .. not everyone is this excited to watch such stuff
@jakubkoscioek8637
@jakubkoscioek8637 Жыл бұрын
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
@taylor.matson
@taylor.matson 3 ай бұрын
Cool video and nice bg music :)
@mayankkashyap1877
@mayankkashyap1877 Жыл бұрын
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.
@thefootles
@thefootles Жыл бұрын
This channel is going to get very big!
@duoc-moi
@duoc-moi 3 ай бұрын
So beautiful!
@mohamedcherifi5376
@mohamedcherifi5376 2 ай бұрын
Thats just amazing 😍😍😍
@jermania7467
@jermania7467 Жыл бұрын
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.
@aariskazi9002
@aariskazi9002 Жыл бұрын
Love your work and presentation
@mangosorbet8183
@mangosorbet8183 4 күн бұрын
This is very interesting
@code-dredd
@code-dredd Жыл бұрын
*Some People:* There's no evidence of design in nature. *Prime Numbers:*
@DerRobert28
@DerRobert28 22 күн бұрын
Challenge: convert these prime number graphics ito a Minecraft map.
@MrBrassmonkey12345
@MrBrassmonkey12345 10 ай бұрын
Why is this so insanely good?
@ArashRabbani
@ArashRabbani Жыл бұрын
Amazing videos indeed. You deserve milloins of subs :)
@antonyshakesby4368
@antonyshakesby4368 Жыл бұрын
Amazing. Really enjoyed this one!
@mikefromspace
@mikefromspace 8 ай бұрын
A name for your block maze? How 'bout the endless Minecraft dungeon? It would need a world higher than 256 though haha
@MarioAbbruscato
@MarioAbbruscato Жыл бұрын
infinite amazement
@jac556
@jac556 Жыл бұрын
This is amazing. Thank you for sharing!
@UZPRO11
@UZPRO11 Жыл бұрын
best of best
@palasaripasar836
@palasaripasar836 Жыл бұрын
You 're expert in python. It's amazing..
@leandrogregorio8801
@leandrogregorio8801 Жыл бұрын
Very interesting
@simonstrandgaard5503
@simonstrandgaard5503 6 ай бұрын
Regarding the 3d random walk, does it intersect with itself? Beautiful visualizations.
@sumongus
@sumongus Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
sounds incredibly inefficient for large n values
@kalebpierson1262
@kalebpierson1262 8 ай бұрын
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.
@Matematica_Aplicada
@Matematica_Aplicada Жыл бұрын
Amazing video!!!
@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
@yaqult3108
@yaqult3108 Жыл бұрын
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 Жыл бұрын
You may have installed the wrong glm module. Check: pip install PyGLM
@leewriter4656
@leewriter4656 Жыл бұрын
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.
@evanbarnes9984
@evanbarnes9984 Жыл бұрын
I think you need to call the final render the Number Pipeline! An homage to the early screensaver
@philtoa334
@philtoa334 Жыл бұрын
Beautiful.
@SimplexonYt
@SimplexonYt 11 ай бұрын
ill call the number line a Prime Spagetti
@MrKasenom
@MrKasenom Жыл бұрын
the final prime number structure you made reminds me of random walks
@xjuhox
@xjuhox Жыл бұрын
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?
@anypuppet
@anypuppet Жыл бұрын
Three letters: WOW🎉
@bujitself
@bujitself Жыл бұрын
Prime pipes. Cuz that reminds me of a Windows screensaver
@akin.kilic.
@akin.kilic. Жыл бұрын
For some reason, this makes me feel insignificant.
@SkyFly19853
@SkyFly19853 Жыл бұрын
Truly nice.
@acle_
@acle_ Жыл бұрын
im wondering if the final structure ever self-intersects
@mayankbhaisora2699
@mayankbhaisora2699 Жыл бұрын
Man this is so cool
@wagdan79
@wagdan79 7 ай бұрын
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?
@tudastar4646
@tudastar4646 11 ай бұрын
Please more 3D number patterns !
@dimitriosdesmos4699
@dimitriosdesmos4699 Жыл бұрын
great stuff
@ahole5407
@ahole5407 8 ай бұрын
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
@kimeg7294
@kimeg7294 Жыл бұрын
Do you plan to share code .. For educational purposes?
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
A link to the source code (for 2d) is available in the video description
@gokusupersaiyan6
@gokusupersaiyan6 Жыл бұрын
I saw a small man holding a gun in your wallpaper :D @07:01
@irigima9974
@irigima9974 7 ай бұрын
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.
@eggs-istangel4232
@eggs-istangel4232 Жыл бұрын
Why are you checking for prime number from 3 up untill square root of entered number? What's the math behind it?
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
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.
@micahcarr2085
@micahcarr2085 Жыл бұрын
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?
@tokajileo5928
@tokajileo5928 7 ай бұрын
I programmed in pascal and c/c++ but this programming language seems way complicated for me.
@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.
@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?
@shivangyadav5887
@shivangyadav5887 Жыл бұрын
I am scared
@nguyenthai3140
@nguyenthai3140 4 ай бұрын
????
@carlfranz6805
@carlfranz6805 Жыл бұрын
Call your discovery 'Bob'. It's short, a palindrome, and dyslexic friendly. 🤣😎
@frankconley7630
@frankconley7630 Жыл бұрын
Prime track.
@perpetualrabbit
@perpetualrabbit 2 ай бұрын
name for map of numbers: Prime Chart,
@PanWojtek
@PanWojtek Жыл бұрын
we have great ways to visualize prime numbers, but we still can't derive the formula for n primes
@Terandium
@Terandium Жыл бұрын
Why robot voice :c other than that cool video
@tamphex
@tamphex Жыл бұрын
rEvEnGe 0f Th3 N3RdZ
@mzakyr342
@mzakyr342 Жыл бұрын
The end i think its should be prime line or line of the prime
@damianojeda938
@damianojeda938 4 ай бұрын
is 1 not considered prime?
@thecoolcongle5128
@thecoolcongle5128 Ай бұрын
I think it's useful for one to not be considered prime
@fuzzyelectrons
@fuzzyelectrons 9 ай бұрын
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.
@helpeytb
@helpeytb 8 ай бұрын
6:41 no we actually do live on a simulation due to me seeing some weird syit happening with balls
@helpeytb
@helpeytb 8 ай бұрын
The proof is due to the balls NOT THE SIMULATION
@electrictrojan6719
@electrictrojan6719 Жыл бұрын
What's the music name?
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
Traversing - Godmode
@tamadaanilkumar4738
@tamadaanilkumar4738 Жыл бұрын
I bet u all took a few screenshots of these patterns
@soulblade9142
@soulblade9142 Жыл бұрын
pipes
@SlinkyD
@SlinkyD Жыл бұрын
Prime Sierpenski Lattice
@jankucera8505
@jankucera8505 Жыл бұрын
make an infinite game based on it
@jackchampagne.r
@jackchampagne.r Жыл бұрын
Source code?
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
A link to the source code (for 2d) is available in the video description
@jackchampagne.r
@jackchampagne.r Жыл бұрын
@@CoderSpaceChannel Thanks! No source for 3d?
@CoderSpaceChannel
@CoderSpaceChannel Жыл бұрын
added, link available in description
@VoidWasHere._.
@VoidWasHere._. Жыл бұрын
First
@dclxviclan
@dclxviclan Жыл бұрын
Let's start learn Math 👽
@Slaygee
@Slaygee Жыл бұрын
what
@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
Рет қаралды 35 М.
Exploring the Menger Sponge Fractal
9:34
Coder Space
Рет қаралды 10 М.
Magic? 😨
00:14
Andrey Grechka
Рет қаралды 20 МЛН
艾莎撒娇得到王子的原谅#艾莎
00:24
在逃的公主
Рет қаралды 54 МЛН
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3,1 МЛН
In 2003 We Discovered a New Way to Generate Primes
22:17
Eric Rowland
Рет қаралды 398 М.
The Rhythm of The Primes #some2
10:12
Marc Evanstein / music․py
Рет қаралды 876 М.
Quest To Find The Largest Number
11:43
CodeParade
Рет қаралды 385 М.
I Made the WEIRDEST ASCII Renderer...ever.
8:02
Yusef28
Рет қаралды 5 М.
The Reciprocals of Primes - Numberphile
15:31
Numberphile
Рет қаралды 1,6 МЛН
Map of Natural Numbers in 3D
10:19
Coder Space
Рет қаралды 9 М.
Paterson Primes (with 3Blue1Brown) - Numberphile
10:35
Numberphile
Рет қаралды 264 М.
How prime numbers protect your privacy #SoME2
13:25
NamePointer
Рет қаралды 10 М.
Running "Hello World!" in 10 FORBIDDEN Programming Languages
18:07