No attachments for this post
The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse.
Original Author: Found on the World Wide Web
Pass the subroutine the center X, Y of your ellipse, the degree position,
and the horizontal and vertical radii (if they are equal, you're specifying a
circle, if not, it is an elongated ellipse).
Returns the coordinates in the X and Y parameters.
Public Sub DegreesToXY(CenterX As _
Long, CenterY As Long, degree _
As Double, radiusX As Long, _
radiusY As Long, X As Long, Y _
Dim convert As Double
convert = 3.141593 / 180
'pi divided by 180
X = CenterX - (Sin(-degree * _
convert) * radiusX)
Y = CenterY - (Sin((90 + _
(degree)) * convert) * radiusY)
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.