Module: utilsHSphere

utilities which is used to calculate randomAngles for hypersphere.
Author:
License:
  • under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Source:

Members

(static, constant) angles

Adds a longitude, latitude and altitude property to the vertice angles array for the hypersphere.
Source:

Methods

(static) cartesianToPolar(vertice, debugopt) → {Object}

Преобразует декартовы координаты 4D (x, y, z, w) в гиперсферические.
Parameters:
Name Type Attributes Description
vertice object объект x, y, z, w декартовых координат.
debug object | boolean <optional>
debug = object Выводит на консоль сообщение об ошибке если углы вычислились не корректно.
Source:
Returns:
Объект с полярными координатами в радианах.
Type
Object

(static) polarToCartesian(angles, ropt, debugopt) → {array}

Вычисляет 4D декартовы координаты (x, y, z, w) точки на гиперсфере.
Parameters:
Name Type Attributes Default Description
angles object Объект с углами в радианах.
Properties
Name Type Description
latitude float Широта (от -π/2 до π/2).
longitude float Долгота (от -π до π).
altitude float Угол в 4-е измерение (от 0 до π).
r float <optional>
1 Радиус гиперсферы.
debug object | boolean <optional>
debug = object Выводит на консоль сообщение об ошибке если координаты вычислились не корректно.
Source:
Returns:
Массив с декартовыми координатами [x, y, z, w].
Type
array