lucasvl.nl/static/img/displacement_inkscapesvg.svg

118 lines
21 KiB
XML
Raw Normal View History

2024-02-11 18:49:11 -06:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
2024-02-17 20:18:10 -06:00
width="210mm"
height="210mm"
viewBox="0 0 210 210"
2024-02-11 18:49:11 -06:00
version="1.1"
id="svg1"
2024-02-17 20:18:10 -06:00
sodipodi:docname="displacement.svg"
inkscape:export-filename="displacement.webp"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
2024-02-11 18:49:11 -06:00
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
2024-02-17 20:18:10 -06:00
inkscape:document-units="mm" />
2024-02-11 18:49:11 -06:00
<defs
id="defs1">
<meshgradient
inkscape:collect="always"
2024-02-17 20:18:10 -06:00
id="meshgradient4"
2024-02-11 18:49:11 -06:00
gradientUnits="userSpaceOnUse"
2024-02-17 20:18:10 -06:00
x="0"
y="0"
type="bicubic">
2024-02-11 18:49:11 -06:00
<meshrow
2024-02-17 20:18:10 -06:00
id="meshrow14">
2024-02-11 18:49:11 -06:00
<meshpatch
2024-02-17 20:18:10 -06:00
id="meshpatch14">
2024-02-11 18:49:11 -06:00
<stop
2024-02-17 20:18:10 -06:00
path="c 35.3199,0 70.6397,0 105.96,0"
style="stop-color:#000000;stop-opacity:1"
id="stop14" />
2024-02-11 18:49:11 -06:00
<stop
2024-02-17 20:18:10 -06:00
path="c 0,34.8327 0,69.6652 0,104.498"
style="stop-color:#7f8000;stop-opacity:1"
id="stop15" />
2024-02-11 18:49:11 -06:00
<stop
2024-02-17 20:18:10 -06:00
path="c -35.3199,0 -70.6397,0 -105.96,0"
style="stop-color:#808000;stop-opacity:1"
id="stop16" />
2024-02-11 18:49:11 -06:00
<stop
2024-02-17 20:18:10 -06:00
path="c 0,-34.8326 0,-69.6651 0,-104.498"
style="stop-color:#807f00;stop-opacity:1"
id="stop17" />
</meshpatch>
<meshpatch
id="meshpatch17">
<stop
path="c 34.6801,0 69.3603,0 104.04,0"
id="stop18" />
<stop
path="c 0,34.8326 0,69.6651 0,104.498"
2024-02-11 18:49:11 -06:00
style="stop-color:#ff0000;stop-opacity:1"
2024-02-17 20:18:10 -06:00
id="stop19" />
<stop
path="c -34.6801,0 -69.3603,0 -104.04,0"
style="stop-color:#7f8000;stop-opacity:1"
id="stop20" />
</meshpatch>
</meshrow>
<meshrow
id="meshrow20">
<meshpatch
id="meshpatch20">
<stop
path="c 0,35.1673 0,70.3348 0,105.502"
id="stop21" />
<stop
path="c -35.3199,-2.84217e-14 -70.6397,-2.84217e-14 -105.96,-2.84217e-14"
style="stop-color:#807f00;stop-opacity:1"
id="stop22" />
<stop
path="c 0,-35.1674 0,-70.3349 0,-105.502"
style="stop-color:#00ff00;stop-opacity:1"
id="stop23" />
</meshpatch>
<meshpatch
id="meshpatch23">
<stop
path="c 0,35.1674 0,70.3349 0,105.502"
id="stop24" />
<stop
path="c -34.6801,0 -69.3603,0 -104.04,2.84217e-14"
style="stop-color:#ffff00;stop-opacity:1"
id="stop25" />
2024-02-11 18:49:11 -06:00
</meshpatch>
</meshrow>
</meshgradient>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
2024-02-17 20:18:10 -06:00
style="mix-blend-mode:normal;fill:url(#meshgradient4);fill-opacity:1;stroke:none;stroke-width:5.79781;stroke-linejoin:bevel;stroke-miterlimit:27.7"
id="rect1"
width="210"
height="210"
x="0"
y="0" />
2024-02-11 18:49:11 -06:00
</g>
<script
id="mesh_polyfill"
type="text/javascript">&#10;!function(){const t=&quot;http://www.w3.org/2000/svg&quot;,e=&quot;http://www.w3.org/1999/xlink&quot;,s=&quot;http://www.w3.org/1999/xhtml&quot;,r=2;if(document.createElementNS(t,&quot;meshgradient&quot;).x)return;const n=(t,e,s,r)=&gt;{let n=new x(.5*(e.x+s.x),.5*(e.y+s.y)),o=new x(.5*(t.x+e.x),.5*(t.y+e.y)),i=new x(.5*(s.x+r.x),.5*(s.y+r.y)),a=new x(.5*(n.x+o.x),.5*(n.y+o.y)),h=new x(.5*(n.x+i.x),.5*(n.y+i.y)),l=new x(.5*(a.x+h.x),.5*(a.y+h.y));return[[t,o,a,l],[l,h,i,r]]},o=t=&gt;{let e=t[0].distSquared(t[1]),s=t[2].distSquared(t[3]),r=.25*t[0].distSquared(t[2]),n=.25*t[1].distSquared(t[3]),o=e&gt;s?e:s,i=r&gt;n?r:n;return 18*(o&gt;i?o:i)},i=(t,e)=&gt;Math.sqrt(t.distSquared(e)),a=(t,e)=&gt;t.scale(2/3).add(e.scale(1/3)),h=t=&gt;{let e,s,r,n,o,i,a,h=new g;return t.match(/(\w+\(\s*[^)]+\))+/g).forEach(t=&gt;{let l=t.match(/[\w.-]+/g),d=l.shift();switch(d){case&quot;translate&quot;:2===l.length?e=new g(1,0,0,1,l[0],l[1]):(console.error(&quot;mesh.js: translate does not have 2 arguments!&quot;),e=new g(1,0,0,1,0,0)),h=h.append(e);break;case&quot;scale&quot;:1===l.length?s=new g(l[0],0,0,l[0],0,0):2===l.length?s=new g(l[0],0,0,l[1],0,0):(console.error(&quot;mesh.js: scale does not have 1 or 2 arguments!&quot;),s=new g(1,0,0,1,0,0)),h=h.append(s);break;case&quot;rotate&quot;:if(3===l.length&amp;&amp;(e=new g(1,0,0,1,l[1],l[2]),h=h.append(e)),l[0]){r=l[0]*Math.PI/180;let t=Math.cos(r),e=Math.sin(r);Math.abs(t)&lt;1e-16&amp;&amp;(t=0),Math.abs(e)&lt;1e-16&amp;&amp;(e=0),a=new g(t,e,-e,t,0,0),h=h.append(a)}else console.error(&quot;math.js: No argument to rotate transform!&quot;);3===l.length&amp;&amp;(e=new g(1,0,0,1,-l[1],-l[2]),h=h.append(e));break;case&quot;skewX&quot;:l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),o=new g(1,0,n,1,0,0),h=h.append(o)):console.error(&quot;math.js: No argument to skewX transform!&quot;);break;case&quot;skewY&quot;:l[0]?(r=l[0]*Math.PI/180,n=Math.tan(r),i=new g(1,n,0,1,0,0),h=h.append(i)):console.error(&quot;math.js: No argument to skewY transform!&quot;);break;case&quot;matrix&quot;:6===l.length?h=h.append(new g(...l)):console.error(&quot;math.js: Incorrect number of arguments for matrix!&quot;);break;default:console.error(&quot;mesh.js: Unhandled transform type: &quot;+d)}}),h},l=t=&gt;{let e=[],s=t.split(/[ ,]+/);for(let t=0,r=s.length-1;t&lt;r;t+=2)e.push(new x(parseFloat(s[t]),parseFloat(s[t+1])));return e},d=(t,e)=&gt;{for(let s in e)t.setAttribute(s,e[s])},c=(t,e,s,r,n)=&gt;{let o,i,a=[0,0,0,0];for(let h=0;h&lt;3;++h)e[h]&lt;t[h]&amp;&amp;e[h]&lt;s[h]||t[h]&lt;e[h]&amp;&amp;s[h]&lt;e[h]?a[h]=0:(a[h]=.5*((e[h]-t[h])/r+(s[h]-e[h])/n),o=Math.abs(3*(e[h]-t[h])/r),i=Math.abs(3*(s[h]-e[h])/n),a[h]&gt;o?a[h]=o:a[h]&gt;i&amp;&amp;(a[h]=i));return a},u=[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],[-3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0],[2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0],[0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0],[-3,0,3,0,0,0,0,0,-2,0,-1,0,0,0,0,0],[0,0,0,0,-3,0,3,0,0,0,0,0,-2,0,-1,0],[9,-9,-9,9,6,3,-6,-3,6,-6,3,-3,4,2,2,1],[-6,6,6,-6,-3,-3,3,3,-4,4,-2,2,-2,-2,-1,-1],[2,0,-2,0,0,0,0,0,1,0,1,0,0,0,0,0],[0,0,0,0,2,0,-2,0,0,0,0,0,1,0,1,0],[-6,6,6,-6,-4,-2,4,2,-3,3,-3,3,-2,-1,-2,-1],[4,-4,-4,4,2,2,-2,-2,2,-2,2,-2,1,1,1,1]],f=t=&gt;{let e=[];for(let s=0;s&lt;16;++s){e[s]=0;for(let r=0;r&lt;16;++r)e[s]+=u[s][r]*t[r]}return e},p=(t,e,s)=&gt;{const r=e*e,n=s*s,o=e*e*e,i=s*s*s;return t[0]+t[1]*e+t[2]*r+t[3]*o+t[4]*s+t[5]*s*e+t[6]*s*r+t[7]*s*o+t[8]*n+t[9]*n*e+t[10]*n*r+t[11]*n*o+t[12]*i+t[13]*i*e+t[14]*i*r+t[15]*i*o},y=t=&gt;{let e=[],s=[],r=[];for(let s=0;s&lt;4;++s)e[s]=[],e[s][0]=n(t[0][s],t[1][s],t[2][s],t[3][s]),e[s][1]=[],e[s][1].push(...n(...e[s][0][0])),e[s][1].push(...n(...e[s][0][1])),e[s][2]=[],e[s][2].push(...n(...e[s][1][0])),e[s][2].push(...n(...e[s][1][1])),e[s][2].push(...n(...e[s][1][2])),e[s][2].push(...n(...e[s][1][3]));for(let t=0;t&lt;8;++t){s[t]=[];for(let r=0;r&lt;4;++r)s[t][r]=[],s[t][r][0]=n(e[0][2][t][r],e[1][2][t][r],e[2][2][t][r],e[3][2
</svg>