Display planets in magnified size.

All about writing scripts for Celestia in Lua and the .cel system
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #21by ANDREA » 09.07.2007, 12:41

ANDREA wrote:
Cham wrote:Andrea, I'm aware of the glare problem with a large Sun. That's why I didn't made it this way in this addon.
Cham, I used a different approach to solve the glare problem, and I solved it, or at least in a way that's satisfactory for me.
I just modified with PhotoShop the flare.jpg image, making it black. Andrea :D

Cham, if you agree I would like to open a new thread in the "Addon" Forum, named "Solar System Planets Comparison", where I would put the link for the addon I modified from your one, obviously giving you credits. :wink:
Is this OK for you?
Please inform me.
Thank you.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #22by ElChristou » 09.07.2007, 12:57

ANDREA wrote:Cham, if you agree I would like to open a new thread in the "Addon" Forum, named "Solar System Planets Comparison"...


Why not all this stuff is not in "Education"? ok it's an addon but the purpose is clear enough to keep it in it's specific forum, no?

I'm wonder how to integrate this in the Edu tool; next to classical UI elements, we should think in a way to separate visually this kind of options... Perhaps a different color of font for the "extensions"? (compass, distance guide, info, magnified bodies, DSO survey etc...)
Image

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #23by ANDREA » 09.07.2007, 13:09

ElChristou wrote:
ANDREA wrote:Cham, if you agree I would like to open a new thread in the "Addon" Forum, named "Solar System Planets Comparison"...
Why not all this stuff is not in "Education"? ok it's an addon but the purpose is clear enough to keep it in it's specific forum, no?

Chris, from my point of view I absolutely agree. :wink:
Cham?
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #24by Cham » 09.07.2007, 17:19

Andrea,

no problem. Open the new topic if you want. :wink:
"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!"

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #25by ANDREA » 09.07.2007, 17:25

Cham wrote:Andrea, no problem. Open the new topic if you want. :wink:

Thank you Cham, appreciated! :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

ncc1701d
Posts: 29
Joined: 21.01.2006
With us: 18 years 10 months

Re: Display planets in magnified size.

Post #26by ncc1701d » 16.04.2008, 03:49

Vincent....does the celestia_1.5CVS.exe still exist for download.
I was interested in using the magnified size mode.
I read the other posts but I was still interested in it.
I would only use it for inner planets so odd scaling of saturns moons doesnt matter if I am understanding any issues with it.
Can someone let me know status of this magnifiying option? or if there are some alternatives to accomplish it?
thanks
steve

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

Re: Display planets in magnified size.

Post #27by Vincent » 16.04.2008, 08:59

ncc1701d wrote:Vincent....does the celestia_1.5CVS.exe still exist for download.
I was interested in using the magnified size mode.
I read the other posts but I was still interested in it.
I would only use it for inner planets so odd scaling of saturns moons doesnt matter if I am understanding any issues with it.
Can someone let me know status of this magnifiying option? or if there are some alternatives to accomplish it?
thanks
steve
Steve,

The magnification option need Celestia 1.5 or later. You can download Celestia 1.5.1 from:
http://www.celestiaproject.net/~claurel/celest ... 5.1rc3.exe
I've edited my first post with this updated information. I've also added the whole script.

Then, here's a modified version of the script that lets you choose objects the magnification will be applied on.
Just edit the objpath_list to your specific needs.

Code: Select all

-- Map the toggleObjectSize function to the [D] key.
-- (Toggle the size of a list of objects between Real and Magnified Modes)

----------------------------------------------------------------------------------------------
-- Modify the following line to add/remove objects to be magnified.
----------------------------------------------------------------------------------------------
objpath_list = {"Sol/Mercury", "Sol/Venus", "Sol/Earth", "Sol/Mars"}

mag_coeff = 2e3

function toggleObjectSize()
   magnification = not(magnification)
   for k, objpath in pairs(objpath_list) do
     obj = celestia:find(objpath)
      if magnification then
         obj:setradius(obj:radius() * mag_coeff)
         celestia:print("Magnification enabled", 2, -1, -1, 1, 5)
      else
         obj:setradius(obj:radius() / mag_coeff)
         celestia:print("Magnification disabled", 2, -1, -1, 1, 5)
      end
   end
end

keyhandlers =
{
   d = toggleObjectSize,
}

function handlekey(k)
    handler = keyhandlers[k.char]
    if (handler ~= nil) then
        handler()
        return true
    else
        return false
    end
end

celestia:registereventhandler("key", handlekey)
@+
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

ncc1701d
Posts: 29
Joined: 21.01.2006
With us: 18 years 10 months

Re: Display planets in magnified size.

Post #28by ncc1701d » 16.04.2008, 22:13

thanks Vincent
all works ok.
steve


Return to “Scripting”