Find Point On Circle in VB.NET

Description: Provided a circle's origin (as a Point), radius and angle it returns the point which lies on the circumference of the circle. Great for placing items on a circle (eg clockface, pie charts etc).
Tested Platform: Visual Studio 2012, 32-bit, Windows 7
Language: VB.NET
' Find a point on a circle's circumference given the circle's origin, radius and degrees.

Private Function FindPointOnCircle(originPoint As Point, radius As Double, angleDegrees As Double) As Point
        Dim x As Double = radius * Math.Cos(Math.PI * angleDegrees / 180.0) + originPoint.X
        Dim y As Double = radius * Math.Sin(Math.PI * angleDegrees / 180.0) + originPoint.Y

        Return New Point(x, y)
End Function

Submitted: April 06, 2013

Return to the snippets listing