User:BenRG/Source code

From Wikimedia Commons, the free media repository
Jump to: navigation, search

This page has the (ugly, hacked together) source code used to generate some of the images I've uploaded to Commons.

Cone fundamentals[edit]

This Perl script produced File:Cone-fundamentals-with-srgb-spectrum.svg. Needs and #FitCurves.

Friedmann universes[edit]

This Perl script produced File:Friedmann_universes.svg. Needs and #FitCurves.


This Perl script produced File:CIE1931xy_blank.svg, File:CIE1931xy_sRGB.svg, File:CIE1931xy_AdobeRGB.svg, and File:CIE1931xy_CIERGB.svg. Needs and #FitCurves.

The file chromaticity1.png was produced by this C++ code. It writes a PPM which you'll have to convert to PNG. Note that (to avoid edge artifacts) the script above ended up using a 27×28 image which consists of the 26×28 output of this program with the left column duplicated.

Isotopes and half-life[edit]

This Perl script produced File:Isotopes and half-life.svg. Needs[edit]

The SVG-generating Perl scripts use this. It needs to be in Perl's library search path (or you could set PERL5LIB=.).

FitCurves[edit] invokes FitCurves, which is a slight modification of a program from Graphics Gems. Download the original here (tar.gz) or here (zip) and then replace DrawBezierCurve and main in FitCurves.c with these functions: