Live data from Hacker News

Nice things with SVG

fuma-nama.vercel.app

21–30 of 112 posts

Re: Nice things with SVG

#21

Was always fascinated by SVG art. How good are LLMs in generating SVGs?

Regular LLMs are quite bad at it (see simonwillison's blog post). However this paper [0] describes an apparently sound approach using Neural Radiance Fields (NeRFs), however their github repo [1] has been "code coming soon!" for months now, so you can't really use it.

0 - https://arxiv.org/pdf/2501.03992

1 - https://github.com/SagiPolaczek/NeuralSVG

Re: Nice things with SVG

#22

One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0]. The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities. [0] https://kingbird.myphotos…

You can also extract different parts of an existing svg and use (clone) them elsewhere on the page. https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/E...

I've used this to succinctly define a Sierpinski carpet on Wikimedia Commons a while ago: https://commons.wikimedia.org/wiki/File:Sierpinski_carpet_6....

That file was able to lock up or crash most SVG renderers back then.

Re: Nice things with SVG

#23

Was always fascinated by SVG art. How good are LLMs in generating SVGs?

I've gotten decent outputs with Claude with iteration (sending both text feedback and screenshot for context) and then tweaked the output in Inkscape.

Re: Nice things with SVG

#26
I love what you have done here — it's very graceful.

I was feeling great but now I think "I have a lot to learn — I'd better get going!"

If you are interested in SVG animation, I wrote a program to do it from within Adobe Illustrator — see examples and how it works at https://svija.com/en/animation

Re: Nice things with SVG

#27

Is there any SVG extension which allows density of line? I have a plotter which can lift/lower a pen; it's driven from SVG files. It'd be sweet to allow the pen to lower while the line is being drawn (as we often do with handwriting). Oh - it's an Axidraw, from Evil Mad Scientist Labs - great device, wonderful people.

Probably you would want to do that with G-code.

I've been doing that sort of thing in:

https://github.com/WillAdams/gcodepreview

Re: Nice things with SVG

#29
post #14

SVG feels like a very underexplored and underused territory. You can do so many things with it. It really depends on your imagination. But you’ll possibly need to “hardcore” a lot of stuff, so yeah, depends on the use case as well.

Two usages which I thought were interesting:

- adding toolpath information so as to use Flash as the engine for a Computer Aided Manufacturing tool: https://github.com/Jack000/PartKAM

- (this was my project along w/ Edward R. Ford) adding hyperlinks to part lists to highlight parts in an assembly diagram: https://github.com/shapeoko/Docs --- unfortunately, that doesn't seem to work anymore.

Post reply on HN