-1

My question is how do get a coordinate point intersect of 2 line in draw i.o

I need a function to resolve this problem in javascript (get coordinate of point only)

Example:

This image for i mean

Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Mhd Jawad
  • 15
  • 5

1 Answers1

-1

With the start and end points of both of those lines, you can calculate their slopes. Since you have at least one point you can then compute the slope-intercept form of the lines and set the y's equal to each other to calculate the intersection points' Cartesian coordinates.

skhan
  • 199
  • 10
  • Good, this in maths in javascript how i cant make this ? @shadkhan – Mhd Jawad Jul 03 '19 at 13:44
  • @MhdJawad You can follow the implementation from this solution: https://stackoverflow.com/questions/13937782/calculating-the-point-of-intersection-of-two-lines and adjust your logic as necessary – skhan Jul 03 '19 at 13:52
  • @MhdJawad Please close your question by clicking the check mark to the left of the answer that helped you most :) – skhan Jul 03 '19 at 14:08