Planet v0.1.1 GEOF.Planet.Sphere

Functions for working with a Planet’s Sphere.

Link to this section Summary

Types

divisions is a the number of times to divide each edge of the icosohedron that subdivides the Sphere’s surface

Function called during iteration over all Fields of a Sphere

Function called during SXY component iteration

Functions

Iterates through each Field of the Sphere

Iterates through each column at X of a Sphere’s section

Iterates through each row at Y of a Sphere’s section

Iterates through each section of the Sphere

Link to this section Types

Link to this type divisions()
divisions() :: pos_integer()

divisions is a the number of times to divide each edge of the icosohedron that subdivides the Sphere’s surface.

It’s essentially the Sphere’s resolution. The number of Fields on the surface of a Sphere is equal to 10 * divisions * divisions + 2.

Link to this type field_reducer()
field_reducer() :: (any(), GEOF.Planet.Field.index() -> any())

Function called during iteration over all Fields of a Sphere

Link to this type sxy_reducer()
sxy_reducer() :: (any(), integer() -> any())

Function called during SXY component iteration

Link to this section Functions

Link to this function for_all_fields(acc, divisions, fun)
for_all_fields(any(), divisions(), field_reducer()) :: any()

Iterates through each Field of the Sphere.

Link to this function for_columns(acc, divisions, fun)
for_columns(any(), divisions(), sxy_reducer()) :: any()

Iterates through each column at X of a Sphere’s section.

Link to this function for_rows(acc, divisions, fun)
for_rows(any(), divisions(), sxy_reducer()) :: any()

Iterates through each row at Y of a Sphere’s section.

Link to this function for_sections(acc, fun)
for_sections(any(), sxy_reducer()) :: any()

Iterates through each section of the Sphere.