Orbits and Labels colors

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #241by t00fri » 24.06.2007, 14:53

ElChristou wrote:So, what to do? adding this autoLoc function juste like autMag? this will result in a check box in the GUI near the silder?


Yes,

but every one of our GUI maintainers has to do it separately for his OS. The read in values for the importance parameter MUST NOT be overwritten by the slider-related code.

Another simpler option would be to think of a key shortcut of course (which we don't have anymore)

Bye Fridger
Last edited by t00fri on 24.06.2007, 16:12, edited 1 time in total.
Image

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #242by Cham » 24.06.2007, 16:10

Yes we do have a new key : "D". The demo is supposed to be placed in the new scripts menu and that bind removed.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #243by dirkpitt » 25.06.2007, 03:26

Fridger, the slider value isn't overriding the importance weights as far as I can tell.
The slider is value is interpreted as the minimum pixel size below which labels should be culled.
For example, setting the slider to the extreme left means "show all labels >= 1.0 pixel in size",
where "size" is computed using the importance weights. The feature is working, just maybe not very smartly.

Is your "autoloc" proposal supposed to automatically adjust the minimum label cull size, depending on FOV?

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #244by t00fri » 25.06.2007, 08:51

dirkpitt wrote:Fridger, the slider value isn't overriding the importance weights as far as I can tell.
The slider is value is interpreted as the minimum pixel size below which labels should be culled.
For example, setting the slider to the extreme left means "show all labels >= 1.0 pixel in size",
where "size" is computed using the importance weights. The feature is working, just maybe not very smartly.
..

DM,

yes, I also looked into that code. Yet the slider overrules my derivation by allowing the slider to start at "size"=1. Clearly the slider code "sabotages" my whole underlying derivation ;-) .

Is your "autoloc" proposal supposed to automatically adjust the minimum label cull size, depending on FOV?


Right. That's what my original code did before the OS-maintainers introduced the GUI sliders without contemplating the basis of the derived importance weights. My code worked perfectly for all bodies. See here from exactly 3 years ago:
http://www.celestiaproject.net/forum/viewtopic ... ight+maple

Here is a non-technical summary of my theoretical derivation of the importance weights that govern the label culling:

---------------------------------------------------
We, want to derive the Importance weights I,
such that the label density on the monitor remains always constant!
---------------------------------------------------

Strategy:
=======

i) Let nLabels be the number of visible labels at distance d of our object (Mars, Venus, Moon...),
having an area

Code: Select all

Area(d) = (const/d)^2 on the screen in [pix^2].

Require that the visible label density is about constant at all distances d [FoV's] of our object, i.e

Code: Select all

nLabels/Area(d) = const * nLabels * d^2 = constant


ii) For the given monitor resolution, and a range of importance weights I, determine empirically
the distances d = d_vis(I) of our object, for which

Code: Select all

the associated labels just become visible.

It is a linear relation as expected

Code: Select all

  d_vis = 14.8 +86.9*I  [km]

Thus the requirement of a constant label density turns into a formula for the importance weights I as follows:

Code: Select all

 I = const/sqrt(nLabels)  - 14.8 /86.9


iii) On Earth I calculated nLabels = nLabels(population) from the known data on city populations. For Moon, Mars, Venus,...we take instead the number-distribution of the location sizes.

For the Moon, we obtained approximately a Breit Wigner distribution

Code: Select all

  nLabels = Normal(log10(size))

around an average location size of s0 = 50.46 km.
Image

iv) We feed this distribution in and determine the only unknown constant by requiring a convenient number of visible labels at a certain distance of the object. E.g. for 10/hemisphere at a distance of 40000 km.

In the following image the resulting importance weights as function of the location sizes are displayed for three choices of that constant.
Image

+++++++++++++++++++++++++++++++++++
In all cases the minimal importance weight must NEVER become 1
+++++++++++++++++++++++++++++++++++

Whoever has coded that GUI slider has never looked at my derivation that is published here e.g. for the Moon

http://www.celestiaproject.net/~t00fri/Moon.html


After the slider has been implemented, I have not looked into this anymore, assuming that it does not break my original code.

The slider should be coded to allow for a number of visible labels at a reference distance of say 40000 KM. That number should however be restricted between 1 and 20, say. The respective formulae are all in my above Maple derivation.

This crucial AUTOLOC parameter is the perfect analog of the parameter "Automag Limit at 45 degrees" that one adjusts with the '[' and ']' keys if AUTOMAG=ON.

Cheers,
Fridger
Image


Return to “Development”