# Template Class spherical_dots

- Defined in File point.hpp

## Class Documentation

template<int N>
class spherical_dots

  Helper class to generate evenly divided points on a sphere.

  We use a fibonacci sphere to calculate even distribution of the dots

  Template Parameters:

    N – The number of points on the sphere is 2 * N + 1

  Public Types

  using array_type = typename std::array<point, P>

    the internal storage type

  using iterator = typename array_type::const_iterator

    iterator type

  Public Functions

  inline std::size_t size() const

    The number of points.

  inline const point operator[](uint32_t inIx) const

    Access a point by index.

  inline iterator begin() const

    iterator pointing to the first point

  inline iterator end() const

    iterator pointing past the last point

  inline double weight() const

    return the weight,

  inline spherical_dots()

  Public Static Functions

  static inline spherical_dots &instance()

    singleton instance

  Public Static Attributes

  static constexpr int P = 2 * N * 1

    the number of points

  static constexpr double W = (4 * kPI) / P

    the weight of the fibonacci sphere