-
Notifications
You must be signed in to change notification settings - Fork 0
Coordinates3d
Yann Büchau edited this page Aug 23, 2016
·
3 revisions
The Coordinates3d class is a class for handling 3d coordinates. It is aimed at the painless creation of and conversion between carthesian and spherical 3d coordinates.
An instance of class Coordinates3d holds various dimensions, i.e.
- x,y,z
- horizontal radius radiush, 3d radius
- azimuth,elevation
At any time, an instance of Coordinates3d tries hard to provide as much information as possible while resolving conflicts. This works as follows:
- You set some dimensions, e.g. x first and then y.
- The Coordinates3d instance finds it can calculate the horizontal radius radiush and the azimuth angle from x and y. You now have all four x, y, radiush and azimuth defined.
- Imagine then, you also know or get to know z and would like to set it. Now the Coordinates3d instance faces a conflict because it does not know, on what combination of dimensions to base further calculations, e.g. for elevation, ...