Convert machine coordinate uvw
to cylindrical coordinate cyl
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(3) | :: | uvw | ||
real(kind=Float64), | intent(out), | dimension(3) | :: | cyl |
subroutine uvw_to_cyl(uvw, cyl)
!+ Convert machine coordinate `uvw` to cylindrical coordinate `cyl`
real(Float64), dimension(3), intent(in) :: uvw
real(Float64), dimension(3), intent(out) :: cyl
cyl(1) = sqrt(uvw(1)*uvw(1) + uvw(2)*uvw(2))
cyl(2) = uvw(3)
cyl(3) = atan2(uvw(2),uvw(1))
end subroutine uvw_to_cyl