I am programming a semi-circle (and it can also be a circle) that animates to full and empty like so:
I am having a hard time calculating is the slant on the line. What I would like to do is have a bold line drawn that follows the tip of the circle and adapts to it curve like so:
I have done research on finding the point on a circle at any given angle. What I am struggling with is how to find the slope of the line at that point.
Can you suggest how I might calculate the slope of a line at a point in the circle?
Update
Slope was correct and as suggested by @S.C.B.
And the suggestion by @HenningMakholm lead me to the final solution. I originally asked about the slope and the answer provided is correct. Ultimately I wanted to draw a line along the slope and using an inner and outer radius to find the inner and outer points was the solution that worked best.




