POV-Ray : Newsgroups : povray.binaries.scene-files : StarMap.inc Server Time
23 Nov 2024 16:47:33 EST (-0500)
  StarMap.inc (Message 1 to 1 of 1)  
From: Rarius
Subject: StarMap.inc
Date: 7 May 2009 06:56:38
Message: <4a02be66@news.povray.org>
Here is my starmap include file created from the Bright Star Catalogue.

The INC file is a list of calls to a previously defined macro. If you don't 
define the macro before including the INC file, it will define a default 
one. I use the following code:

//Define controlling params... Limiting magnitude and rotation in RA and 
Dec.
    #declare LimMag = 6;
    #declare fDec=15;
    #declare fRA=75;

//Define macro
    #macro StarMapStar(vPosition, fMag)
        #if (fMag < LimMag)
            #local vPos = vrotate(vPosition, <0, -fDec, -fRA>);    //Rotate 
stars
            #local c = ((LimMag+1)-fMag)/(LimMag+1); 
//Calculate colour
            #if (vPos.x >.8) 
//Only show stars infront of camera
                sphere
                {
                    vPos * 10000, 16
                    texture{pigment{colour rgb<c, c ,c>} finish{ambient 1 
diffuse 0}}
                }
            #end
        #end
    #end

//Include file
    #include "starmap.inc"

I offer this file in the spirit of POVRay. You may use it as you wish for 
any purpose (scenes, collections, basis of your own include, etc) as long as 
you don't claim ownership or copyright of the include file itself.

Rarius


Post a reply to this message


Attachments:
Download 'starmap.inc.txt' (450 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.