Settings

Theme

Packing Equal Copies

erich-friedman.github.io

34 points by skywalqer 2 years ago · 3 comments

Reader

LegionMammal978 2 years ago

The "Squares in Squares" page [0] has a hilarious method for embedding long constants into the SVG files (which contain enough digits that they're clearly being provided more for the reader's sake than the browser's): as entity declarations in an internal DTD, to be referenced in the SVG attributes [1]!

I find it a beautiful usage of a feature that few know about (and even fewer would prefer to know about), but which works well in the browser regardless. I might steal the pattern for some of my own SVGs if no one's looking. (Well, not before testing its portability with non-browser SVG processors.)

[0] https://kingbird.myphotos.cc/packing/squares_in_squares.html

[1] e.g., view-source:https://kingbird.myphotos.cc/packing/square-_11.svg

  • amelius 2 years ago

    They probably looked on stack overflow for: how can I include constants in svg files?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection