views:

689

answers:

2

Hi, In a silverlight 3 project I have to draw an arc programatically and I have radius of circle and inner angle of the arc. Could you please direct me to some related articles.

Thanks in anticipation!

Haris

+2  A: 

You're going to want to look at Paths in silverlight and specifically at the ArcSegments section.

ArcSegment Documentation

MSDN Path Geometry Samples

Graeme Bradbury
+1  A: 

This seems to be a good article on building arcs dynamically http://codingbandit.com/Blog/blog/dynamically-creating-path-data-in-silverlight-2/

To calculate the points the following formula is used.

x = a + r * cos(θ) y = b + r * sin(θ)

* r is the radius of the circle
* (a,b) is the center of the circle
* (x,y) is the point on the circumference
* θ is the angle in degrees
* radian = degree * π/180

you have the radius of the circle r and also the angle θ. That should build up the point series.

zapping