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