# The distance between the points on the circle

The question was asked: 6 years 8 months ago   views: 21
 0 Have a circle (the radius does not matter, example 1), which is some point obtained at the intersection of this circle with the ray emanating from the center of the circle at an arbitrary angle. How to implement the algorithm for finding the nearest of the points A, b, C, D and so N (option) to point X, which is known in advance. Tried the formula for finding the minimum of the chord and the minimum angle get an incorrect result. Realize I need it in Excel. Asked: alexnik 18-11-2012 в 02:23:44and what formula did you use? - VladD 18-11-2012 в 03:14:05the minimum angle should work. Only properly deal with angles >PI. - Sergiks 18-11-2012 в 08:50:14The fact of the matter is that I can't find the right technique. - alexnik 18-11-2012 в 11:44:43This at the entrance? - Sergiks 18-11-2012 в 12:06:33The angles at which rays intersect the circle - alexnik 18-11-2012 в 15:20:15

 0 Alex Nikush: so, the solution I found: =MIN(ABS(IF(\$C\$2:\$C\$4\$E\$2<180;2SIN((\$C\$2:\$C\$4\$E\$2)/2);2SIN((360-\$C\$2:\$C\$4+\$E\$2)/2)))) Without touching the math formula Excel can be reduced (the array formula): ``````=MIN(ABS(2*SIN((IF(\$C\$2:\$C\$4\$E\$2<180;;360)+\$E\$2-\$C\$2:\$C\$4)/2))) =MIN(ABS(2*SIN(((\$C\$2:\$C\$4\$E\$2>=180)*360+\$E\$2-\$C\$2:\$C\$4)/2))) `````` To the question from 19 Nov to 15:42 and 19:10. "Cap" table.1 (Object/Light/Subject/Code) - A1:D1 Table 1 A2:C6 "Cap" table.2 (Subject/Code/Beam) - A9:C9 Table 2 A10:C15 In D2, array formula: ``````=INDEX(\$B\$10:\$B\$15;MAX(ESLI(MIN(ISLI(C2=\$A\$10:\$A\$15;ABS(2*SIN((ESLI(B2-\$C\$10:\$C\$15<180;;360)+\$C\$10:\$C\$15-B2)/2));2))=ESLI(C2=\$A\$10:\$A\$15;ABS(2*SIN((ESLI(B2-\$C\$10:\$C\$15<180;;360)+\$C\$10:\$C\$15-B2)/2));2);STROKE(\$10:\$15)-9))) `````` To stretch the formula by row (D2:D6) Formula heavy, relief is possible, but you need to "feel" alive file. Without file Excel playback solutions time-consuming. If you have any questions, please contact vikttur@list.ru Answered: vikttur 18-11-2012 в 20:07:50Tried to extend the formula to the column. There is a table. The object Beam Subject Объект1 15 Субъект1 Объект1 105 Субъект1 Objet2 50 Субъект2 Objet2 225 Субъект2 Объект3 30 Субъект3 and Subject Code Beam Субъект1 Субъект1 11 23 12 53 13 301 Субъект1 Субъект2 Субъект2 21 90 22 23 45 Субъект2 1 and so As to return to the minimum distance from the subject to the object code of the subject? Tried array formulas `, the INDEX(...the SMALLEST(STRING)...)` and INDEX(...match(MIN)...) clear(( - alexnik 19-11-2012 в 15:42:24Don't understand how to bind the value obtained with the original data. - alexnik 19-11-2012 в 15:42:46And I do not understand :) Can you explain with example what you need? - vikttur 19-11-2012 в 18:09:57Must be so `the Object Beam Subject Code Объект1 15 Субъект1 12 Объект1 105 Субъект1 13 Objet2 50 Субъект2 Objet2 Субъект2 21 225 21 30 33 Объект3 Субъект3` Return code should correspond to the condition of a minimum distance between the Beam and the Object Beam of the Subject. Объекту1 can only be Субъект1, but each Object and each Subject can have multiple values. - alexnik 19-11-2012 в 19:10:50The answer to the second question added to the answer to the first (18 Nov, 20:07). - vikttur 24-11-2012 в 15:49:09