Marker labels added to Celestia 1.5
Posted: 03.01.2008, 13:05
Celestia 1.5 now includes support for marker labels. This feature is already available for users who compile from CVS. Others should wait for the next (pre) release.
Adding label to markers allows users to display text information below the marker symbol:
This is particularly useful when information about objects, such as name, Hubble type, ..., need to be displayed whatever the distance to the observer or the magnitude. Also, invisible objects now can be labelled using a marker.
- In Celx scripting, marker labels are added as the fifth argument of the object:mark method:
or
Here's a complete example for celx scripting:
- In Cel scripting, marker labels are added using the label "xxx" field:
Adding label to markers allows users to display text information below the marker symbol:
This is particularly useful when information about objects, such as name, Hubble type, ..., need to be displayed whatever the distance to the observer or the magnitude. Also, invisible objects now can be labelled using a marker.
- In Celx scripting, marker labels are added as the fifth argument of the object:mark method:
Code: Select all
venus = celestia:find("Sol/Venus")
venus:mark("red", "circle", 10, 0.7, "Planet type: Telluric")
Code: Select all
mw = celestia:find("Milky Way")
mw:mark("red", "circle", 10, 0.7, mw:getinfo().hubbleType)
Here's a complete example for celx scripting:
Code: Select all
-- Title: Mark and label nearby galaxies with their Hubble Type
mw = celestia:find("Milky Way")
function label_galaxy_types()
for dso in celestia:dsos() do
if dso:getinfo().type == "galaxy" then
dsoPos = dso:getposition()
mwPos = mw:getposition()
if dsoPos:distanceto(mwPos) < 1e20 then
hubbleType = dso:getinfo().hubbleType
text = dso:name()..": "..hubbleType
if string.find(hubbleType, "E") then
dso:mark( "red", "disk", 7, 0.7, text )
elseif string.find(hubbleType, "Irr") then
dso:mark( "yellow", "disk", 7, 0.7, text )
elseif string.find(hubbleType, "SB") then
dso:mark( "green", "disk", 7, 0.7, text )
elseif string.find(hubbleType, "S") then
dso:mark( "blue", "disk", 7, 0.7, text )
end
end
end
end
end
celestia:unmarkall()
celestia:setrenderflags { markers = true }
label_galaxy_types()
celestia:select(mw)
celestia:getobserver():gotodistance(mw, 1e20, 10)
wait(10)
- In Cel scripting, marker labels are added using the label "xxx" field:
Code: Select all
mark { object "Sol/Mars" size 55 color [ 0 0 1 ] symbol "disk" alpha 0.7 label "Planet type: Telluric"}