utilities which is used to calculate randomAngles for sphere.
- Copyright:
- 2011 Data Arts Team, Google Creative Lab
- 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 and latitude property to the vertice angles array for the sphere hypersphere.
- Source:
Methods
(static) cartesianToPolar(vertice) → {Object}
Преобразует декартовы координаты (x, y, z) в географические полярные координаты
(r, latitude, longitude).
Parameters:
| Name | Type | Description |
|---|---|---|
vertice |
object | объект x, y, z декартовых координат. |
- Source:
Returns:
Объект с полярными координатами в радианах.
- Type
- Object
(static) polarToCartesian(angles, ropt) → {array}
Вычисляет декартовы координаты (x, y, z) точки на сфере,
заданной в полярной системе координат (r, широта, долгота).
Предполагается, что:
- Широта (latitude) находится в диапазоне от -π/2 (южный полюс) до π/2 (северный полюс).
- Долгота (longitude) находится в диапазоне от -π до π.
- Углы заданы в радианах.
Parameters:
| Name | Type | Attributes | Default | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
angles |
object | Объект с углами.
Properties
|
|||||||||||
r |
float |
<optional> |
1 | Радиус сферы. |
- Source:
Returns:
Массив с декартовыми координатами [x, y, z].
- Type
- array