Talk:Length of an arc between two angles

From Rosetta Code

Task needs clarification

I'm not sure we can even treat this as a draft task until the author clarifies certain aspects.

First of all angles 1 and 2 in the linked diagram are points on the circumference, not angles, so I assume you mean they are the angles between the chord drawn between them and lines drawn from the center of the circle to those points?

If we already know these two angles, it seems to me that the coordinates of the center of the circle are irrelevant so we don't need 'xpos' and 'ypos'.

The two points on the circumference together with the center of the circle will, of course, form a triangle and the angle at the center is therefore going to be (180 - angle1 - angle2). The total angle at the center is 360 and the larger component will then be (180 + angle1 + angle2). The larger of the two arcs can then be found by splitting the circumference in the proportion which this angle bears to 360 degrees.

Is this what you're intending us to do? --PureFox (talk) 18:07, 15 March 2020 (UTC)

I wouldn't hold out too much hope. Molo32 has a habit of dumping under specced, confusing, tasks on the site with no follow up, bad markup and no reference implementation. Honestly it seems like they are just trying to get someone to do their homework for them. Been around for nearly two years and in that time; has contributed exactly zero implementations and hasn't bothered to investigate correct markup. --Thundergnat (talk) 19:12, 15 March 2020 (UTC)
Yeah, I think you're probably right. BTW, well done on completing the Perl 6 to Raku renaming exercise - a massive task if ever there was one :) --PureFox (talk) 19:32, 15 March 2020 (UTC)
One interpretation could be given an {x,y} centre or the radius, and {x1,y1}, {x2,y2} of two points on the circumference or their angles or the chord length, and clockwise/anti-clockwise or longer/shorter... and some partial combinations of those inputs w/could yield "ambiguous" or "unsolveable" as a result... --Pete Lomax (talk) 21:55, 15 March 2020 (UTC)
Several interpretations are possible but a consensus seems to have formed that the Julia approach is what's intended. So, unless and until we hear from the author otherwise, I've decided to go with that. Have amended the task description accordingly so it's now clear enough to be treated as a draft task. --PureFox (talk) 10:03, 16 March 2020 (UTC)

"Major arc" has a clear definition that should have been given in the task description. From Wikipedia: Every pair of distinct points on a circle determines two arcs. If the two points are not directly opposite each other, one of these arcs, the minor arc, will subtend an angle at the centre of the circle that is less than π radians (180 degrees), and the other arc, the major arc, will subtend an angle greater than π radians. It's unfortunate that the solutions offered are doing something else.

normalization of angles

Perhaps it should be mentioned that the angles should be normalized to a unit circle.   It's simple enough to add angle normalization to the code.   Negative angles can be a concern, depending on how one interprets "which" arc is intended.     -- Gerard Schildberger (talk) 13:31, 16 March 2020 (UTC)