Algorithm needed to find a point on A4 size plane
-
Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?
-
Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?
Split the larger triangle into two right-angled triangles, and apply Pythagoras:
L1² = x² + y² L2² = (X1 - x)² + y² = X1² - 2·X1·x + x² + y² L2² - L1² = X1² - 2·X1·x 2·X1·x = X1² - L2² + L1² x = (X1² - L2² + L1²) / 2·X1 y = ± √(L1² - x²)
NB: there will be two solutions - one with a positive value fory
, and one with a negative value.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Distance given to a point on plane of A4 size. How to find X, Y if L1 and L2 (distances are given) ? here is a link to image : http://s11.postimg.org/wymbahpxv/Xand_Y.png[^] X1=55mm Any ideas ?
Use Pythagoras. Let Pen tip = P. We know L1, L2, X1. Define line segments R1 -> P = L1, R1 -> x = A, (x,0) -> P = B. A2 + B2 = L12 We know the length of A is X, since it's (0,0) -> (x,0), and we know length of B is y, since it's (x,0) to (x,y) x2 + y2 = L12 Let R2 -> P = L2, x -> R2 = C B2 + C2 = L22 A + C = X1 => C = X1 - A So we have x2 + y2 = L12 y2 + (X1 - x)2 = L22 Solve these and you get x and y
cheers Chris Maunder