Sunday, March 22, 2015

Blender/Python: Plot stars from the HYG data (version 2015-03-05)



slightly updated version from what was previously posted....

the colours for the spectral types are over-saturated but what I do to correct this is put the stars into their own layer in Blender and from there I use the compositing node that reduces the saturation of the colours down to the point where the colours look realistic.

In the compositing screen below I have FOUR layers, FUZZIER and FUZZY are used for blurring the atmosphere, auroras or whatever needs to be blurred. Generally I have two fuzzy layers because I often find that I need to have two independent levels of configurable fuzziness so I just make the two layers for using blurring and glare nodes of some kind so that I don't have to add them later. the PLANET layer is the main layer where the planets and moons and such are placed and the STARS layer is for the background stars

I reduce the saturation of the background stars so as to reduce the "colourness" of the background stars as this script makes the colours rather vibrant. ie. M class stars are bright red (R,G,B = 1,0,0) which isn't a very realistic colour for M class stars. I also add a bit of glare to the background stars such that there aren't solid points of light.


The script below only supports plotting stars on the inside of a sphere, I haven't quite got the relative brightness of stars correct when plotting a star field in which you could move the camera around and see the perspective and relative stellar positions change. eg. If you moved the camera to Alpha Centauri, you would see that the star Sirius is now a part of the Orion constellation and our Sun would become a star in Cassiopeia.





Friday, February 6, 2015

Perl/Math::Bezier ... plotting a bezier curve given some control points

doesn't actually draw anything - just gets the data points necessary to plot one. I did this because I needed a series of 22 numbers starting with 0.0125 that gradually ramped up to 7.4 with step getting larger for each iteration.

Wednesday, February 4, 2015

Perl get SSL certificate subject alternative names (aka aliases)

Saturday, January 31, 2015

Blender/Python: Plot stars from the HYG data

Plots stars on the inside of a sphere using three different types of solids. Most stars are tetrahedrons, brighter stars are octahedrons and the brightest stars are plotted as dodecahedrons. ps. feel free to use this however you want but please don't republish the code as I don't want multiple copies all over the internet as I am likely to update this script every now and then... oh and if you make a million dollars out of it somehow, be sure to donate some of that money to the needy. If I ever find a file hosting service that I like, I'll post the completed .blend file there to save the trouble of running it seeing how the whole catalog can take six or more hours to run...

Thursday, January 29, 2015

Blender/Python: creating a tetrahedron

creating a tetrahedron in Python for blender (Code extracted from larger code available all over the interwebs ie. it is hard to give an actual source)

Wednesday, November 5, 2014

WHOIS caching proxy in perl

Monday, July 28, 2014

Sonic Wall Status - Nagios plugin