Uploaded October 2023 | Updated September 2026, 2 weeks ago
Welcome to the course where we build a self-driving car simulation in a virtual world. In this video we're diving into the art of adding decorative elements to the virtual world—specifically, buildings and trees. In this video we start by defining the bases of these structures.
Now, you might wonder why not use the same graph editing tools we've explored before? Well, if you're planning to create expansive worlds and desire precise alignment, it can get quite tedious. So, we're going to leverage the functionalities we already have and implement a clever algorithm for procedurally generating buildings alongside the roads. And for that extra touch of realism, we'll randomly place trees where they naturally fit.
Admittedly, this solution may limit your ability to design buildings exactly as you envision them, but the trade-off is worth it. With this approach, world generation becomes incredibly fast and straightforward. In fact, you'll be able to build vast cities in no time! 🏢🌳
Here's a sneak peek of the algorithm: We start by creating thicker envelopes, then use the same process as before to extract the outer segments. We keep the segments long enough to support at least one building and, for the exceptionally long ones, divide them into multiple supports. Finally, we generate polygons around these structures using envelopes and apply some fine-tuning to achieve the desired results.
Have Fun! :-)
⭐PLAYLIST⭐
youtube.com/playlist?list=PLB0Tybl0UNfZtY5IQl1aNwcoOPJNtnPEO
⭐FINAL APP⭐
radufromfinland.com/projects/virtualworld
💻CODE💻
github.com/gniziemazity/virtual-world
4. Roads = follow along
5. Buildings And Trees= code after this lesson
💻COPY CODE FROM HERE💻
radufromfinland.com/projects/virtualworld/CODES/lesson_5.js
⭐ALL PREREQUISITES⭐
youtube.com/playlist?list=PLB0Tybl0UNfZ3nnHVg8SJ4uK3R4QD6R0H
⭐My Video on Distance to Segment⭐
youtu.be/jvqomjmMsPI
☕Buy me a Coffee?☕
buymeacoffee.com/radum
⚡️Join this Channel⚡️
youtube.com/@radu/join
⭐Timestamps⭐
00:00 Introduction
01:17 Top-level code
03:03 Generating Buildings
19:58 Generating Trees
26:55 Avoid illegal locations
39:18 Fine-tuning
Welcome to the course where we build a self-driving car simulation in a virtual world. In this video we're diving into the art of adding decorative elements to the virtual world—specifically, buildings and trees. In this video we start by defining the bases of these structures.
Now, you might wonder why not use the same graph editing tools we've explored before? Well, if you're planning to create expansive worlds and desire precise alignment, it can get quite tedious. So, we're going to leverage the functionalities we already have and implement a clever algorithm for procedurally generating buildings alongside the roads. And for that extra touch of realism, we'll randomly place trees where they naturally fit.
Admittedly, this solution may limit your ability to design buildings exactly as you envision them, but the trade-off is worth it. With this approach, world generation becomes incredibly fast and straightforward. In fact, you'll be able to build vast cities in no time! 🏢🌳
Here's a sneak peek of the algorithm: We start by creating thicker envelopes, then use the same process as before to extract the outer segments. We keep the segments long enough to support at least one building and, for the exceptionally long ones, divide them into multiple supports. Finally, we generate polygons around these structures using envelopes and apply some fine-tuning to achieve the desired results.
Have Fun! :-)
⭐PLAYLIST⭐
youtube.com/playlist?list=PLB0Tybl0UNfZtY5IQl1aNwcoOPJNtnPEO
⭐FINAL APP⭐
radufromfinland.com/projects/virtualworld
💻CODE💻
github.com/gniziemazity/virtual-world
4. Roads = follow along
5. Buildings And Trees= code after this lesson
💻COPY CODE FROM HERE💻
radufromfinland.com/projects/virtualworld/CODES/lesson_5.js
⭐ALL PREREQUISITES⭐
youtube.com/playlist?list=PLB0Tybl0UNfZ3nnHVg8SJ4uK3R4QD6R0H
⭐My Video on Distance to Segment⭐
youtu.be/jvqomjmMsPI
☕Buy me a Coffee?☕
buymeacoffee.com/radum
⚡️Join this Channel⚡️
youtube.com/@radu/join
⭐Timestamps⭐
00:00 Introduction
01:17 Top-level code
03:03 Generating Buildings
19:58 Generating Trees
26:55 Avoid illegal locations
39:18 Fine-tuning

![3D Camera in JavaScript - No Libraries [Understanding AI - Lesson 10 / 15]
PLAYLIST: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYbL1vDNrfHoYOKf1Sn0A81
In Lesson 10 of the Understanding AI course, Im excited to teach you how to implement a unique perspective in your self-driving car project: one from the cars viewpoint. The fascinating part? We wont be using any libraries to achieve this effect, as the underlying math is surprisingly straightforward. I believe understanding the fundamentals is crucial, and youll appreciate the simplicity of the method.
I stumbled upon a helpful video (https://youtu.be/6td_zpQC1U4) during my own learning journey, which inspired the approach Im about to share with you. While the method Ill teach is a bit different, it caters to our self-driving cars ability to turn around, allowing us to see things from any angle. The core mathematical principles, however, remain almost the same. For another perspective, I recommend checking out the referenced video.
Get ready for some in-depth learning on creating a 3D camera sensor in JavaScript using math. Were diving into the world of perspective views, and by the end of this lesson, youll be able to implement this exciting feature in your own projects. Join me in exploring the mathematical magic behind 3D cameras, and dont forget to like, share, and subscribe for more lessons on AI, game development, and innovative programming techniques!
💻CODE 💻
https://github.com/gniziemazity/understanding_ai
Follow Along: 5. Procedural Sound
Code After This Lesson: 6. Camera Part 1
💬DISCORD💬
discord.gg/gJFcF5XVn9
⭐LINKS⭐
Self-driving Car Course: https://www.youtube.com/playlist?list=PLB0Tybl0UNfYoJE7ZwsBQoDIG4YN9ptyY
Video about 3D: https://youtu.be/6td_zpQC1U4
#RacingGame #RacingGameJavaScript #3D #Pseudo3D #3DNoLibraries #3DJavaScript #JavaScript Lesson
⭐TIMESTAMPS⭐
00:00 Introduction
01:01 Quick Debugging
02:42 Camera Object
09:58 Rendering what the Camera sees
14:05 Explaining the Projection
19:30 Debugging / Fixing Problems 3D Camera in JavaScript - No Libraries [Understanding AI - Lesson 10 / 15]](https://i.ytimg.com/vi/BqX994oVyNE/mqdefault.jpg)






![Polyrhythms in JavaScript | How Math Can Make Your Code Better (#SoMEπ )
In this video I teach you about good coding practices when building a fun project. It emphasizes how understanding math concepts can result in simpler, easier to understand code that also correlates with fewer bugs.
The project was inspired by the polyrhythms on the @project_jdm channel:
https://www.youtube.com/@project_jdm
Check them out if you havent seen them yet!
While building this, well learn about procedural sound generation techniques, demonstrate how to enhance code structure for better readability and maintainability, and showcase the power of math in simplifying complex codebases.
If youve ever doubted the usefulness of math in coding, this video is tailor-made for you! Well debunk the myth and show you firsthand how a bit of mathematical understanding can elevate your programming skills to new heights. So, grab your coding gear and get ready to follow along with this exciting project!
const soundFrequencies = [
1760, 1567.98, 1396.91, 1318.51, 1174.66, 1046.5, 987.77, 880,
783.99, 698.46, 659.25, 587.33, 523.25, 493.88, 440, 392, 349.23,
329.63, 293.66, 261.63
];
💻CODE💻
https://github.com/gniziemazity/polyrhythm
⭐10 Ways to draw Circles⭐
https://youtu.be/W6cirmhLSSw?si=VagXmoQoEDhCJ5Xm
⭐More WebAudioAPI Tutorials⭐
https://www.youtube.com/playlist?list=PLB0Tybl0UNfbHdMGj5VfLDGqAC-ugEqfy Polyrhythms in JavaScript | How Math Can Make Your Code Better (#SoMEπ )](https://i.ytimg.com/vi/FFyuRzq0nsg/mqdefault.jpg)

