polar_to_cartesian Subroutine

public pure subroutine polar_to_cartesian(theta, r, x, y, theta_offset, clockwise)

Convert single polar coordinate to Cartesian theta: angle in radians r: radius theta_offset: angular offset (default: pi/2 = 90 deg, 0 at top) clockwise: if true, angles increase clockwise

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: theta
real(kind=wp), intent(in) :: r
real(kind=wp), intent(out) :: x
real(kind=wp), intent(out) :: y
real(kind=wp), intent(in), optional :: theta_offset
logical, intent(in), optional :: clockwise