# New Tool: Arc from 2 points and Angle

Issue #943 new Alexei Burmistrov created an issue

Very often an arc is drawn to connect two already existing points, so that the lines, these points belong to are tangential to the arc. Now it is necessary to build a center point first. This is no easy task if the angle between the lines is not straight. One has to build two perpendicular lines from the points and find their intersection. So much work for nothing, because the angle between two lines and two points is all what it takes to build the arc.

A new tool "Arc from 2 points" would satisfy this use case. The user selects two points and presses Enter. In the tool dialog the angle of the arc is entered. To generate center point or not can be left as a tool option.

1. repo owner
• changed milestone to TBD
2. repo owner

Okay. I can imagine two points, but what about the angle? What represents this angle? Can you draw for me simple image and show on it all data we have?

3. reporter Is it what you are speaking of? Angle means the angle of arc

4. repo owner

Is it what you are speaking of?

Yes. But i don't like formula for getting radius. I believe you have made a mistake here. AB = 2r sin (α/ 2) Alpha in this example is different angel. What do you think? If i am wrong show me link to place which confirms your version.

5. reporter

alpha is exactly the "Angle", I was speaking of. The tool builds arc from A, B, and alpha. The previous story was how the tool could be used to smoothly connect lines but it is just a use case. Sorry for misunderstanding

6. reporter
• edited description
7. repo owner

Good, but i still miss one piece. How to find center point if i know only radius, AB length and alpha?

8. reporter

look at the how to part of my drawing. 1. find the middle between two points. 2. build perpedicular line from this point of length d. Vector notation will make it the easiest way

9. reporter

center vector should be something like C = (A + B) / 2 + P(B - A) / 2 * cotan(Alpha/2), where A, B, C - vectors, and P([x, y]) =[-y, x] Oh, and of course alpha must be > 0.

10. repo owner Here is how i see this case. To find an arc center we can:

2. Find points of circles intersections with centers of known points.
3. Allow user to select which of two cases to select.

But i don't know how do you suppose to calculate alpha angle value. Because your angle A1A0A4 from the first picture is not alpha.

11. reporter

No, A0 is not alpha, you are right. Angle = alpha = 180 - A0, as was depicted on my drawing. A0 was introduced to illustrate the necessary condition to use the tool in the use case of smooth transition between two lines :A0, A2 == A0, A3

12. reporter

Your construction method is totally valid. I just showed that vector algebra equivalent is a quite concise formula