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 property to the vertice angles array for the circle hypersphere.
- Source:
Methods
(static) cartesianToPolar(coordinates) → {Object}
Converts Cartesian coordinates to polar coordinates, returning only the angle.
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
coordinates |
Object | The object containing Cartesian coordinates.
Properties
|
- Source:
Returns:
An object containing the angular position 'longitude' in radians.
- Type
- Object
(static) polarToCartesian(value, r) → {Array.<number>}
Converts polar coordinates of a point on a circle to Cartesian coordinates.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
value |
Object | The object containing the angular position.
Properties
|
||||||
r |
number | The radius of the circle. |
- Source:
Returns:
An array containing the Cartesian coordinates [x, y].
- Type
- Array.<number>