# DegreesToXYsubroutine

Email
 Submitted on: 1/1/2015 4:07:00 AM By: Found on the World Wide Web (from psc cd) Level: Not Given User Rating: By 5 Users Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0 Views: 453

The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse.

code:
Can't Copy and Paste this?
 ``` '************************************** ' Name: DegreesToXYsubroutine ' Description:The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse. ' By: Found on the World Wide Web (from psc cd) ' ' Inputs: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: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 _ As Long) 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) End Sub```

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)