filmov
tv
Segment intersection formula explained
Показать описание
I teach you how to find the intersection point of two segments (if it exists). We study the mathematics and implement visualizations to understand what the math is actually doing. We first learn how to detect the intersection of lines and then check to see if the intersection point is within the segment borders.
To figure out the segment intersection we use linear interpolation (lerp). We essentially try to find the offset values for each segment where the coordinates are the same by solving a system of equations.
You will learn how to code a JavaScript function that gets the intersection point of two segments or returns null if it doesn't exist. We will test this function in many situations and become confident that it works.
Finding the intersection of two segments is a fundamental tool in solving many problems. For example, in the self-driving car project, we use it to make the sensors work and to detect collisions.
⭐️SELF-DRIVING CAR COURSE PLAYLIST⭐️
⭐️A MORE MATHEMATICAL PROOF⭐️
⭐️ TABLE OF CONTENT ️⭐️
0:00 Intro
1:15 Project setup
4:17 Visualizing the segments
8:07 Linear interpolation
14:31 Get intersection function
21:37 Extensive testing
25:47 Visual debugging
30:30 Checking if intersection point is within bounds
To figure out the segment intersection we use linear interpolation (lerp). We essentially try to find the offset values for each segment where the coordinates are the same by solving a system of equations.
You will learn how to code a JavaScript function that gets the intersection point of two segments or returns null if it doesn't exist. We will test this function in many situations and become confident that it works.
Finding the intersection of two segments is a fundamental tool in solving many problems. For example, in the self-driving car project, we use it to make the sensors work and to detect collisions.
⭐️SELF-DRIVING CAR COURSE PLAYLIST⭐️
⭐️A MORE MATHEMATICAL PROOF⭐️
⭐️ TABLE OF CONTENT ️⭐️
0:00 Intro
1:15 Project setup
4:17 Visualizing the segments
8:07 Linear interpolation
14:31 Get intersection function
21:37 Extensive testing
25:47 Visual debugging
30:30 Checking if intersection point is within bounds
Комментарии