Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have an arc with a given center, start angle, end angle, and radius.

I want to draw an arrow showing the arc direction in the arc middle point. What is the easiest way to calculate this direction (it does not need to be precise, it's only a representation issue)?

I've found the arc middle point so far.

My only idea is to find a point very close to the middle point with the direction the arc has. Then, take the direction of the line connecting these two points and draw an arc to this line. Unfortunately, this needs much computation, and as I want to use it in a C++ application I'm looking for better way of determining arrow vector direction.

share|improve this question
1  
Do you mean the direction of the tangent to the arc middle point? If so, it is orthogonal to the direction given by $(\theta_1+\theta_2)/2$. –  enzotib Jul 31 '12 at 12:09
    
Ok I see. What is your /theta? Please make answer. –  krzych Jul 31 '12 at 12:13
    
simply add $\pi/2$ –  enzotib Jul 31 '12 at 12:14
    
Sorry dont get it? To what I should add pi/2 –  krzych Jul 31 '12 at 12:15
add comment

1 Answer

up vote 1 down vote accepted

The middle point of the arc given by $$(x,y)=(x_0,y_0)+r(\cos t,\sin t),\qquad t\in[\theta_1,\theta_2] $$ is relative to the value of $t$ given by $t=(\theta_1+\theta_2)/2$, and the direction of the tangent is obtained adding $\pi/2$ (modulo $\pi$ if you don't care about the versus): $$t=\frac{1}{2}(\theta_1+\theta_2+\pi).$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.