Welcome to the course where we build a self-driving car simulation in a virtual world. In this video we'll learn a technique using geometry to wrap the graph segments in what I like to call envelopes: polygons surrounding the segment in a certain way.
These envelopes have extra points that give them a smooth, rounded appearance. We'll explore how to compute the union of these polygons to retain only the outer segments, resulting in visually pleasing and seamless road borders. Not only does this approach make your roads look more professional, but it also minimizes the number of clicks required in the editing process, making world building a satisfying endeavor.
Have Fun! :-) 🛣️
⭐PLAYLIST⭐
• Self-driving Car :: Phase2️⃣
⭐FINAL APP⭐
https://radufromfinland.com/projects/...
💻CODE💻
https://github.com/gniziemazity/virtu...
3. Dynamic Viewport = follow along
4. Roads = code after this lesson
💻COPY CODE FROM HERE💻
https://radufromfinland.com/projects/...
⭐ALL PREREQUISITES⭐
• Math & Code Fundamentals
⭐My Video on 2D Vectors⭐
• Learn 2D Vectors with JavaScript
⭐My Video on Segment Intersection⭐
• Segment intersection formula explained
⭐My Video on Interpolation⭐
• Linear Interpolation (Lerp) - Math and Jav...
☕Buy me a Coffee?☕
https://www.buymeacoffee.com/radum
⚡️Join this Channel⚡️
https://youtube.com/@radu/join
⭐Timestamps⭐
00:00 Introduction
01:07 Polygon Class
04:45 Polygon Envelopes
11:04 Roundness
16:45 World Class
20:35 Finding Intersections
35:22 Polygon Union
39:22 Point in Polygon Check
43:24 Styling
Auf dieser Seite können Sie das Online-Video A Virtual World - JavaScript Course: Lesson 4 / 11 [Polygon Operations in JavaScript] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Radu Mariescu-Istodor 13 Oktober 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 10,108 Mal angesehen und es wurde von 266 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!