I'm wondering if it is at all possible to edit an SVG's XML so that M 36, 187 H 61.455844 can be more precisely calculated.

I tried M 36, 187 H (36+18*sqrt(2)) to see if that would work, though unfortunately not; I don't know whether is is possible to insert mathematical expressions as coordinate points, though I hope it is, so that I can rely on preprocessing to give me as much precision as my machine can handle.

  • 4
    SVG has no way of calculating things like that. But any real programming language can generate a string with those calculations, i.e. you output a string that can be interpreted as SVG. Commented Oct 2, 2021 at 23:59
  • I guess technically you could include a script tag in your SVG and do JS there. But whether or not that can actually run depends on the environment. It's definitely safer to do it beforehand. Commented Oct 3, 2021 at 2:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.