# Sector in Circle - pie-shaped region bounded by an arc and an angle

I have a static image containing a circle
Triangle size needs to always be the same area (should make it easy)
Triangle could be placed in different region of circle,
Triangle will always be pointed to the center
I need something similiar to this:

http://www.worsleyschool.net/science/files/sector/calculations.html

How do I draw a triangle region inside of a circle.

SOLUTION
Mike Tomlinson

membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.

This look very very good, thanks!

My only concern is "I have a static image containing a circle"(from my first comment) I have to use a very specific image file that contains a circle as the template that contain some items including some lines... so i would need to incorporate this example to an existing image already available.

The best way i can discribe my image template is this: (found on the internet):

Basically i will have 12 sections divided just like the url provided.

Please let me know if you need further information.

Thanks.

You need to figure out where the center of that circle is on your static image and start a 1x1 rectangle there:

Dim rc As New Rectangle(CenterX, CenterY, 1, 1)

Next inflate the rectangle by the radius in pixels:

Now you can use "rc" with FillEllipse() and FillPie()...they both have overloaded methods that accept a rectangle isntead of individual parameters.

Take a look a the documentation to understand how the start and sweep angles work.

You'll just have to play with it until it looks right!  =)