Routines to convert from various coordinate systems to RC. Angles are expected in degrees and are converted to radians. Either two or three coordinates may be specified, as either an array, a list, or an array reference.
The following four calls return the same answer.
use CmUtils::CoordSys qw/Prolate_To_RC/; $focus = 1;
@rc = Prolate_To_RC($focus,5,30,90);
@pcoord = (5, 30, 90); @rc = Prolate_To_RC($focus,@pcoord);
$pref = \@pcoord; @rc = Prolate_To_RC($focus,$pref);
$pref = [5, 30, 90]; @rc = Prolate_To_RC($focus,$pref);
The wrapper routines each call the base routine Convert_To_RC(). The
Math::Trig
module must be available.
Conversion to other coordinate systems (not just rc).
1.01 (28 February 2001)
Called as
@RCpt = Convert_To_RC($CoordSys, $Focus, @Coords);
CoordSys = 1 for rectangular cartesian coordinates 2 for cylindrical polar coordinates 3 for spherical polar coordinates 4 for prolate spheriodal coordinates 5 for oblate spheroidal coordinates
Note that angles are expected in degrees and are converted to radians. Either two or three coordinates may be specified, as either an array, a list, or an array reference.
@RCpt = Cylindrical_To_RC(@pt);
@RCpt = Spherical_To_RC(@pt);
@RCpt = Prolate_To_RC($focus,@pt);
@RCpt = Oblate_To_RC($focus,@pt);