In Lua-Celx programming:
Is a 'position' object the same class as a 'vector' ???
Do the same methods apply to both of them?
If not, WHAT is exactly a Position object?
Thanks
Celx: difference between Position and Vector objects?
-
Topic authorRjp buisson
- Posts: 31
- Joined: 18.03.2002
- With us: 22 years 8 months
- Location: Paris France
Re: Celx: difference between Position and Vector objects?
Rjp buisson wrote:In Lua-Celx programming:
Is a 'position' object the same class as a 'vector' ???
Do the same methods apply to both of them?
If not, WHAT is exactly a Position object?
Today must be the record for the number of CELX-related questions
Position and Vector are similar, but not the same. Both contain three components, but with different precision - a Position contains three 128-Bit numbers, which is enough to cover the universe up to ~1e19 ly (?) away from our Sun with uniformly high precision. A vector is made of three double-precision floating point numbers, which makes the precision suffer for very long vectors.
You should think of a vector as pointing from one position to another (e.g. if you compute the difference between two positions in CELX, the result will be a vector). However sometimes it makes sense to (mis)use one for the other.
Harald
Re: Celx: difference between Position and Vector objects?
Harry wrote:Today must be the record for the number of CELX-related questions
We just didn't want you to feel left out Harald.
-Don G.
My Celestia Scripting Resources page
Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.
My Celestia Scripting Resources page
Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.
-
Topic authorRjp buisson
- Posts: 31
- Joined: 18.03.2002
- With us: 22 years 8 months
- Location: Paris France