I am preparing an Android app that has two circles, a line is attached between two rows Have managed to draw a line, regardless of the angle between them. The question is, I want to expand that line at the end of the screen. Do I know how to do this? Thank you.
The coordination of two circle centers (A, B) and (C, D)
The line segment you want to attract goes (p,?) To (q,?) Where p and q are X-coordinates of left and right sides of the screen. You can use:
y = ((d - b) / (c - a)) * (p - a) + by = ((d - b) / (c - A)) * to find two y-values of those points * (q - a) + b
If you have two points vertical (C = A) which is divided by zero If the cause is created then you will have a problem.
Comments
Post a Comment