User:gringer

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

gringer is another of the numerous wikipedia consumers, also known as David Eccles (formerly David Hall).

Crystal Clear app gimp.pngThis user is a Wikigraphist from the Graphics Lab, where you can request image improvement.
Converted to SVG.svgThis user converts raster images to SVG format.

I originally thought the name of the cat in the TV Show He-Man was called Gringer, and I thought that cat was an appropriate representation of my personality. Despite finding out that the cat's name was Cringer, I decided to stick to that "original" mis-heard name.

My academic interests are in human genetics (or more generally, biology), mathematical logic, and programming (as a hobby, rather than a career). This led me to work on a PhD in biomedical science, studying basic structures of genetic variation in the Māori population, which was accepted in the University library in December 2011. My thesis can be found here.

Useful links[edit]

Map Drawing using Natural Earth Data[edit]

Natural Earth Data (NED) — has a license that seems to fit wikimedia well (public domain). I have created a Perl script for converting shapefiles from Natural Earth Data into SVG files. Many useful features have been implemented:

  • map-type based colours (with manual override)
  • shapes grouped by country (and by territory, if different)
  • mark countries as main/subject/interest
  • different colours for identified subject areas
  • centre map based on either specified lat/long point or country centre
  • supports multiple projections (anything supported by proj4)
  • lines of latitude and longitude
  • larger surrounding circle when point of interest is a single point
  • line simplification using Ramer–Douglas–Peucker_algorithm, with hashing to ensure already added points are always included)
  • bounding box / zooming for a particular region
  • ability to mark countries/regions as 'other political'|'outside'
  • style-sheet based colouring for easy customisation / changing of colours
  • load numerical data from a csv file to create a heatmap
  • proper clipping at SVG viewbox boundary — implemented for orthographic projections
  • zoom box clipping (e.g. using Sutherland–Hodgman algorithm) to remove more mindless Inkscape touch-ups. The Vatti_clipping_algorithm may be implemented if too many people complain about the boundary edges.

To come:

  • numbering regions and generating a list of region names — useful for regional maps, but NED resolution doesn't go down to regional levels for most countries
  • remove Geo::ShapeFile dependency

How To Create a World Map[edit]

  1. Download Admin 0 cultural boundaries and tiny country points from here.
  2. Save my Perl script in an appropriate place on your computer -- direct download here.
  3. Install the Geo::ShapeFile Perl library -- you can download a compiled version here (extract into the same directory), or install via cpanminus (cpanm Geo::ShapeFile)
  4. Set up Perl @INC to point to the Perl library directory (e.g. export PERL5LIB=/home/${USER}/perl5/lib/perl5)
  5. Run my script: ./perlshaper.pl -v <country download location>/ne_50m_admin_0_countries.shp <country download location>/ne_50m_admin_0_tiny_countries.shp -type location -round 2 -centre 10,0 -psize 0.25 > map.svg
  6. View and clean up the generated map with Inkscape (if necessary): inkscape map.svg

OR

  1. Post a request for a map on the Map workshop page, and wait for the generated map.

The World[edit]

Polynesia[edit]

My attempt at showing the current knowledge of migration patterns of Maori through Polynesia to New Zealand.

Other code[edit]

  • My code for extracting primitive shapes from swfmill XML files to create SVG objects
    • this code seems to be able to extract fonts and some shapes, but not many other things

Colours and the Visible spectrum[edit]

I created an sRGB version of the Visible spectrum in August 2008, which got a bit of flack (most obviously from jacobolus (talk · contribs), see Talk:Visible spectrum) for not being a good representation of the true spectrum. This image has now been updated (August 2010) to use CIECAM02 brightness(J)/chroma(C)/hue(h) in order to better approximate the visible spectrum in sRGB. The description from the image page follows:

Spectral XYZ locus coordinates were found here. Every 10nm, the spectral locus point was used as the initial point in a search for a matching sRGB colour (assuming "Dim" viewing condition). The search was carried out by a binary search along a line in JCh space between the spectral point, and a point with 0.3 * brightness (J), 0 chroma (C), and the same hue (h) as the spectral point. The search finished when a point was found that was in sRGB space. The CAT02 matrix was modified as suggested in Brill(2008) to reduce yellow-blue problems by replacing the bottom row (0.0030, 0.0136, 0.9834) with (0,0,1). An iterative smoothing was carried out to eliminate the largest jumps in chroma (greater than 5% change). Code used to generate the colour gradient can be found here.

Colour is a tricky beast, and I don't think this will remain as my best representation of the spectrum, but I'm more convinced (after reading a number of research papers) that the CIECAM02 colour space is the most appropriate for this at the current time.

A linear (by wavelength) gradient of the Visible spectrum
Same as above, but using logarithmic scale
Same as above, but using inverse (frequency linear) scale

Other spectrum-related links[edit]

  • LuxCoreRender — a program that attempts to render spectra as faithfully as possible

Colour Wheel[edit]

I took the gaussian blur idea from Image:CIExy1931.svg and applied it to a conical spectrum gradient.

Images[edit]

Tux[edit]

My interpretation of Larry Ewing's GIMP-painted Tux.