SVG Magic

More
18 Oct 2022 14:57 - 18 Oct 2022 15:00 #254428 by andypugh
SVG Magic was created by andypugh
I thought that I had lost this, but just found it again and thought I would share it. 

SVG is an amazing format. I am currently using it to present a GUI on a microcontroller. (ESP32). Basically C-code just spits out programatically-generated SVG elements. (See for example: github.com/andypugh/ESP-Heat/blob/master/Programming.ino )

But you are not limited to creating SVG with code, you can have code _inside_ an SVG. 

Try opening this file in a web browser. It's a multi-layer SVG of slices of a component (for DLP printing) 
www.bodgesoc.org/newfile_script.svg

Now, add a question-mark and a number after the file name in the browser bar, and a small script inside the SVG file will execute and display only that layer. 

For example, in my case: www.bodgesoc.org/newfile_script.svg?15

It's like magic :-) 

Nothing is happening server-side, this will work just the same if you download the file (and you might want to do that, to look at the script) 


 
Last edit: 18 Oct 2022 15:00 by andypugh.
The following user(s) said Thank You: arvidb, tommylight, my1987toyota

Please Log in or Create an account to join the conversation.

More
18 Oct 2022 15:15 #254433 by tommylight
Replied by tommylight on topic SVG Magic
Interesting, thank you.
Pretty sure i read somewhere a while back that SVG can also do 3D and saw an example...

Please Log in or Create an account to join the conversation.

Time to create page: 0.148 seconds
Powered by Kunena Forum