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