Advertisement

Arc calculation

Started by December 10, 2013 12:33 PM
9 comments, last by ferrous 11 years, 2 months ago

ferrous, when dragging P2, the cursor won't always stay on P2 if it's dragged to a different radius. Notice in my diagram that Pc is not at P2. The cursor will be at P2 to start dragging but not necessarily during the drag. This allows the arc to stay circular with a constant length. My app works similarly when dragging a straight line to change it's angle to keep its length constant. This is for a vector graphics drawing / animation app. I want an intuitive way to position and bend constant length lines.

Attached is a Windows demo of what I'm trying to do. This is an old version. Drag the green dot to change the line angle and drag with Ctrl to bend it. It will always stay the same length. Notice that the cursor moves away from the end as you bend it, and the end jumps when you go back to bend a bent line. That's what I'm trying to fix. If I get my new method to work with a numerical method then I'll post it as well.

Advertisement

Sorry, I don't think i was clear, I am thinking of a case where the arclength is something like 20 units, but the two points are only like 1 unit apart. The arc formed is no longer circular in that case. In your example, you seem to have a min radius, so maybe that can't come up?

This topic is closed to new replies.

Advertisement