# Difference between revisions of User:Divenal/sandbox

Welcome, anonymous user.

SVG is a simple xml markup system for describing images. (Well, simple for the trivial stuff I'm using it for...) You just tell it "I want a blue circle here, a red square there, ...". Unlike a bitmap, this will render perfectly at any scale. But obviously you need software to turn it into bitmap of the size you need.

The wiki will do so itself. You can add a reference to the image from your own wiki page and tell it what size to display. Just add a reference of the form [[File:filename.svg|512px]]. The 512px is the image size you want, and you can set that to whatever you want. (I'm not quite sure if it renders it for each size, or if it renders it once on upload and just rescales the bitmap. Not sure if the wiki has an option to just pass the svg directly to the browser for rendering..?) see https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Images

Modern browsers can generate svg directly. If you click on one of the images, it will take you to the wiki page about the file. Clicking again should present the svg directly to the browser for local rendering. Resizing there should be accurate since it should re-render from the vector description. You can use the browser's view-source option to see the (trivial) svg that creates the image. It should be fairly obvious how it works. The only slightly non-trivial thing is the <g ...> stuff. I tend to use that to move the origin to the centre of the canvas, and various other convenient defaults, to save having to repeat stuff on every line.

There are some online convertors you can use. Just google.

If you want to do it locally, one free application (both windows and linux) is Inkscape. You can either load the svg file interactively and then export via the menus, or use a command line:

inkscape -w 1024 -h 1024 input.svg --export-filename output.png


Another free command-line tool is ImageMagick

convert -size 1024x1024 input.svg output.png


click to enlarge

This is a tool that might be useful for distingushing https://endmyopia.org/astigmatic-cylinder-blur-vs-myopic-spherical-blur/

The gaps are intended to be calibrated to 1 minute of arc, equivalent to the gaps in landolt C test. The idea was that directional blur will close some of the gaps, but "blurry blur" will do them all. So when measuring cm's, you can distinguish the two.

Also the distance at which ghosting first appears, if you're also measuring that. For me, the ghosting appears in particular directions, so you can concentrate on the gaps on the lines where the ghost image is most-separated from the original. (ie if ghosting happens in a north-east direction, look at the gaps on the lines going north-west.)

This is a quick svg hack-up of the test page on Varakari's_Vision_Log_Tool. My intention was to be able to display it on my smartphone for measurement, but should work on any browser.

Do feel free to improve it.

This combines the two ideas... It's sized to suit my smartphone, but feel free to make your custom version as above.

A reminder about some trigonometry / geometry

1. ${\displaystyle tan(A)={\frac {a}{b}}}$
2. for very small angles (expressed in radians), ${\displaystyle tan(A)\approx A}$
3. 1 radian = ${\displaystyle {\frac {180}{\pi }}}$ degrees = ${\displaystyle {\frac {60\times 180}{\pi }}}$ arc-minutes

Acuity is a measure of the ability to resolve small details, defined by the "minimum angle of resolution". "20/20", or 1.0, is the ability to resolve features subtending 1 minute of arc.

• On a Snellen chart the letters are defined on a 5x5 grid: the detail to be resolved to distinguish between characters is one pixel of that grid
• On a Landolt C chart, the gaps in the circles, like the 'C's on the Snellen chart, are 1 minute of arc.

In order to have a bigger-is-better score, the reciprocal of the angle is usually used. Acuity ${\displaystyle =1/A={\frac {pi}{60\times 180}}\times {\frac {b}{a}}=0.00029\times {\frac {b}{a}}}$

An alternative representation of acuity is "logMAR" ("log10 Minimum Angle of Resolution"). This has a bigger-is-worse direction.

• 0.0 corresponds to "20/20"
• 1.0 is "20/200"
• -0.3 is "20/10"