Tinkering With Spirographs in C++

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 มิ.ย. 2024
  • In this video I use the fantastic pgetinker.com to build a simple interactive model of a favourite childhood toy - the spirograph.
    Play with it here: pgetinker.com/s/OWNuhyU8IgX
    Patreon: / javidx9
    TH-cam: / javidx9
    / javidx9extra
    Discord: / discord
    Twitter: / javidx9
    Twitch: / javidx9
    GitHub: www.github.com/onelonecoder
    Homepage: www.onelonecoder.com
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @javidx9
    @javidx9  6 วันที่ผ่านมา +31

    Massive thanks to Moros1138 and his fantastic PGEtinker project. It's been a passion project of his for a while and its just brilliant - please give it a go at pgetinker.com, or indeed, play with the video code right now: pgetinker.com/s/OWNuhyU8IgX

    • @moros1138
      @moros1138 5 วันที่ผ่านมา +13

      Excellent video. Thank you so much! PGEtinker has been a passion project of mine and seeing it actually being used has been an emotional experience. So exciting!

    • @sakikogookheng
      @sakikogookheng 5 วันที่ผ่านมา +2

      @@moros1138 I hope you feel a great sense of pride! You've really create something quite special 🙂

    • @moros1138
      @moros1138 5 วันที่ผ่านมา +2

      @@sakikogookheng Thank you very much!

    • @LithiumDeuteride-6
      @LithiumDeuteride-6 4 วันที่ผ่านมา

      I solved this problem many years ago (~2000), wrote a spirograph in BASIC for the UKNTS(УКНЦ), but there was no access to a computer, the program was written on paper. In 2004, I got a 486DX2-66, and I was finally able to run this program on QBASIC, and then rewrote it in Turbopascal. And then, already in our time, I rewrote it in UASM and OpenGL. In general, the task is not too difficult to learn.

    • @JazzyJesterTechPing
      @JazzyJesterTechPing 4 วันที่ผ่านมา +1

      Amazing, just played with it !

  • @ForbinKid
    @ForbinKid วันที่ผ่านมา +2

    Pen being outside the wheel breaks physics, no man has seen (but this one has). I did this simulation very slowly back in 1971, but only had a flat bed plotter and Dec PDP10 basic to play with, so it was quite slow. I did do a few colours. I just through out the old faded 2 or 3 foot plots I had tucked away a couple months ago.

  • @HYRULE10
    @HYRULE10 5 วันที่ผ่านมา +18

    The math around the spirographs I could see being useful for making little special effects or other sorts of fun mezmerizing things in a game. For example, in those vampire-survivor type games where you have lots of little weapons spiraling about hitting things automatically, defining their path in this way would be quite fun to watch.

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +6

      Hopefully it inspires someone with more application creativity than me lol 😂

  • @jeffreyphipps1507
    @jeffreyphipps1507 วันที่ผ่านมา

    My Spirograph from the early 70s had a piece of cardboard and little push pins to hold the paper/outer gears (mine has two - yes, I still have it) and about ten smaller inner gears. I also have a Spirotot which was small and was a frame with self piercing paper holders and the frame contained the main/outer wheel and instead of gears used inner wheels (yes, still have it too). I also have my Mechanograph which allowed a user to pin paper and inner wheels and shapes to cardboard and use the wheels and shapes to draw around the inner shapes. There was one shape that was a human shape.

  • @quicktastic
    @quicktastic 5 วันที่ผ่านมา +4

    I wear a Casio F-91W. I love how simple they are. I am also impressed at how accurate it is. It stays within a couple of seconds from my computer clock for months. It is far more accurate than any other electronic clock I have (that isn't synced to a time source of course).

  • @brawldude2656
    @brawldude2656 5 วันที่ผ่านมา +1

    I check your videos time to time and find inspiration. Your projects are always so interesting olc!

  • @greketrotny
    @greketrotny 5 วันที่ผ่านมา +1

    Amazing video! I also find spirographs quite mesmerizing. In this scenario, where we have two circles, and one rolls around the other without slipping, the `ratio` calculation has to be corrected by subtracting 1.0f from it.

  • @gedaliakoehler6992
    @gedaliakoehler6992 5 วันที่ผ่านมา +7

    End result was very pretty. Nice video. I do question why vacations weren’t as fun at night though 😂

    • @csgowoes6319
      @csgowoes6319 4 วันที่ผ่านมา

      Although I am sure there was a bit of comic effect going on there, I can say from experience that going on holiday with young kids, if you are fairly sensible parents, means you can forget about going out in the evening or anything like that, your kid/s is/are hopefully in bed by 8 or 9 at the latest but then you have all evening to kill, and then at least one of you is too knackered for Rummy or Old Maid and so programming Spirograph in C++ it is.

  • @unknown_error101
    @unknown_error101 5 วันที่ผ่านมา +2

    That would honestly make a killer screen saver.

  • @natsuhiboshi7161
    @natsuhiboshi7161 5 วันที่ผ่านมา +1

    Awesome video, a beautifully broken down solution!
    Thanks for sharing this with us!

  • @jumbledfox2098
    @jumbledfox2098 5 วันที่ผ่านมา +6

    love your videos, keep it up!! hope you had a lovely holiday

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +5

      Thanks, I did!

  • @MrKaftpaket
    @MrKaftpaket 3 วันที่ผ่านมา

    The video was amazing! And I love your shirt :)

  • @RealCaptainAwesome
    @RealCaptainAwesome 5 วันที่ผ่านมา +2

    Now I want to make a spirograph

  • @BrekMartin
    @BrekMartin 3 ชั่วโมงที่ผ่านมา

    That’s fine. I can’t help but think your entire time on TH-cam was a lead up to this. It’s a shame it’s out of reach for the Lynx, and I’ll have to revisit on the next platform!😅

  • @daveking-sandbox9263
    @daveking-sandbox9263 5 วันที่ผ่านมา +5

    If you could decrease the size of the inner circle on every iteration, I could imagine you could draw spirals.

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +2

      Great idea! Go and edit the tinker and see what happens!

  • @KDM16AAB
    @KDM16AAB 5 วันที่ผ่านมา +2

    Just at the end with the last circle and the colour changing, I was reminded of the Captain Blood "Hyperspace, activated".

    • @juanmacias5922
      @juanmacias5922 5 วันที่ผ่านมา

      I had to look up the reference, but see what you mean!

  • @minirop
    @minirop 5 วันที่ผ่านมา +3

    I was indeed annoyed by you stoping the rainbow too soon.

  • @KerboOnYT
    @KerboOnYT 4 วันที่ผ่านมา

    Neat! I remember being fascinated with spirographs as a kid

  • @michaeloneill3786
    @michaeloneill3786 5 วันที่ผ่านมา

    Nice video! This reminds me of the flight patterns used by enemies in Galaga

  • @landsgevaer
    @landsgevaer 5 วันที่ผ่านมา +9

    Nice graph, but the pen motion looks off and the code is indeed slightly mistaken. Around 15:00 the curve briefly shows retrograde motion when the pen is close to the ring gear when it obviously shouldn't. The error is in the ratio. The circumferences ratio is used, but that is not the ratio of angular velocities. That should equal
    ratio = Rfixed / Rmoving - 1
    because the moving wheel is also making one full rotation inside the fixed wheel.
    This is easy to see when for instance Rfixed = ½Rmoving, then the inner wheel makes one anticlockwise rotation, not two, when it circles around once clockwise. Or, when Rmoving = Rfixed, then the moving wheel should not rotate at all, i.e. ratio=0.
    I invite you to try it.
    Otherwise pretty nevertheless!

    • @emilsteen9182
      @emilsteen9182 5 วันที่ผ่านมา

      Remined me of this: th-cam.com/video/FUHkTs-Ipfg/w-d-xo.htmlsi=fFqMN_EhEjyD5nNo

  • @juanmacias5922
    @juanmacias5922 5 วันที่ผ่านมา

    Such a fun project, I'll have to implement a Spirograph builder in a future project myself. :)

  • @tomkirbygreen
    @tomkirbygreen 5 วันที่ผ่านมา +2

    The worlds smallest house appears to be a 1 x 2 Lego brick :-)

  • @JADE-iteGames
    @JADE-iteGames 5 วันที่ผ่านมา +1

    That is awesome!

  • @VincentGuillotine
    @VincentGuillotine 5 วันที่ผ่านมา +4

    I see we both wear the most common wristwatch known to man

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +3

      Reliable, affordable, fashionable. Best watch ever

    • @sakikogookheng
      @sakikogookheng 5 วันที่ผ่านมา

      @@javidx9 It also has a rich history behind it too. Not bad for £10 on Amazon! (when it's on sale)

  • @tmbarral664
    @tmbarral664 5 วันที่ผ่านมา

    I smiled when I’ve heard Conwy and not Conway.
    Nice job, sir ;)

  • @jeffreyphipps1507
    @jeffreyphipps1507 วันที่ผ่านมา

    Very Nice!

  • @ncot_tech
    @ncot_tech 5 วันที่ผ่านมา +3

    Good taste in dodgy shirts 👌

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +2

      It's a cracker this one!

  • @gower1973
    @gower1973 5 วันที่ผ่านมา

    Omg cant believe you went to Conwy on holiday, I live just down the road, what a small world, were you there for the pirate weekend?

    • @javidx9
      @javidx9  5 วันที่ผ่านมา

      Heh, actually I was staying in Llandudno (of course lol) as I do frequently, primary objectives were to run around the Orme, and family holiday.

  • @brockormond4131
    @brockormond4131 5 วันที่ผ่านมา

    Looks great, you should checkout a 'Complex Fourier series'. It provides the math to extend your Spirographs to include more circles, radius, and the spin (delta time) of individual circles. With that techinque you can actually draw pictures in an interesting way.

  • @Czeckie
    @Czeckie 5 วันที่ผ่านมา

    good job moros!

  • @__hannibaalbarca__
    @__hannibaalbarca__ 5 วันที่ผ่านมา

    Hi, I did that long time ago, back to 1994, in GWBasic with mechanic branch Cinematic with vectors and torsors(not tensors), very beautiful.

  • @manuelsuarez7521
    @manuelsuarez7521 5 วันที่ผ่านมา +3

    cool video!

    • @javidx9
      @javidx9  5 วันที่ผ่านมา

      Cheers Manuel!

  • @ivan_prime
    @ivan_prime 5 วันที่ผ่านมา

    Neat! 😎

  • @christianlett
    @christianlett 5 วันที่ผ่านมา

    Nice shirt. I have the same one!

  • @bs-medbonumboguslaw
    @bs-medbonumboguslaw วันที่ผ่านมา

    Great job, Moros. Respect. Take care.

  • @axelBr1
    @axelBr1 5 วันที่ผ่านมา +1

    Is that a metal box it comes in?!

    • @javidx9
      @javidx9  5 วันที่ผ่านมา

      Yes!

  • @RandomGeometryDashStuff
    @RandomGeometryDashStuff 3 วันที่ผ่านมา

    10:40 looks like 3d donut

  • @motasam8122
    @motasam8122 5 วันที่ผ่านมา +1

    you welcome back

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +1

      Thanks Motasam :D

  • @debsarkar4893
    @debsarkar4893 5 วันที่ผ่านมา

    Bro can you or someone else around here please give the link the c++ networking series part 5 I really like that one and your other videos as well in part 4 you said that there will be a part 5 but I can't find it in which u will show shooting players, I know it 3 yrs since now but plz

  • @andrewdunbar828
    @andrewdunbar828 4 วันที่ผ่านมา

    mouses and sheeps have different radiuses

  • @ZomB1986
    @ZomB1986 4 วันที่ผ่านมา

    13:45 Your moving gear is 'rotating' too fast because you didn't account for the sidereal effect. If the moving gear is exactly half the fixed gear, it rotates once per revolution (a pen at the edge traces a straight line). If it's 1/3rd, it rotates twice per revolution, etc.

  • @motbus3
    @motbus3 3 วันที่ผ่านมา

    Hey Mr. Try one of those riscv notebooks. They cost like 300 pounds

  • @Alemorf
    @Alemorf 3 วันที่ผ่านมา +1

    Hi. I was told that we released a video about the Spirograph at the same time. :) I just modified the Spirograph. I did multiple nesting. sin(x) + d * sin(k * x) + d * d * sin(k * k * x)... It s amazing!
    Java script programm:
    th-cam.com/video/JcvrrYigqa0/w-d-xo.htmlfeature=shared&t=599

    • @tootalldan5702
      @tootalldan5702 3 ชั่วโมงที่ผ่านมา

      Nice, I watched the video and link to your Github ... HtmlVisualDemo.

  • @sakikogookheng
    @sakikogookheng 5 วันที่ผ่านมา

    Please make a second channel that's just you running this program to create pretty spirographs

  • @obinator9065
    @obinator9065 5 วันที่ผ่านมา +2

    how ya doin

    • @javidx9
      @javidx9  5 วันที่ผ่านมา +1

      Not bad thanks Obin!

  • @amirgardia4330
    @amirgardia4330 5 วันที่ผ่านมา

    Hlw sir....Can u make a window in console without gui which will respond to user on input(I want to learn how framework make a window from scratch)....please........

  • @purelove9133
    @purelove9133 5 วันที่ผ่านมา +1

    Grow your beard please

  • @SassyToll
    @SassyToll 5 วันที่ผ่านมา +2

    That was a brilliant just brilliant way to show the power of PGETinker, thanks @Javidx9 . Johnnyg63

  • @idiedlastmonth
    @idiedlastmonth 5 วันที่ผ่านมา

    Very useful! Appreciate it!