User:Gringer
Gringer (or more commonly gringer) is another of the numerous wikipedia consumers, also known as David Eccles (formerly David Hall).
| Wikipedia:Babel | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|||||||||
| Search user languages | |||||||||
|
|||
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.
Contents |
[edit] Useful links
- Map Colors
- Wikipedia:WikiProject_Maps/Conventions : ongoing expansion, have fun ;)
- Category:Chemical_images_that_should_be_in_SVG_format
[edit] Map Drawing using Natural Earth Data
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
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
- proper clipping at SVG viewbox boundary — difficult due to proj4 library clipping points to undefined
[edit] How To Create a World Map
- Download Admin 0 cultural boundaries and tiny country points from here.
- Save my Perl script in an appropriate place on your computer.
- Install the Geo::ShapeFile and Geo::Proj4 Perl libraries
- Run my script:
./perlshaper.pl -type location <country download location>/50m_admin_0_countries <country download location>/50m_admin_0_tiny_countries -res 0.25 -centre 10,0 -psize 0.25 -round 2 -v > map.svg - View and clean up the generated map with Inkscape:
inkscape map.svg
OR
- Post a request for a map on the Map workshop page, and wait for the generated map.
[edit] The World
-
My interpretation of the Natural Earth Data vector information (perl script that generated the basic image (~0.25 px resolution) can be found at User:Gringer/perlshaper).
[edit] Polynesia
[edit] Other code
- 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
[edit] Colours and the Visible spectrum
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.
[edit]
- LuxRender — a program that attempts to render spectra as faithfully as possible