# area of a circle - 3/4th

How to find the pixels of that line which is crossing the circle? Is there any formula? Iam getting the line's end points

-

## migrated from stackoverflow.comNov 14 '12 at 13:14

This question came from our site for professional and enthusiast programmers.

do you know the centre of the circle ? –  Shamis Shukoor Nov 14 '12 at 12:00
yeah, I know the centre and radius of the circle. –  Dev Nov 14 '12 at 12:05
You could fine the area of that particular sector with the angle formed on the centre. Now you just have to find the area of the whole circle and subtract the sectors area. Hope you got it. –  Shamis Shukoor Nov 14 '12 at 12:16
What line? What data do you have? Area of the circle, or 'pixels of the line' (whatever that might mean)? Not a real question. –  EJP Nov 14 '12 at 12:21

What you have outside the line is a Circular Segment. If $R$ is the radius of the circle and $\theta$ is the full angle at the center, the area is $\frac {R^2}2(\theta - \sin \theta)$. Presumably the $\frac 34^\text{th}$ in your title means this is $\frac 14$ of the circle, you can solve numerically to find $\theta \approx 2.31$ radians. Nothing you have given allows the determination of the end points, as the figure can be rotated around the center. Your figure has the segment much less than $\frac 14$ of the circle.
The arc on one side of the line seems to be $90^\circ=\frac\pi2=\frac14\text{ circumference}$. So the arc is a "circle minus $\frac34$". The area of the bit of the circle to the upper left of the line (in red), would be $\frac14$ the area of the circle minus the area of the green triangle.
$\hspace{5cm}$
That is, the area of the red piece is $$\frac14\pi r^2-\frac12r^2=\frac14(\pi-2)r^2$$