Programmatically generate SVG (vector) images, animations, and interactive Jupyter widgets
1<?xml version="1.0" encoding="UTF-8"?> 2<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 3 width="200" height="200" viewBox="-100.0 -100.0 200 200"> 4<defs> 5<path d="M-90,0 A90,40,360,1,1,90,0 A90,40,360,1,1,-90,0 Z" id="d0" /> 6</defs> 7<circle cx="0" cy="0" r="20" fill="red"> 8<animate repeatCount="indefinite" attributeName="cy" dur="6s" values="-80;80;-80" /> 9<animate repeatCount="indefinite" attributeName="cx" dur="6s" values="0;80;0;-80;0" /> 10<animate calcMode="discrete" repeatCount="indefinite" attributeName="fill" dur="6s" values="red;green;blue;yellow" /> 11</circle> 12<circle cx="0" cy="0" r="10"> 13<animateMotion repeatCount="indefinite" dur="3s"> 14<mpath xlink:href="#d0" /> 15</animateMotion> 16<animateTransform type="scale" repeatCount="indefinite" attributeName="transform" dur="3s" values="1,2;2,1;1,2;2,1;1,2" /> 17</circle> 18</svg>