The Beauty of Prime Numbers

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 118

  • @DrGold-ks1mp
    @DrGold-ks1mp 2 ปีที่แล้ว +70

    I can't believe I only just found this channel, it's literally perfectly aligned with my interests. Great video!

  • @zack3g
    @zack3g 2 ปีที่แล้ว +74

    The ending looks like the pipe screen savers of the 90s.

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +13

      at first i thought the same 😅

    • @zack3g
      @zack3g 2 ปีที่แล้ว +7

      @@CoderSpaceChannel There's something really familiar about the movement. Maybe they used primes to drive those pipes.

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +10

      I think it's more based on randomness, with a check for a free direction of movement

    • @tyjacobs6822
      @tyjacobs6822 9 หลายเดือนก่อน +1

      1:30

    • @tyjacobs6822
      @tyjacobs6822 9 หลายเดือนก่อน

      1:30

  • @fredg8328
    @fredg8328 8 หลายเดือนก่อน +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.

  • @Jeremy_Moro
    @Jeremy_Moro 2 ปีที่แล้ว +12

    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! 👍😎

  • @Chickenwing38nigeria
    @Chickenwing38nigeria 2 ปีที่แล้ว +4

    I'm currently binge watching all of your videos, love it!!

  • @SeanStClair-cr9jl
    @SeanStClair-cr9jl 2 ปีที่แล้ว +20

    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!

  • @middyjohn
    @middyjohn 2 ปีที่แล้ว +8

    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

  • @jerryiuliano871
    @jerryiuliano871 ปีที่แล้ว +2

    The hexagon spiral for primes uses this formula:
    .75*x^2 + 1.5*x + 23 = mostly prime numbers when x is an even number.

  • @redhen
    @redhen 2 ปีที่แล้ว +13

    Prime pipe maze?
    Prime-steering-informed architecture?
    Wonderful video. The Sierpinski triangles mind-blowing. Where did they come from?!

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +9

      it is everywhere, I also generated this triangle with the chaos method, with the help of l-systems and now prime numbers

  • @graxxarecords3456
    @graxxarecords3456 ปีที่แล้ว +2

    Truly a mentor.
    thanks for the video, superb, watched the whole thing!

  • @TimelessTrance1
    @TimelessTrance1 ปีที่แล้ว +2

    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.

  • @tagberli
    @tagberli 2 ปีที่แล้ว +3

    Found this channel and I want to say that it's amazing, truly fascinating world of visualizing math

  • @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 😅😂❤

  • @jakubkoscioek8637
    @jakubkoscioek8637 2 ปีที่แล้ว +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

  • @alvarocubi
    @alvarocubi 2 ปีที่แล้ว +2

    Great video, the script really showed your passion for this topic

  • @Holonet01
    @Holonet01 2 ปีที่แล้ว +1

    "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 😁

  • @iGavid_Doggins
    @iGavid_Doggins ปีที่แล้ว

    Stunning stuff here...
    for a beginner programmer and someone who used to hate maths this is just way beyond me.

  • @djohnsto2
    @djohnsto2 7 หลายเดือนก่อน +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 5 หลายเดือนก่อน

      I'm also really interested in this

  • @JaskaranSingh-im5hw
    @JaskaranSingh-im5hw 2 ปีที่แล้ว +2

    Very interesting take on prime numbers visualizations!

  • @mayankkashyap1877
    @mayankkashyap1877 2 ปีที่แล้ว +1

    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.

  • @duoc-moi
    @duoc-moi 9 หลายเดือนก่อน

    So beautiful!

  • @cesarrojas6744
    @cesarrojas6744 2 ปีที่แล้ว +1

    It's amazing how well done this video is.

  • @thefootles
    @thefootles 2 ปีที่แล้ว +1

    This channel is going to get very big!

  • @cooksoni.a
    @cooksoni.a 7 หลายเดือนก่อน

    This is amaze, and it is awesome/amazing. It is beautiful and incredible, and it is amazing.

  • @ArashRabbani
    @ArashRabbani 2 ปีที่แล้ว +1

    Amazing videos indeed. You deserve milloins of subs :)

  • @FunWithBits
    @FunWithBits 9 หลายเดือนก่อน

    This is really awesome! I have made 2-d prime structures in the past also but never 3d.

  • @taylor.matson
    @taylor.matson 8 หลายเดือนก่อน

    Cool video and nice bg music :)

  • @aariskazi9002
    @aariskazi9002 ปีที่แล้ว +1

    Love your work and presentation

  • @code-dredd
    @code-dredd 2 ปีที่แล้ว +3

    *Some People:* There's no evidence of design in nature.
    *Prime Numbers:*

  • @mohamedcherifi5376
    @mohamedcherifi5376 7 หลายเดือนก่อน

    Thats just amazing 😍😍😍

  • @simonstrandgaard5503
    @simonstrandgaard5503 11 หลายเดือนก่อน

    Regarding the 3d random walk, does it intersect with itself?
    Beautiful visualizations.

  • @MrBrassmonkey12345
    @MrBrassmonkey12345 ปีที่แล้ว

    Why is this so insanely good?

  • @jac556
    @jac556 ปีที่แล้ว

    This is amazing. Thank you for sharing!

  • @jermania7467
    @jermania7467 2 ปีที่แล้ว +1

    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.

  • @yaqult3108
    @yaqult3108 2 ปีที่แล้ว +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 ปีที่แล้ว +2

      You may have installed the wrong glm module. Check:
      pip install PyGLM

  • @antonyshakesby4368
    @antonyshakesby4368 2 ปีที่แล้ว +1

    Amazing. Really enjoyed this one!

  • @sumongus
    @sumongus 2 ปีที่แล้ว +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 ปีที่แล้ว +1

      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 ปีที่แล้ว +3

      sounds incredibly inefficient for large n values

  • @Temu_ko
    @Temu_ko ปีที่แล้ว +1

    there exists chains of consecutive numbers without prime numbers of arbietrary lengh. So the "prime laberynth" can have columns in one direction arbitraery large

  • @evanbarnes9984
    @evanbarnes9984 2 ปีที่แล้ว

    I think you need to call the final render the Number Pipeline! An homage to the early screensaver

  • @palasaripasar836
    @palasaripasar836 ปีที่แล้ว

    You 're expert in python. It's amazing..

  • @SCOA57KrutikaAhire-en1ob
    @SCOA57KrutikaAhire-en1ob 10 หลายเดือนก่อน

    wooow glad i found my people in this comment section .. not everyone is this excited to watch such stuff

  • @Matematica_Aplicada
    @Matematica_Aplicada 2 ปีที่แล้ว +1

    Amazing video!!!

  • @mikefromspace
    @mikefromspace ปีที่แล้ว +1

    A name for your block maze? How 'bout the endless Minecraft dungeon? It would need a world higher than 256 though haha

  • @MrKasenom
    @MrKasenom ปีที่แล้ว

    the final prime number structure you made reminds me of random walks

  • @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.

  • @hillaryclinton1314
    @hillaryclinton1314 4 หลายเดือนก่อน

    10:47 the mapping can be called the prime elevator

  • @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?

  • @SimplexonYt
    @SimplexonYt ปีที่แล้ว +1

    ill call the number line a Prime Spagetti

  • @leewriter4656
    @leewriter4656 2 ปีที่แล้ว +1

    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.

  • @acle_
    @acle_ 2 ปีที่แล้ว +1

    im wondering if the final structure ever self-intersects

  • @mangosorbet8183
    @mangosorbet8183 5 หลายเดือนก่อน

    This is very interesting

  • @xjuhox
    @xjuhox 2 ปีที่แล้ว +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?

  • @MarioAbbruscato
    @MarioAbbruscato 2 ปีที่แล้ว +1

    infinite amazement

  • @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 ปีที่แล้ว +4

      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.

  • @carlfranz6805
    @carlfranz6805 2 ปีที่แล้ว +1

    Call your discovery 'Bob'. It's short, a palindrome, and dyslexic friendly. 🤣😎

  • @DerRobert28
    @DerRobert28 6 หลายเดือนก่อน +1

    Challenge: convert these prime number graphics ito a Minecraft map.

  • @kimeg7294
    @kimeg7294 2 ปีที่แล้ว +1

    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

  • @tudastar4646
    @tudastar4646 ปีที่แล้ว

    Please more 3D number patterns !

  • @philtoa334
    @philtoa334 2 ปีที่แล้ว

    Beautiful.

  • @mayankbhaisora2699
    @mayankbhaisora2699 2 ปีที่แล้ว

    Man this is so cool

  • @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!

  • @leandrogregorio8801
    @leandrogregorio8801 ปีที่แล้ว

    Very interesting

  • @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?

  • @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?

  • @dimitriosdesmos4699
    @dimitriosdesmos4699 2 ปีที่แล้ว

    great stuff

  • @UZPRO11
    @UZPRO11 2 ปีที่แล้ว +1

    best of best

  • @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.

  • @tokajileo5928
    @tokajileo5928 ปีที่แล้ว

    I programmed in pascal and c/c++ but this programming language seems way complicated for me.

  • @SkyFly19853
    @SkyFly19853 2 ปีที่แล้ว

    Truly nice.

  • @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

  • @bujitself
    @bujitself 2 ปีที่แล้ว

    Prime pipes. Cuz that reminds me of a Windows screensaver

  • @anypuppet
    @anypuppet ปีที่แล้ว

    Three letters: WOW🎉

  • @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

  • @landojefferson7215
    @landojefferson7215 ปีที่แล้ว +1

    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.

  • @electrictrojan6719
    @electrictrojan6719 2 ปีที่แล้ว

    What's the music name?

  • @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

  • @fuzzyelectrons
    @fuzzyelectrons ปีที่แล้ว +1

    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.

  • @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

  • @akin.kilic.
    @akin.kilic. 2 ปีที่แล้ว +3

    For some reason, this makes me feel insignificant.

  • @perpetualrabbit
    @perpetualrabbit 8 หลายเดือนก่อน

    name for map of numbers: Prime Chart,

  • @Terandium
    @Terandium 2 ปีที่แล้ว

    Why robot voice :c other than that cool video

  • @manuelsuarez7521
    @manuelsuarez7521 5 หลายเดือนก่อน

    i love you

  • @tamadaanilkumar4738
    @tamadaanilkumar4738 2 ปีที่แล้ว

    I bet u all took a few screenshots of these patterns

  • @tamphex
    @tamphex 2 ปีที่แล้ว

    rEvEnGe 0f Th3 N3RdZ

  • @NurettinUysal
    @NurettinUysal 26 วันที่ผ่านมา

    Polyspace I should say

  • @shivangyadav5887
    @shivangyadav5887 2 ปีที่แล้ว +2

    I am scared

  • @SlinkyD
    @SlinkyD 2 ปีที่แล้ว

    Prime Sierpenski Lattice

  • @jankucera8505
    @jankucera8505 2 ปีที่แล้ว

    make an infinite game based on it

  • @frankconley7630
    @frankconley7630 ปีที่แล้ว

    Prime track.

  • @dclxviclan
    @dclxviclan 2 ปีที่แล้ว

    Let's start learn Math 👽

  • @soulblade9142
    @soulblade9142 ปีที่แล้ว

    pipes

  • @VoidWasHere._.
    @VoidWasHere._. 2 ปีที่แล้ว +1

    First

  • @Slaygee
    @Slaygee 2 ปีที่แล้ว

    what

  • @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