I solved the equations for you:
k = ((y2-y1) * (x3-x1) - (x2-x1) * (y3-y1)) / ((y2-y1)^2 + (x2-x1)^2)
x4 = x3 - k * (y2-y1)
y4 = y3 + k * (x2-x1)
Where ^2 means squared
More Related Contents:
- How to determine if a list of polygon points are in clockwise order?
- A simple algorithm for polygon intersection
- How do I detect intersections between a circle and any other circle in the same plane?
- Projecting 3D points to 2D plane [closed]
- Calculate distance between 2 GPS coordinates
- Generate a random point within a circle (uniformly)
- Turning a cylinder into a sphere without pinching at the poles
- How to calculate the volume of a 3D mesh object the surface of which is made up triangles
- Sort points in clockwise order?
- Cone to box collision
- How do I calculate the normal vector of a line segment? [closed]
- Calculating area enclosed by arbitrary polygon on Earth’s surface
- How do I combine complex polygons?
- Using atan2 to find angle between two vectors
- correcting fisheye distortion programmatically
- Implementing Ray Picking
- Signed angle between two 3D vectors with same origin within the same plane
- Angle between two vectors in R
- How to distribute points evenly on the surface of hyperspheres in higher dimensions?
- Finding the coordinates of points from distance matrix
- how map 2d grid points (x,y) onto sphere as 3d points (x,y,z)
- 3D coordinates on a sphere to Latitude and Longitude
- Calculate rotated rectangle size from known bounding box coordinates
- How to best approximate a geometrical arc with a Bezier curve?
- Get bounds of rotated rectangle
- Location of highest density on a sphere
- Calculate the center point of multiple latitude/longitude coordinate pairs
- Calculating a LookAt matrix
- Redraw image from 3d perspective to 2d
- Math – mapping numbers