Galaxy colors etc.
Posted: 14.06.2005, 22:14
Hi all,
my Steinicke precision NGC|IC catalog now includes lots of additional "goodies", like several optimized, advanced distance determinations etc (SBF, redshift...). There are 10600+ galaxies with accurate J2000 parameters (!) in the file! All orientations work beautifully! I have tested very many indeed directly against DSS photos. Note, two more additional galaxy templates: S0 and SBb are required!
A great feature of the present galaxy catalog is it's uniform galaxy distribution wrto North and South hemispheres!
That's how it looks:
also all J2000 positions have been directly fitted to the DSS RealSky photographs!
The rest of my transscribed revised RC3 catalog has another 15000+ entries , but Steinicke's NGC|IC catalog should be good enough for a start. The most messy task in my Perl script was actually to translate the extended galaxy type syntax with its many exceptions and additions to the simple Hubble classification we are using in galaxy.cpp!
We indeed have to work hard on new culling techniques. : The NGC|IC catalog reduced my rates from
>95 fps to ~25 fps. The rest of the RC catalog gets the performance down to < 10 fps!
A typical entry in my new deepsky.dsc file looks like this
+ 10600+ further galaxies
Each entry has also an infoURL line such that a single mouse click loads the corresponding DSS RealSky photo!
For testing purposes you'll notice quite a few additional /commented out/ parameters displayed in my galaxy entries...
+++++++++++++++++
As soon as Chris reports back to me with his new shader code etc., I shall do eventual final adaptations of my data to his code and then RELEASE it for further testing.
+++++++++++++++++
As to galaxy.cpp, I also did some work about galaxy colors there: I implemented a routine that takes H,S,V color parametrizations as input and outputs the corresponding R,G,B values (between 0 and 1). The Hue is in degrees (0<H<360) while S and V are between 0 and 1.
MAC OS fans, find the Galaxy::hsv2rgb() method at the end of my post for eventual implementation into galaxy.cpp.
It's application in galaxy.cpp is about like so in the method 'InitializeForms()'
Its very easy to model galaxy colors this way from catalog entries, due to the great advantages of the HSV parametrization over RGB in our case!
Fix V from the catalog's Vmag, make the color saturation S (universally!) proportional to the observer's distance from the galaxy and take e.g. two (smeared) values for the Hue in the core and the outer regime (see example!) . The above simple parametrization gives e.g. for M 91 THIS:
Bye Fridger
my Steinicke precision NGC|IC catalog now includes lots of additional "goodies", like several optimized, advanced distance determinations etc (SBF, redshift...). There are 10600+ galaxies with accurate J2000 parameters (!) in the file! All orientations work beautifully! I have tested very many indeed directly against DSS photos. Note, two more additional galaxy templates: S0 and SBb are required!
A great feature of the present galaxy catalog is it's uniform galaxy distribution wrto North and South hemispheres!
That's how it looks:
also all J2000 positions have been directly fitted to the DSS RealSky photographs!
The rest of my transscribed revised RC3 catalog has another 15000+ entries , but Steinicke's NGC|IC catalog should be good enough for a start. The most messy task in my Perl script was actually to translate the extended galaxy type syntax with its many exceptions and additions to the simple Hubble classification we are using in galaxy.cpp!
We indeed have to work hard on new culling techniques. : The NGC|IC catalog reduced my rates from
>95 fps to ~25 fps. The rest of the RC catalog gets the performance down to < 10 fps!
A typical entry in my new deepsky.dsc file looks like this
Code: Select all
# Revised NGC and IC Catalog, Wolfgang Steinicke, April 5, 2005
# http://www.ngcic.org/steinicke/default.htm
# augmented by
# Revised 3rd Reference Catalog of Bright Galaxies (RC3,VII/155)
# http://cdsweb.u-strasbg.fr/viz-bin/Cat?VII/155
# augmented by
# The SBF Survey of Galaxy Distances. IV.
# SBF Magnitudes, Colors, and Distances,
# J.L. Tonry et al., Astrophys J 546, 681 (2001)
#
# Today's Hubble constant = 72 [km/sec/Mpc] (WMAP 2005)
# Adapted for Celestia with Perl extraction script: gal2dsc.pl Revision: 1.00
# Processed 2005-6-12 0 162 0 15:51:24 UTC
# by Dr. Fridger Schrempp, fridger.schrempp@desy.de
# ------------------------------------------------------
# NGC 1 / UGC 57 / MCG 4-1-25 / ZWG 477.54
Galaxy "NGC 1"
{
#
# D = 1.70' d = 1.20' Position Angle = 120.00 deg's
# Inclination = 49.30 deg's V_mag = 12.80 B_mag = 13.60
# Distance from Hubble law using: v_rad_CMB = 4218.00 km/sec
#
Type "Sb"
InfoURL "http://simbad.u-strasbg.fr/sim-id.pl?Ident=NGC 1"
RA 0.1208
Dec 27.7089
Distance 1.911e+08
Radius 4.725e+04
Axis [ 0.0781 0.9082 -0.4112]
Angle 197.1490
}
...
+ 10600+ further galaxies
Each entry has also an infoURL line such that a single mouse click loads the corresponding DSS RealSky photo!
For testing purposes you'll notice quite a few additional /commented out/ parameters displayed in my galaxy entries...
+++++++++++++++++
As soon as Chris reports back to me with his new shader code etc., I shall do eventual final adaptations of my data to his code and then RELEASE it for further testing.
+++++++++++++++++
As to galaxy.cpp, I also did some work about galaxy colors there: I implemented a routine that takes H,S,V color parametrizations as input and outputs the corresponding R,G,B values (between 0 and 1). The Hue is in degrees (0<H<360) while S and V are between 0 and 1.
MAC OS fans, find the Galaxy::hsv2rgb() method at the end of my post for eventual implementation into galaxy.cpp.
It's application in galaxy.cpp is about like so in the method 'InitializeForms()'
Code: Select all
{
// build color table:
for (unsigned int i = 0; i < 256; ++i)
{
float rr, gg, bb;
float h = i<80+10*Mathf::sfrand()?17.0f:243.0f;
Galaxy::hsv2rgb( &rr, &gg, &bb, h, 0.14f, 0.91f ); <===========
colorTable[i] = Color( rr,gg,bb);
}
Its very easy to model galaxy colors this way from catalog entries, due to the great advantages of the HSV parametrization over RGB in our case!
Fix V from the catalog's Vmag, make the color saturation S (universally!) proportional to the observer's distance from the galaxy and take e.g. two (smeared) values for the Hue in the core and the outer regime (see example!) . The above simple parametrization gives e.g. for M 91 THIS:
Bye Fridger
Code: Select all
-----------------------------
void Galaxy::hsv2rgb( float *r, float *g, float *b, float h, float s, float v )
{
// r,g,b values are from 0 to 1
// h = [0,360], s = [0,1], v = [0,1]
int i;
float f, p, q, t;
if( s == 0 ) {
// achromatic (grey)
*r = *g = *b = v;
return;
}
h /= 60; // sector 0 to 5
i = floor( h );
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
switch( i ) {
case 0:
*r = v;
*g = t;
*b = p;
break;
case 1:
*r = q;
*g = v;
*b = p;
break;
case 2:
*r = p;
*g = v;
*b = t;
break;
case 3:
*r = p;
*g = q;
*b = v;
break;
case 4:
*r = t;
*g = p;
*b = v;
break;
default:
*r = v;
*g = p;
*b = q;
break;
}
}