POV-Ray : Newsgroups : povray.object-collection : The Bright Star Catalogue Server Time
19 Apr 2024 14:25:27 EDT (-0400)
  The Bright Star Catalogue (Message 11 to 20 of 30)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: The Bright Star Catalogue
Date: 10 Feb 2018 21:45:00
Message: <web.5a7fae1be3b4c4165cafe28e0@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> I kinda wish there were a POV-Ray object that would be guaranteed to
> always be 1 pixel big.

I snipped this out of something I wrote last April, and haven't tested it out
tonight in a scene all by itself, but it gives you the broad strokes.


Location is the camera location.
(So do
#declare Location = <0, 0, -10>;
camera { ... location Location  ...}
)
Vector is the center of the object you want to be 1 pixel.
The macro returns the radius of a sphere/cylinder so it is a pixel wide.
you can work the rest out from there.

// Minimum radius for solid visibility is (Z/image_width)*Aspect
// Minimum radius for threshold visibility is (Z/image_width)

#macro MinRad (Vector)
   #local Aspect = image_width/image_height;
   #local Dist = vlength (Vector-Location);
   #local M = (0.5*Aspect)/tan(radians(Angle/2));
   #local ZA = Dist/M;
   #local Rad = (ZA/image_width)*Aspect;
   Rad
#end // end macro MinRad


Post a reply to this message

From: Mike Horvath
Subject: Re: The Bright Star Catalogue
Date: 10 Feb 2018 22:21:56
Message: <5a7fb6d4$1@news.povray.org>
On 2/10/2018 9:44 PM, Bald Eagle wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> I kinda wish there were a POV-Ray object that would be guaranteed to
>> always be 1 pixel big.
> 
> I snipped this out of something I wrote last April, and haven't tested it out
> tonight in a scene all by itself, but it gives you the broad strokes.
> 
> 
> Location is the camera location.
> (So do
> #declare Location = <0, 0, -10>;
> camera { ... location Location  ...}
> )
> Vector is the center of the object you want to be 1 pixel.
> The macro returns the radius of a sphere/cylinder so it is a pixel wide.
> you can work the rest out from there.
> 
> // Minimum radius for solid visibility is (Z/image_width)*Aspect
> // Minimum radius for threshold visibility is (Z/image_width)
> 
> #macro MinRad (Vector)
>     #local Aspect = image_width/image_height;
>     #local Dist = vlength (Vector-Location);
>     #local M = (0.5*Aspect)/tan(radians(Angle/2));
>     #local ZA = Dist/M;
>     #local Rad = (ZA/image_width)*Aspect;
>     Rad
> #end // end macro MinRad
> 
> 

Interesting. Would it work better with a cube oriented to face the 
camera? I suppose the perspective distortion might make the cubes look 
weird if they're toward the edges of the image. But spheres would end up 
looking distorted too.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: The Bright Star Catalogue
Date: 10 Feb 2018 22:27:51
Message: <5a7fb837$1@news.povray.org>
On 2/10/2018 10:22 PM, Mike Horvath wrote:
> Interesting. Would it work better with a cube oriented to face the 
> camera? I suppose the perspective distortion might make the cubes look 
> weird if they're toward the edges of the image. But spheres would end up 
> looking distorted too.
> 
> 
> Mike
> 

E.g. a true "one-pixel" POV-Ray object would not be distorted by 
perspective, which I think is realistic since stars are so distant and 
tiny that visual perspective has no effect on their perceived 
dimensions/brightness.


Mike


Post a reply to this message

From: Cousin Ricky
Subject: Re: The Bright Star Catalogue
Date: 17 Feb 2018 18:32:24
Message: <5a88bb88$1@news.povray.org>
On 2018-02-09 10:28 PM (-4), Mike Horvath wrote:
> The fuzzy circles don't look so great. I don't know if anything can be
> done to improve them however. In video games, stars are often reduced to
> 1 pixel. But I don't think in POVray there's an easy way to make a star
> exactly 1 pixel big. Maybe with some trigonometry?

Yes, of course they can be improved!  The purpose of the demo was merely 
to demonstrate how to use the data.  I consider attempting a realistic 
sky beyond the scope of the demo.

This works if you are representing the stars as actual objects:

----------[BEGIN CODE]----------
#version 3.7;

global_settings { assumed_gamma 1 }

#declare Cam_angle = 60;
#declare RSky = 10000; // arbitrary distance to the stars
#declare R = RSky * tan (radians (Cam_angle / 2)) / image_width;

camera
{ location 1.64 * y
   look_at <0.5, 2.64, 2.5>
   angle Cam_angle
}

plane { y, 0 pigment { checker } }

#include "brightstar5.inc"

#default { finish { ambient 0 diffuse 0 emission 1 } }
union
{ #for (I, 0, BSC5_N - 1)
     #if (BSC5_Data [I] [BSC5_HD] != BSC5_NO_DATA)
       sphere
       { RSky * y, R
         pigment { rgb BSC5_fn_Brightness (BSC5_Data [I] [BSC5_MAG], 0) }
         rotate
         < 90 - BSC5_Data [I] [BSC5_DEC],
           -15 * BSC5_Data [I] [BSC5_RA],
           0
         >
       }
     #end
   #end
   rotate <0, 120, 71.7>
}
-----------[END CODE]-----------

I disregarded image_height in the formula because the POV-Ray camera 
considers only image_width for its field angle.  Also note that if the 
camera is significantly distant from the origin, you will need to make 
appropriate adjustments.

Note that with a diameter of 1 pixel, an adaptive anti-aliasing trace 
will miss quite a few stars.  To avoid this, you'll need to either use 
+A0.0 (slow), or use a diameter slightly larger than 1 pixel (times 
sqrt(2) should do).  As far as using boxes instead of spheres, I don't 
think it would be worth the effort.

If Orion looks strangely oriented in the above code, it's because I'm 
stargazing from the northeast Caribbean.

Yes, there is some distortion as you move away from the center of the 
image, as explained in the knowledge base:
   http://wiki.povray.org/content/Knowledgebase:Misconceptions#Topic_3

The orthographic camera will preserve the star shape, but the star 
positions will still be distorted, for the reason you learned in 4th 
grade geography.  Also, the orthographic camera would be quite awkward 
to use if you are rendering, say, a landscape.

A sky sphere would use a different formula, but the math would be similar.


Post a reply to this message

From: Bald Eagle
Subject: Re: The Bright Star Catalogue
Date: 14 Jan 2020 20:25:01
Message: <web.5e1e68c8e3b4c4164eec112d0@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:

> A sky sphere would use a different formula, but the math would be similar.

Has anyone to date used the catalogue to generate a fairly realistic spherical
sky shell or a flat image useful for uv-mapping a sphere?

I'd like to be able to incorporate this into the solar system scene I've worked
on, if I get the time to focus on it, and I have another project where I'd like
to be able to look up from a given position on earth at a certain angle at a
given date and time and see a reasonably accurate view.


Post a reply to this message

From: Bald Eagle
Subject: Re: The Bright Star Catalogue
Date: 14 Jan 2020 20:40:00
Message: <web.5e1e6d12e3b4c4164eec112d0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Has anyone to date used the catalogue to generate a fairly realistic spherical
> sky shell or a flat image useful for uv-mapping a sphere?

Does anyone here know [how to contact] this chap?
https://www.youtube.com/watch?v=bvpEWuxBBRw


Post a reply to this message

From: Dick Balaska
Subject: Re: The Bright Star Catalogue
Date: 14 Jan 2020 21:39:23
Message: <5e1e7b5b@news.povray.org>
Am 1/14/20 8:38 PM, also sprach Bald Eagle:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> 
> 
> Does anyone here know [how to contact] this chap?
> https://www.youtube.com/watch?v=bvpEWuxBBRw
> 
How many Geoff Dallimore(s) can there be?  Google thinks you want the
UK patent attorney, who looks like the guy in the thumbnail on youtube.

If you comment on the video, I'm pretty sure he'll get an email.  Or you 
can try his contact form: http://xpatent.co.uk/contact/

-- 
dik
Rendered 49,882,521,600 of 49,882,521,600 pixels (100%)


Post a reply to this message

From: Melody
Subject: Re: The Bright Star Catalogue
Date: 16 Jan 2020 04:45:01
Message: <web.5e202fbee3b4c4169da690110@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> I have extracted some of the data fields from the Yale Bright Star
> Catalogue and converted ...

Hum when it comes time to generate a view if this library,
if your library is in 3D points, not ra dec, you'll save thousands of trig
functions, and the time.

seta(1,146180222.862047,-139516389.855953,-37392435.96208,5.1);
seta(2,65647206.128445,-80763375.119065,-16312013.815614,4.7);
seta(3,135031719.98319,-145513040.060053,-31389042.949954,5.3);

times 10,000,000 = miles, and there's your distance.

I already made a bright star catalog converted to pov, in 3D points, if anyone
is interested.


Post a reply to this message

From: Bald Eagle
Subject: Re: The Bright Star Catalogue
Date: 16 Jan 2020 14:05:00
Message: <web.5e20b32be3b4c4164eec112d0@news.povray.org>
"Melody" <nomail@nomail> wrote:

> I already made a bright star catalog converted to pov, in 3D points, if anyone
> is interested.

Yes, that would be a very useful thing, indeed.
Are there comments of any sort to assist in highlighting the various
constellations, or is it just bare-bones at the moment?

I still have to wrap my head around the ephemerides and the orbital elements to
be able to position everything where it needs to be at the proper times...


Post a reply to this message

From: Melody
Subject: Re: The Bright Star Catalogue
Date: 16 Jan 2020 18:35:00
Message: <web.5e20f2dfe3b4c4169da690110@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Melody" <nomail@nomail> wrote:
>
> > I already made a bright star catalog converted to pov, in 3D points, if anyone
> > is interested.
>
> Yes, that would be a very useful thing, indeed.
> Are there comments of any sort to assist in highlighting the various
> constellations, or is it just bare-bones at the moment?
>
> I still have to wrap my head around the ephemerides and the orbital elements to
> be able to position everything where it needs to be at the proper times...

Constellation boundaries points is another set of points.
Got it all in 3 languages.

POV
http://trueinnerbeing.x10host.com/charts/planetarium45.zip

JS
http://trueinnerbeing.x10host.com/charts/jtarium232full-opac.zip
http://trueinnerbeing.x10host.com/charts/jtarium.html
(ctrl-F8 titles are links to APOD)

OpenGL
http://trueinnerbeing.x10host.com/code/gamemode.zip
http://trueinnerbeing.x10host.com/code/code.html

all to grok really, is that camera matrix is "inverted"
and you just pipe everything thru the world matrix.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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