Uploaded May 2025 | Updated September 2026, 2 weeks ago
Today, I’ll show you some neat HTML canvas tricks to simplify working with coordinates. Together, we’ll learn how to generate a grid of any size and draw polygons over it. But that’s not all—we’ll also explore the fascinating missing square illusion!
This project is perfect for beginners looking to enhance their skills with JavaScript and HTML canvas. It’s an engaging way to learn about grids, polygons, and how visual tricks like the missing square illusion work.
Let’s dive into coding and uncover the secrets of this optical illusion.
Today, I’ll show you some neat HTML canvas tricks to simplify working with coordinates. Together, we’ll learn how to generate a grid of any size and draw polygons over it. But that’s not all—we’ll also explore the fascinating missing square illusion!
This project is perfect for beginners looking to enhance their skills with JavaScript and HTML canvas. It’s an engaging way to learn about grids, polygons, and how visual tricks like the missing square illusion work.
Let’s dive into coding and uncover the secrets of this optical illusion.

![Camera Input for Racing Game in JavaScript [Understanding AI - Lesson 14 / 15]
PLAYLIST: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81
In Lesson 12 of the Understanding AI course, join me in implementing camera controls for our racing game using the marker detector code we built in the previous tutorial. This innovative approach will elevate your gaming experience as we delve into using marker centroids to determine tilt, allowing for dynamic control within the game.
Picture this – pulling back with the marker activates the brake, and with a prolonged hold, it seamlessly switches to reverse. Ill guide you step-by-step through this process, demonstrating how to draw an augmented reality steering wheel that visually enhances the sensation of gripping and steering.
Its time to merge the worlds of AI, game development, and marker detection for an immersive racing experience. So, buckle up and get ready to accelerate – vroom! Like, share, and subscribe for more lessons on AI, game development, and cutting-edge programming techniques!
💻CODE 💻
https://github.com/gniziemazity/understanding_ai
Follow Along: 8. Phone Input AND 9. Marker Detector
Code After This Lesson: 10. Camera Input
💬DISCORD💬
discord.gg/gJFcF5XVn9
⭐LINKS⭐
Self-driving Car Course: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYoJE7ZwsBQoDIG4YN9ptyY
#RacingGame #RacingGameJavaScript #CameraInput #ImageProcessing #JavaScriptWebcamGame #JavaScriptWebcamControls
⭐TIMESTAMPS⭐
00:00 Introduction
00:58 Camera Controls
14:22 Augmented Reality
24:28 Detect Closeness to Camera Camera Input for Racing Game in JavaScript [Understanding AI - Lesson 14 / 15]](https://i.ytimg.com/vi/odgKS32XS6Q/mqdefault.jpg)








