// Scene file for mapping an astronomical image defined // in galactic coordinates onto the celestial sphere for // an observer on Earth at a given time at location. // // Copyright (C) 2009 by Christian Froeschlin, www.chrfr.de // // Version 1.0 // // ESO image http://www.gigagalaxyzoom.org/B.html created by // Serge Brunier, brought to my attention by a post from "waggy". // Reuses code from Ingo Janssen's SunPos macro. The online tool // http://violet.pha.jhu.edu/cgi-bin/eqtogal_tool was used to // obtain coordinates for vernal point and equatorial north // pole in galactic coordinates. // // Issues: 1. Precession not taken into account // 2. The celestial equator in constellations.jpg // did not align perfectly with the horizon after // converting to equatorial coordinates, differing // about 2 degrees. Not sure why. global_settings { assumed_gamma 1.0 } // Configure observer time & location #declare LONG = 15; #declare LAT = 50; #declare YEAR = 2000; #declare MONTH = 03; #declare DAY = 20; #declare HOUR = 06; #declare MIN = 00; // Configure viewing direction camera { location <0,0,0> //look_at z // North look_at x // Due East //look_at y // Up angle 90 } // Configure galaxy if godlike powers available, otherwise don't modify // Vernal point and equatorial north pole in galactic coordinates. // The values actually depend on precession but should be sufficiently // precise for visualization purposes between 1500 and 2500 AD. #declare L_VERNAL = 96.34; #declare B_VERNAL = -60.19; #declare L_POLE = 302.93; #declare B_POLE = -27.13; // The code to calculate sidereal time from local time for a given location // was already available in the SunPos macro. Here we basically define a direct // copy of that macro with a different return value. #macro HourAngle(Year, Month, Day, Hour, Minute, Lstm, LAT, LONG) // Calculate universal time (UT) #local T= Hour+(Minute/60); #local UT= T-Lstm/15; #if (0>UT) #local Day= Day-1; #local UT= 24+UT; #end #if (UT>24) #local Day= Day+1; #local UT= UT-24; #end // Amount of days to, or from, the year 2000 #local d= 367*Year-int((7*int((Year+int((Month+9))/12)))/4)+int((275*Month)/9)+Day-730530+UT/24; // Longitude of perihelion (w), eccentricity (e) #local w= 282.9404+4.70935E-5*d; #local e= 0.016709-1.151E-9*d; // Mean anomaly (M), sun's mean longitude (L) #local M= 356.0470+0.9856002585*d; #if (0} finish {ambient 0.3}}