You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/files/opencs/editing-terrain-vertex-pain...

112 lines
44 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="48pt"
height="48pt"
viewBox="0 0 16.933333 16.933333"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<script
id="script1"
type="text/javascript">
!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][t][r]),s[t][r][1]=[],s[t][r][1]
</script>
<g
id="editing-terrain-vertex-paint"
style="display:inline"
transform="matrix(1.3333345,0,0,1.333334,-106.18619,-127.35283)">
<rect
style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke-width:0.246511;paint-order:fill markers stroke;stop-color:#4d4d4d"
id="rect1913"
width="5.9162631"
height="5.9162631"
x="-68.827797"
y="159.0508"
transform="matrix(0.89442719,-0.4472136,0.89442719,0.4472136,0,0)" />
<path
style="display:inline;fill:#0032a0;fill-opacity:0.80000001;stroke:none;stroke-width:0.284472px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 87.911411,103.50419 c 0,0 -0.290875,-0.13899 -0.86134,-0.68826 -0.511608,0.32436 -0.869557,0.57318 -0.869557,0.57318 0,0 0.47803,0.3237 0.89795,0.53619 z"
id="path3210" />
<path
style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:#f5f5f5;fill-opacity:1;stroke:#303030;stroke-width:0.211667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#4d4d4d;stop-opacity:1"
d="m 85.989552,99.272155 -1.05833,0.529168 -1.058333,0.529177 -1.05834,0.52916 -1.05833,0.52917 -1.058333,0.52916 1.058333,0.52917 1.05833,0.52917 1.05834,0.52916 1.058333,0.52917 1.05833,0.52916 1.058333,-0.52916 1.05834,-0.52917 1.05833,-0.52916 1.058343,-0.52917 1.05833,-0.52917 -1.05833,-0.52916 -1.058343,-0.52917 -1.05833,-0.52916 -1.05834,-0.529177 z"
id="path2245" />
<path
id="path2247"
style="font-variation-settings:normal;display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#303030;stroke-width:0.211667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#4d4d4d;stop-opacity:1"
d="m 90.222898,101.38091 c -0.881943,0.44097 -1.763893,0.57644 -2.645833,1.01741 -0.881953,0.44097 -1.763893,1.18745 -2.645843,1.62842 m 4.233333,-3.175 c -0.88194,0.44098 -1.76389,0.0882 -2.645833,0.52917 -0.88194,0.44097 -1.76389,1.67569 -2.645833,2.11666 m 4.233336,-3.17499 c -0.88194,0.44097 -1.763893,0.0882 -2.645843,0.52917 -0.88194,0.44097 -1.763883,1.67569 -2.645833,2.11666 m -1.05833,-0.52917 c 0.88195,-0.44097 1.76389,-1.18745 2.645833,-1.62842 0.88194,-0.44097 1.76389,-0.57644 2.645833,-1.017414 m -2.116663,0 c 0.88195,0.440974 1.76389,0.576434 2.645843,1.017414 0.88194,0.44097 1.76389,1.18745 2.645833,1.62842 m -6.350009,-2.11666 c 0.881953,0.44097 1.763893,0.0882 2.645833,0.52916 0.881943,0.44098 1.763893,1.67569 2.645833,2.11667 m -6.350006,-2.11667 c 0.90872,0.45436 1.809303,0.1109 2.693883,0.55319 0.88457,0.44228 1.753133,1.67031 2.597793,2.09264 m -6.350006,-2.11666 c 0.88195,0.44097 1.76389,0.57643 2.645833,1.0174 0.88194,0.44098 1.76389,1.18746 2.645833,1.62843" />
<rect
style="opacity:0;fill:#ffbe6f;stroke:#eff0f1;stroke-width:0;paint-order:stroke fill markers;stop-color:#4d4d4d"
id="rect2594"
width="12.699998"
height="12.699994"
x="79.639572"
y="95.514572" />
<path
style="display:inline;fill:#0032a0;fill-opacity:0.80000001;stroke:none;stroke-width:0.370488px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.5842604,11.35362 c 0,0 -0.6557896,-0.355582 -1.1133861,-0.690693 -0.6628759,0.439985 -1.1222537,0.687164 -1.1222537,0.687164 0,0 0.5606146,0.290058 1.119089,0.561059 z"
id="path3210-0"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#0032a0;fill-opacity:0.80000001;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 8.2184555,10.499994 c 0,0 -0.5242594,-0.358953 -1.1525884,-0.7564507 C 6.4540024,10.331053 5.931261,10.646277 5.931261,10.646277 c 0,0 0.4908818,0.236197 1.1210557,0.55259 0.3990813,-0.212221 0.7833249,-0.454117 1.1661388,-0.698873 z"
id="path3210-8"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 15.210366,8.5366296 c 0,0 -0.319681,-0.1529595 -1.113375,-0.5566578 -0.493595,0.2483148 -1.080625,0.4426691 -1.080625,0.4426691 0,0 0.546247,0.3745788 1.106141,0.657899 z"
id="path3210-9"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 13.814424,9.2366004 c 0,0 -0.08449,-0.028999 -1.13744,-0.6999713 -1.007012,0.3356575 -1.118308,0.3790493 -1.118308,0.3790493 0,0 0.59695,0.587389 1.156844,0.870709 z"
id="path3210-1"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 13.78038,7.8229584 c 0,0 -0.297977,-0.1426242 -1.091671,-0.5463225 -0.441734,0.2166174 -0.987607,0.2731704 -0.987607,0.2731704 0,0 0.508006,0.3363382 1.020358,0.677536 0.326626,-0.1086572 0.720992,-0.2450246 1.05892,-0.4043839 z"
id="path3210-9-0"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.5465201,5.7062205 c 0,0 -0.2866081,-0.1384901 -1.0803021,-0.5421884 -0.493595,0.2483148 -1.0786188,0.5422068 -1.0786188,0.5422068 0.00185,0.01144 0.5329286,0.2288832 1.0772631,0.4157343 C 8.8968408,5.9810788 9.2021771,5.8579039 9.5465201,5.7062205 Z"
id="path3210-9-6"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 10.94282,6.4053962 c 0,0 -0.2793,-0.1393463 -1.0803018,-0.5401213 C 9.3513529,6.1166902 8.9069499,6.2635022 8.9069499,6.2635022 8.9058697,6.2646315 9.2718294,6.3774249 9.8856555,6.6043618 10.426611,6.566683 10.705962,6.489267 10.94282,6.4053962 Z"
id="path3210-9-5"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a03200;fill-opacity:0.8;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 8.0300839,6.2598267 c 0,0 -0.1501823,-0.026869 -0.9624798,-0.3954273 -0.493595,0.2483148 -1.0816585,0.5418878 -1.0816585,0.5418878 0,0 0.4139553,0.1606387 1.0637663,0.1948782 z"
id="path3210-9-56"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a0a000;fill-opacity:0.80000001;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 5.3785882,8.9157275 c 0,0 -0.2990104,-0.1033501 -1.1216432,-0.3809579 -0.4770585,0.3330641 -1.1374691,0.6989842 -1.1374691,0.6989842 0,0 0.5446259,0.2702732 1.1045199,0.5535934 C 4.4466164,9.6697777 4.6934101,9.5264369 5.3785882,8.9157275 Z"
id="path3210-9-52"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a0a000;fill-opacity:0.80000001;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 5.2173907,7.5588385 c 0,0 -0.4800605,-0.054866 -0.9719641,-0.2869981 -0.493595,0.2483148 -1.0936684,0.5513031 -1.0936684,0.5513031 0,0 0.3396051,0.1645856 1.0573552,0.4084418 z"
id="path3210-9-4"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
<path
style="display:inline;fill:#a0a000;fill-opacity:0.80000001;stroke:none;stroke-width:0.379296px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.920417,8.4221775 c 0,0 -0.4852533,-0.1454058 -1.0929122,-0.4426506 -0.493595,0.2483148 -1.1010878,0.5566762 -1.1010878,0.5566762 0,0 0.5276435,0.2612858 1.0875375,0.5446068 C 3.2682593,8.8451734 3.5885705,8.6362368 3.920417,8.4221775 Z"
id="path3210-9-1"
transform="matrix(0.74999935,0,0,0.74999963,79.639573,95.514575)" />
</g>
<script
id="mesh_polyfill"
type="text/javascript">
!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][t][r]),s[t][r][1]=[],s[t][r][1]
</script>
</svg>