Geometry Expressions

Intersection

In this example, we create C++ code for the intersection point between two line segments.

First draw the segments, and specify coordinates of their end points.

Animation: drawing two segments and setting their end point coordinates

Now create a point at the intersection and measure its coordinates..

Animation: creating the intersection point and measuring its coordinates

Copy as C++.

Animation: copying the coordinates as C++

And paste into your code editor.

Animation: pasting the C++ code into a code editor