javidx9
javidx9
  • 162
  • 20 648 815
Tinkering With Spirographs in C++
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: www.patreon.com/javidx9
CZcams: czcams.com/users/javidx9
czcams.com/users/javidx9extra
Discord: discord.gg/WhwHUMV
Twitter: javidx9
Twitch: www.twitch.tv/javidx9
GitHub: www.github.com/onelonecoder
Homepage: www.onelonecoder.com
zhlédnutí: 9 901

Video

DIY Programming Language #2: Tokenising with Finite State Machine
zhlédnutí 27KPřed 21 dnem
In this video I use a Finite State Machine to parse complicated input into manageable tokens before feeding them to the Shunting Yard Algorithm I developed in part 1. Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_DIYLanguage_Tokenizer.cpp Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twit...
DIY Programming Language #1: The Shunting Yard Algorithm
zhlédnutí 43KPřed měsícem
In this video I demonstrate how the Shunting Yard Algorithm works, and produce a simple implementatin to solve basic mathematical expressions like a calculator would. Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_ShuntingYardAlgo.cpp Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: ...
Embedding Lua in C++ Part 3: Meh... Just use Sol...
zhlédnutí 26KPřed 3 měsíci
In this video, I show how to use the excelent Sol library/wrapper to integrate Lua in your C program. This is shown in direct contrast to how i did it in Part #1 which was bare bones, from scratch. Source: github.com/OneLoneCoder/Javidx9/blob/master/SimplyCode/OneLoneCoder_EmbeddingLua_Part3.cpp Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Disc...
Introducing 2D Geometry Library
zhlédnutí 49KPřed 4 měsíci
In this video, I introduce a One Lone Coder Community project called olcUTIL_Geometry2D. It's a new open source library that can perform many varied 2D primitive interactions. This video details how to use basic features of the library. Source: github.com/OneLoneCoder/olcUTIL_Geometry2D Live Demo: community.onelonecoder.com/members/javidx9/Geometry2DDemo1/ Patreon: www.patreon.com/javidx9 CZcam...
Where Has Javidx9 Gone? (and more important things)
zhlédnutí 43KPřed 10 měsíci
olc::CodeJam 2023: itch.io/jam/olc-codejam-2023 Thanks to all the Discord Server members that post their progress, and help others with theirs. CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: discord.gg/WhwHUMV Patreon: www.patreon.com/javidx9 Twitter (or whatevs): javidx9 Twitch: www.twitch.tv/javidx9 GitHub: www.github.com/onelonecoder Homepage: www.onelone...
Coding Quickie: Handling Periodic Numbers with C++ Templates
zhlédnutí 40KPřed rokem
In this throw-together video I handle numbers that wrap, periodic numbers, using some C template trickery. It's not optimal. It's not clever. But it does server to illustrate how complex templates can make your program. Source: github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_PeriodicNumbers.cpp Patreon: www.patreon.com/javidx9 CZcams: czcams.com/user...
Texture Sampling #2: Bilinear & Bicubic Samples
zhlédnutí 23KPřed rokem
Following on from Part 1, I look at two common sampling methods that aim to reduce artefacts, bilinear and bicubic point sampling. The former linearly interpolates between neighbouring pixels, and the latter uses even further pixels to bias cubic splines to give a smoother contour between pixels. Demo: community.onelonecoder.com/members/javidx9/TextureSampling/Part2/ Part 1: czcams.com/video/4s...
Texture Sampling #1: Points & Borders
zhlédnutí 33KPřed rokem
Texture Sampling is fundamental to all grahics these days, but I thought I'd have a bit of an exploration of what exactly goes on trying to emulate what we have come to expect of GPUs. In this video, I establish a little framework, and then create a texture sampling class to demonstrate various methods. Demo: community.onelonecoder.com/members/javidx9/TextureSampling/Part1/ Source: Released at ...
Serialising/Deserialising Structured Memory To Disk, AKA Savin' Stuff
zhlédnutí 83KPřed rokem
In this tedious and long video, I talk about an easy to use file format that's great for serilizing and deserializing data, i.e. Saving Things! Source: Coming Soon! Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: javidx9 Twitch: www.twitch.tv/javidx9 GitHub: www.github.com/onelonecoder Homepage: www...
olc::AllSorts - Text/Commands/Sounds/Jams
zhlédnutí 32KPřed rokem
A mixed bag video, showing off some cool new features of the olc::PixelGameEngine. A brief look at a new companion sound library olc::SoundWaveEngine, and a reminder that olc::CodeJam 2022 is almost upon us, register today! JAM: itch.io/jam/olc-codejam-2022 CODE: github.com/OneLoneCoder Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: disc...
Back To Basics! Fixed Point Numbers in C++
zhlédnutí 60KPřed 2 lety
In this video I look at a simple Fixed Point Number implementation in C . I use constexpr to let the IDE run the code without even compiling anything! The final result is a small template class that permits arbitrary precision fixed point calculations. Patreon: www.patreon.com/javidx9 CZcams: czcams.com/users/javidx9 czcams.com/users/javidx9extra Discord: discord.gg/WhwHUMV Twitter: twitter.com...
Quirky Quad Trees Part 2: Dynamic Objects In Trees
zhlédnutí 41KPřed 2 lety
In this follow on video, I modify our Static QuadTree to allow its contents to move dynamically, and build a simple game demonstrating large arenas, with many thousands of moving objects, updated, rendered and interacted with at high speed. Play In Browser: community.onelonecoder.com/members/javidx9/CreepyCrawleyCapture/ Source: Coming soon! Patreon: www.patreon.com/javidx9 CZcams: czcams.com/u...
Quirky Quad Trees Part1: Static Spatial Acceleration
zhlédnutí 68KPřed 2 lety
Quirky Quad Trees Part1: Static Spatial Acceleration
Dithering with Floyd-Steinberg in C++
zhlédnutí 55KPřed 2 lety
Dithering with Floyd-Steinberg in C
Run-Time Error /RESET
zhlédnutí 27KPřed 2 lety
Run-Time Error /RESET
olc::CodeJam2021 - Theme
zhlédnutí 23KPřed 2 lety
olc::CodeJam2021 - Theme
olc::CodeJam2021 - Announcement
zhlédnutí 15KPřed 2 lety
olc::CodeJam2021 - Announcement
How I Practice Programming: Five Dice
zhlédnutí 91KPřed 3 lety
How I Practice Programming: Five Dice
IMPORTANT! CHANNEL UPDATE
zhlédnutí 53KPřed 3 lety
IMPORTANT! CHANNEL UPDATE
olc::CodeZone - Mission Logs
zhlédnutí 21KPřed 3 lety
olc::CodeZone - Mission Logs
Back To Basics: C++ Containers
zhlédnutí 178KPřed 3 lety
Back To Basics: C Containers
Compiling PGE For Web Browsers!
zhlédnutí 43KPřed 3 lety
Compiling PGE For Web Browsers!
Super Fast Ray Casting in Tiled Worlds using DDA
zhlédnutí 176KPřed 3 lety
Super Fast Ray Casting in Tiled Worlds using DDA
Networking in C++ Part #4: MMO - Designing Passivity
zhlédnutí 72KPřed 3 lety
Networking in C Part #4: MMO - Designing Passivity
Circle Vs Rectangle Collisions (and TransformedView PGEX)
zhlédnutí 47KPřed 3 lety
Circle Vs Rectangle Collisions (and TransformedView PGEX)
Community Showcase 2020
zhlédnutí 29KPřed 3 lety
Community Showcase 2020
Networking in C++ Part #3: MMO Client/Server Framework, Tweaks & Client Validation
zhlédnutí 61KPřed 3 lety
Networking in C Part #3: MMO Client/Server Framework, Tweaks & Client Validation
Controlling Elegoo Robot Smart Car with ASIO and C++
zhlédnutí 39KPřed 3 lety
Controlling Elegoo Robot Smart Car with ASIO and C
A Little Update Video
zhlédnutí 84KPřed 3 lety
A Little Update Video

Komentáře

  • @griffinschreiber6867
    @griffinschreiber6867 Před 23 hodinami

    I now have a full stack of javidx9 Interesting Programming videos (64).

  • @noreoalles
    @noreoalles Před dnem

    Im at the point where camera controls are intruduced at no matter what i normalize, my model looks like a crumpled up sphere. Im truly stuck

  • @andrewdunbar828
    @andrewdunbar828 Před dnem

    mouses and sheeps have different radiuses

  • @KerboOnYT
    @KerboOnYT Před dnem

    Neat! I remember being fascinated with spirographs as a kid

  • @RPG_Guy-fx8ns
    @RPG_Guy-fx8ns Před dnem

    You could use int16, move the range to between -17999 to 18000. You don't need degrees larger than 180.00, unless its for display, in which case you can just add 36000 if its negative. Or just use power of 2 numbers to represent 90 degree angles, and take advantage of numbers that already wrap. 16 bits contain 65535 values, so 65535 URots in a circle. -32,768 to +32,767 Rots. make a look up table that approximates sine and cosine and write your own atan2 for Rots and URots. only convert to degrees when rendering the number, degrees aren't actually good for math.

  • @sjoervanderploeg4340

    I love multi-dimensional arrays filled with something you want to store :D

  • @ZomB1986
    @ZomB1986 Před dnem

    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.

  • @defini7
    @defini7 Před dnem

    The world isn't ready still

  • @sjoervanderploeg4340

    Four bits are called a nibble!

  • @peterweston6588
    @peterweston6588 Před dnem

    Thanks for this. I have always used recursive descent when playing with parsing. I really enjoyed learning the shunting yard algorithm. I implemented this in Python using a regex tokenizer and output RiscV assembly instead on interpreting. So, where you made an interpreter with a compiler, I made a compiler with an interpreter.

  • @michaeloneill3786
    @michaeloneill3786 Před dnem

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

  • @purelove9133
    @purelove9133 Před 2 dny

    Grow your beard please

  • @debsarkar4893
    @debsarkar4893 Před 2 dny

    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

  • @juanmacias5922
    @juanmacias5922 Před 2 dny

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

  • @JavedKhan-ny3pm
    @JavedKhan-ny3pm Před 2 dny

    There is a well known method called FEM (Finite Element Method) which calculates stresses at each node (vertices) of triangles. The triangles cover the surface of a building (architectural) drawing. It’s used for the structural design of the buildings.

  • @wolpumba4099
    @wolpumba4099 Před 2 dny

    *Summary* * *[**0:00**] Inspiration:* Inspired by a nostalgic spirograph toy encountered on holiday. * *[**2:22**] Challenge:* Wanted to code a spirograph simulation but only had a Chromebook. * *[**2:26**] Solution:* Used "PGE Tinker" (pixel game engine tinker) created by Moros1138, a browser-based C++ coding environment for Pixel Game Engine projects. * *[**4:24**] Math Refresher:* Briefly reviewed the math behind drawing circles with sine & cosine functions. * *[**5:25**] Spirograph Simulation:* * [5:25] Visualized fixed and moving gears with calculated radii and rotation. * [12:31] Implemented gear ratio to accurately depict gear interactions. * [13:11] Drew the spirograph path by tracking a penpoint on the moving gear. * *[**17:58**] Enhancements:* * [17:58] Used decals for smoother, persistent gear visuals. * [18:08] Incorporated "Quick Gooey" extension for real-time control of gear sizes and pen offset. * *[**20:47**] Result:* Created a visually appealing and interactive spirograph application entirely within a browser using PGE Tinker. * *[**21:10**] Call to Action:* Encourages viewers to explore PGE Tinker, share their creations, and support Moros1138. i used gemini 1.5 pro to summarize the transcript

  • @axelBr1
    @axelBr1 Před 2 dny

    Is that a metal box it comes in?!

  • @alangrant5278
    @alangrant5278 Před 2 dny

    Great stuff as always. 👍

  • @rinav5684
    @rinav5684 Před 2 dny

    How do you handle terminal distortion, i.e one pixel in terminal being rectangle and not square ?

  • @tmbarral664
    @tmbarral664 Před 2 dny

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

  • @idiedlastmonth
    @idiedlastmonth Před 2 dny

    Very useful! Appreciate it!

  • @brockormond4131
    @brockormond4131 Před 2 dny

    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.

  • @sakikogookheng
    @sakikogookheng Před 2 dny

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

  • @gower1973
    @gower1973 Před 2 dny

    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 Před 2 dny

      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.

  • @unknown_error101
    @unknown_error101 Před 2 dny

    That would honestly make a killer screen saver.

  • @landsgevaer
    @landsgevaer Před 2 dny

    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 Před 2 dny

      Remined me of this: czcams.com/video/FUHkTs-Ipfg/video.htmlsi=fFqMN_EhEjyD5nNo

  • @minirop
    @minirop Před 2 dny

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

  • @SassyToll
    @SassyToll Před 2 dny

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

  • @RealCaptainAwesome
    @RealCaptainAwesome Před 2 dny

    Now I want to make a spirograph

  • @Czeckie
    @Czeckie Před 2 dny

    good job moros!

  • @brawldude2656
    @brawldude2656 Před 2 dny

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

  • @daveking-sandbox9263

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

    • @javidx9
      @javidx9 Před 2 dny

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

  • @__hannibaalbarca__
    @__hannibaalbarca__ Před 2 dny

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

  • @quicktastic
    @quicktastic Před 2 dny

    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).

  • @christianlett
    @christianlett Před 2 dny

    Nice shirt. I have the same one!

  • @greketrotny
    @greketrotny Před 2 dny

    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.

  • @tomkirbygreen
    @tomkirbygreen Před 2 dny

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

  • @amirgardia4330
    @amirgardia4330 Před 2 dny

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

  • @ncot_tech
    @ncot_tech Před 2 dny

    Good taste in dodgy shirts 👌

    • @javidx9
      @javidx9 Před 2 dny

      It's a cracker this one!

  • @JADE-iteGames
    @JADE-iteGames Před 2 dny

    That is awesome!

  • @natsuhiboshi7161
    @natsuhiboshi7161 Před 2 dny

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

  • @ivan_prime
    @ivan_prime Před 2 dny

    Neat! 😎

  • @gedaliakoehler6992
    @gedaliakoehler6992 Před 2 dny

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

    • @csgowoes6319
      @csgowoes6319 Před dnem

      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.

  • @HYRULE10
    @HYRULE10 Před 2 dny

    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 Před 2 dny

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

  • @KDM16AAB
    @KDM16AAB Před 2 dny

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

    • @juanmacias5922
      @juanmacias5922 Před 2 dny

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

  • @VincentGuillotine
    @VincentGuillotine Před 2 dny

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

    • @javidx9
      @javidx9 Před 2 dny

      Reliable, affordable, fashionable. Best watch ever

    • @sakikogookheng
      @sakikogookheng Před 2 dny

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

  • @manuelsuarez7521
    @manuelsuarez7521 Před 2 dny

    cool video!

  • @obinator9065
    @obinator9065 Před 2 dny

    how ya doin

    • @javidx9
      @javidx9 Před 2 dny

      Not bad thanks Obin!

  • @motasam8122
    @motasam8122 Před 2 dny

    you welcome back

  • @jumbledfox2098
    @jumbledfox2098 Před 2 dny

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