Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.446 polartossfc

polartossfc(coords [, level])

Converts polar coordinates to SSFCs (Sierpiński Surface-Filling Coordinates). An ssfc (http://ssfc.quae.nl) indicates a position on the surface of a sphere with just one coordinate rather than with the usual two coordinates.

The coords must contain at least two elements in its first dimension, which are taken to be the latitude and longitude of the point, measured in radians. (Multiply by #deg to convert from degrees to radians; #deg.)

If level is specified, then the returned value for each point is the ssfc index at the indicated level. The ssfc index ranges between 0 and 2^level - 1. The corresponding real number is obtained by dividing the ssfc index by 2^level. Each next element of level is used for each next data point from coords. If level runs out of elements before coords runs out of points, then the last element of level is reused for the remaining points.

If level is not specified, then the returned value for each point is the decimal ssfc index represented as a double number between 0 and 1, to the highest precision that can be expressed by a double.

See also: ssfctopolar