Lua Edu Tools beta version

Discuss Celestia's features, adaptations and Addons for use in educational environments
Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 11 months
Location: Hamburg, Germany

Post #161by t00fri » 04.06.2007, 18:49

Vincent wrote:Can you confirm that the minimal FoV is 3.2" ? I can only reach a field of 3.6". Then, I get the same bug as reported in another thread...


Indeed, more recently, it has changed into 3.6". Under Linux-KDE I actually do not succeed to get the funny small FoV display error, despite trying hard.

Bye Fridger
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #162by Vincent » 04.06.2007, 19:20

t00fri wrote:Indeed, more recently, it has changed into 3.6".
OK, thanks Fridger. As you suggested, I've normalized the zoom_amplitude max value (= 100) to a minimal FoV of 3.6". Of course, the slider is still way too short for a smooth zooming, but at least the current version allows a full-range of FoV.

t00fri wrote:Under Linux-KDE I actually do not succeed to get the funny small FoV display error, despite trying hard.

Well, I'm not able to reproduce it myself each time I run Celestia. What is strange is that it often happens when AutoMag is On. Then, after I get this bug, the autoMag value is also displayed strangely. I have to set AutoMag to Off to stop the AutoMag bug. I'm not sure, but the 2 bugs (FoV/AutoMag) may be in connection. Just a clue...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 21 years 1 month
Location: Montreal

Post #163by Cham » 04.06.2007, 20:36

Vincent wrote:
Cham wrote:Is there a way to use the pictures without the text info ?
Of course, just edit the 'info/infoText.lua' file, or the 'locale/infoText_fr.lua' file if you run the french version. If you want to disable the whole infoText, just rename the infotext.lua file into infoText.lua.no.


Well, it doesn't work. If I add the .no extension to the French infoText file, I get the English info+ text. If I put a .no extension to the English file, I'm getting a "fatal error" message after I launch Celestia.

I just want to use the pictures, but no text (info+) at all.
"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!"

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #164by Vincent » 04.06.2007, 20:45

Cham wrote:Well, it doesn't work. If I add the .no extension to the French infoText file, I get the English info+ text. If I put a .no extension to the English file, I'm getting a "fatal error" message after I launch Celestia.

Yes, you're right. Then, you just have to delete all the content of both infoText.lua and infoText_fr.lua. In both files, just keep:

Code: Select all

infoText =
{
}


That should work. Then, I'll change the code to make the Lua Tools work even if no infoText file is found.
Last edited by Vincent on 04.06.2007, 20:52, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 21 years 1 month
Location: Montreal

Post #165by Cham » 04.06.2007, 20:49

Vincent,

just a small aesthetical suggestion :

Image

The "+" isn't well drawn : it looks ugly.

The check "x" isn't well centered in the box. I suggest to use a full "X" without any space left on the corners.
"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!"

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #166by Vincent » 05.06.2007, 10:36

Cham wrote:The "+" isn't well drawn : it looks ugly.

The check "x" isn't well centered in the box. I suggest to use a full "X" without any space left on the corners.

Martin,

I get the same problem with the "+". However, I'm afraid we can't do
anything there since the problem comes from the font sans12.txf itself.
You get a similar problem when you display a "+" with the print command
in a cel/celx script (with sansbold20.txf as the TitleFont).

As for the check box text problem, I never saw it before, though I've
tested the Lua Tools on many different systems:
Image

I think it may come from the round function I've used to center the text in
the check box. I'll send you a fix to test by email.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #167by t00fri » 05.06.2007, 11:30

Vincent,

then use different fonts. I make my own, since a long time. Christophe T. used to collect the required tools on his site.

Bye Fridger
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #168by Vincent » 05.06.2007, 14:11

t00fri wrote:Vincent,

then use different fonts. I make my own, since a long time. Christophe T. used to collect the required tools on his site.

Bye Fridger

H?© h?©, so do I. :wink:
I made a while ago my own set of fonts with Christophe's great Font Texture Generator.
However, I don't think it would be an easy thing to distribute these fonts within the Lua Tools package and to ask users to configure the celestia.cfg file to use them.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #169by Vincent » 08.06.2007, 16:40

Chris,

I've been working on adding a Scale Visualization Square to the Tools.
As a test, I'm currently trying to draw a square that has exactly the same size as the current selection.
Here's the Lua code I'm using:

Code: Select all

drawScaleSquare = function(a)
   width, height = celestia:getscreendimension();
   centerX, centerY = width/2, height/2;
   gl.Color(0, 1, 0, 1);
   gl.Disable(gl.TEXTURE_2D);
   gl.Begin(gl.LINE_LOOP);
   gl.Vertex(centerX-a, centerY-a);
   gl.Vertex(centerX-a, centerY+a);
   gl.Vertex(centerX+a, centerY+a);
   gl.Vertex(centerX+a, centerY-a);
   gl.End();
end;

local obs = celestia:getobserver();
local fov = obs:getfov();
local pix_size = 2 * math.tan(fov/2) / height

local sel = celestia:getselection();
local sel_rad = sel:radius();
local dist_to_sel = celutil.get_dist(obs, sel);
local dist_to_sel_surf = dist_to_sel - sel_rad;
local sel_size_pix = sel_rad/(dist_to_sel_surf*pix_size);

drawScaleSquare(sel_size_pix);


The square is correctly resized according to the distance to the current selection and according to the FoV.
However, its size does not exactly correspond to the size of the selected object:
Image

I don't know why I get this difference in size since this code is based on the one used in render.cpp
to calculate the size of a disc in pixel...
Please, would you have a clue about what's happening here ?
Last edited by Vincent on 09.06.2007, 13:03, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #170by Vincent » 09.06.2007, 12:50

In order to go further in the testing phase of the Scale Visualization Squares,
I've fixed empirically the problem of distance accuracy I pointed out in my previous post.
A real fix will of course have to be found as soon as possible...

Here's a serie of screen captures showing different scale squares:

Image Image Image

Image Image

*********************************************************
Then, if you're interested in testing the Scale Visualization Squares "live" within Celestia,
you can download the updated Lua Edu Tools package from the link in my signature.
You can use the scale squares in association with the following script that will take you
from a view of the Earth to a view of galaxies at large scale:
http://vincent.gian.club.fr/celestia/fr ... axies.celx
*********************************************************
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #171by t00fri » 09.06.2007, 13:39

Vincent,

does this mean you can draw those squares with the mouse as big as you want and then the size is added in meters?
This would certainly be the preferrable solution.


Or are you using a set of fixed size squares?

Bye Fridger
Image

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 20 years 1 month

Post #172by ElChristou » 09.06.2007, 18:03

t00fri wrote:Vincent,

does this mean you can draw those squares with the mouse as big as you want and then the size is added in meters?
This would certainly be the preferrable solution.


Or are you using a set of fixed size squares?

Bye Fridger


Fixed size...

Vince, this is not bad; I'm wondering about using circles instead of square... I change the default color in the Lua config to yellow (0,5 0,5 0 0,9) because the actual default blue is too similar to the rest of the UI; you should perhaps think in changing the default color...
Image

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #173by Vincent » 09.06.2007, 20:26

t00fri wrote:does this mean you can draw those squares with the mouse as big as you want and then the size is added in meters?
Not yet Fridger, not yet... :wink:

t00fri wrote:Or are you using a set of fixed size squares?
Yes, that's it. Each square corresponds to a power of ten meters.

ElChristou wrote:I'm wondering about using circles instead of square...
I really prefer squares. Moreover, squares are more frequently used than circles in this kind of representation. However, I could add an entry in the config file to switch between squares and circles. Just let me know if you think that it is worth doing this.

ElChristou wrote:I change the default color in the Lua config to yellow (0,5 0,5 0 0,9) because the actual default blue is too similar to the rest of the UI; you should perhaps think in changing the default color...

I've changed the default color to dark yellow.

*************************************************************
I've also modified the FOV slider.
Fridger, you should test it, I think you'll like it very much :wink:.
The zooming is now very smooth and precise.
The zooming speed can also be set in the config file.
*************************************************************
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

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

Post #174by t00fri » 09.06.2007, 20:35

Vincent wrote:*************************************************************
I've also modified the FOV slider.
Fridger, you should test it, I think you'll like it very much :wink:.
The zooming is now very smooth and precise.
The zooming speed can also be set in the config file.
*************************************************************


Yes, Vincent,

the FoV slider is quite a bit improved and runs properly to 4". Also I do prefer your measuring rectangles over circles.

Bye Fridger
Image

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 19 years
Location: Skepplanda, Sweden

Post #175by tech2000 » 09.06.2007, 20:52

Vincent wrote:I've also modified the FOV slider.


Vincent: The new FOV slider have some problems on my XP installation. As soon as I 'grab' the slider with the mouse, it starts to 'zoom' into earth. I have no control what so ever with the new slider...

The FOV raises until it reaches ridiculus numbers..

FOV: 0 00' 04" (28753,6)

Anyone else who experience this problem?

Cheers, Anders

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

Post #176by t00fri » 09.06.2007, 20:55

tech2000 wrote:
Vincent wrote:I've also modified the FOV slider.

Vincent: The new FOV slider have some problems on my XP installation. As soon as I 'grab' the slider with the mouse, it starts to 'zoom' into earth. I have no control what so ever with the new slider...

The FOV raises until it reaches ridiculus numbers..

FOV: 0 00' 04" (28753,6)

Anyone else who experience this problem?

Cheers, Anders


Anders,

are you sure that you did not start at the same time Vincent's test .celx script??

Actually that minimal FoV is not at all ridiculous. It's just 4 arc seconds, corresponding to the present minimal FoV in Celestia.

Bye Fridger
Image

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 19 years
Location: Skepplanda, Sweden

Post #177by tech2000 » 09.06.2007, 21:08

t00fri wrote:
tech2000 wrote:
Vincent wrote:I've also modified the FOV slider.

Vincent: The new FOV slider have some problems on my XP installation. As soon as I 'grab' the slider with the mouse, it starts to 'zoom' into earth. I have no control what so ever with the new slider...

The FOV raises until it reaches ridiculus numbers..

FOV: 0 00' 04" (28753,6)

Anyone else who experience this problem?

Cheers, Anders

Anders,

are you sure that you did not start at the same time Vincent's test .celx script??

Actually that minimal FoV is not at all ridiculous. It's just 4 arc seconds, corresponding to the present minimal FoV in Celestia.

Bye Fridger


No, I haven't started any script at all. All I did was this: I just started Celestia and wait until Celestia has finished and settled with the earth in the center of the screen. I then press and hold the slider in the FOV. As soon as I press the mouse button, without moving the mouse, the FOV will in a few seconds be changed to 4 arc seconds. The nice part is that it does it smothly...

The ridiculous part is that I have no control whatsoever.. It's over in a few seconds.. :(

Bye, Anders

Topic author
Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 20 years 2 months
Location: Nancy, France

Post #178by Vincent » 09.06.2007, 21:47

tech2000 wrote:As soon as I press the mouse button, without moving the mouse, the FOV will in a few seconds be changed to 4 arc seconds. The nice part is that it does it smothly...

Anders,

This sounds like describing the correct behaviour of the new FOV slider, except that the zooming should only start when the slider is moved.
The position of the slider now corresponds to the zooming speed, instead of the zoom value as previously.
With the slider up to the right hand, you should get from about 26?° (1x) down to 4" in nearly 15 seconds (with zoom_speed set to 5 in the config file). Is this what you get on your system ?
You can also try to decrease the value of zoom_speed down to 1 to see what happens...
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 19 years
Location: Skepplanda, Sweden

Post #179by tech2000 » 10.06.2007, 02:48

Vincent wrote:
tech2000 wrote:As soon as I press the mouse button, without moving the mouse, the FOV will in a few seconds be changed to 4 arc seconds. The nice part is that it does it smothly...
Anders,

This sounds like describing the correct behaviour of the new FOV slider, except that the zooming should only start when the slider is moved.
The position of the slider now corresponds to the zooming speed, instead of the zoom value as previously.
With the slider up to the right hand, you should get from about 26?° (1x) down to 4" in nearly 15 seconds (with zoom_speed set to 5 in the config file). Is this what you get on your system ?
You can also try to decrease the value of zoom_speed down to 1 to see what happens...


Puta que soy weon.. :twisted:

I had wrote a long description of the problem and lost it.. :cry:

Well, I'm fully aware of how it should work... But it doesn't work like it should on my system. As soon as I grab the slider the FOV rushes of in the same speed as always, even with zoom_speed = 1

Bye, Anders

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 19 years
Location: Skepplanda, Sweden

Post #180by tech2000 » 11.06.2007, 13:28

I did install Windows Vista in a third hdd this night and the strange thing is that the FOV slider actually works in Vista. But not perfect, the center of the slider isn't really centred. It's misplaced way to the left, but I can finally control the slider.

Regards, Anders


Return to “Celestia in Education”