I’m making a program where the user can click on the screen 3 times and it makes a triangle. It will then find the middle points of those 3 lines. Next, I want it to draw 3 lines perpendicular to each of the lines that make up the triangle (through the middle points). I’m stuck at drawing the perpendicular lines.
Tag: angle
Calculating angles between line segments (Python) with math.atan2
I am working on a spatial analysis problem and part of this workflow is to calculate the angle between connected line segments. Each line segment is composed of only two points, and each point has a pair of XY coordinates (Cartesian). Here is the image from GeoGebra. I am always interested in getting a positive angle in 0 to 180