Find Point On Circle

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: .NET 4.8, Visual Studio 2022, Windows 10
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

Posted: March 20, 2023

Return to the snippets listing