Steenbrink/detalleestratos.ipynb

1185 lines
71 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 39,
"id": "b7e27f4d-8435-426c-a780-06e2e045718d",
"metadata": {},
"outputs": [],
"source": [
"reset()\n",
"load('ZetaFunctionsNewtonND.py')\n",
"R.<x,y,z> = QQ[]\n",
"F=z^3 -3*(x^2*y^2 + x^5 + y^5)*z + 2*x^3*y^3 + x^7 + y^7\n",
"D=F.discriminant(z)\n",
"ZF = ZetaFunctions(F)"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "c8dfedd2-f16f-4e50-acf7-e14b44374c6c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ZF.is_newton_degenerated()"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "8786b09c-f4d6-440a-be82-30a26e6530f9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"108*x^15 + 324*x^10*y^5 + 324*x^5*y^10 + 108*y^15 - 27*x^14 + 324*x^12*y^2 + 594*x^7*y^7 + 324*x^2*y^12 - 27*y^14 - 108*x^10*y^3 + 324*x^9*y^4 + 324*x^4*y^9 - 108*x^3*y^10"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"D"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "a5ecaeee-9dc0-4491-8312-4ca22b364e2b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of 108*x^15 + 324*x^10*y^5 + 324*x^5*y^10 + 108*y^15 - 27*x^14 + 324*x^12*y^2 + 594*x^7*y^7 + 324*x^2*y^12 - 27*y^14 - 108*x^10*y^3 + 324*x^9*y^4 + 324*x^4*y^9 - 108*x^3*y^10:\n",
" support points = [(15, 0, 0), (10, 5, 0), (5, 10, 0), (0, 15, 0), (14, 0, 0), (12, 2, 0), (7, 7, 0), (2, 12, 0), (0, 14, 0), (10, 3, 0), (9, 4, 0), (4, 9, 0), (3, 10, 0)]\n",
" vertices = [(0, 14, 0), (14, 0, 0), (3, 10, 0), (10, 3, 0)]\n",
" number of proper faces = 19\n",
" Facet 0: 3*x + 4*y - 42 >= 0\n",
" Facet 1: x + y - 13 >= 0\n",
" Facet 2: x >= 0\n",
" Facet 3: 4*x + 3*y - 42 >= 0\n",
" Facet 4: y >= 0\n",
" Facet 5: z >= 0\n"
]
}
],
"source": [
"d = ZetaFunctions(D)\n",
"d.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "90017032-05aa-409e-bb72-75d8af9f5ff3",
"metadata": {},
"outputs": [],
"source": [
"F1=F(x=x*y)\n",
"D1=D(x=x*y)/y^13\n",
"F1b=F(y=x*y)\n",
"D1b=D(y=x*y)/x^13\n",
"ZF1 = ZetaFunctions(F1)\n",
"ZF1b = ZetaFunctions(F1b)"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "d0bbe6c1-c702-44d1-add6-b2f4ce8097ed",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((-108) * (x + 1) * (x^6 - 4*x^5 + 4*x^4 - 4*x^3 + 4*x^2 - 4*x + 1),\n",
" (-108) * (y + 1) * (y^6 - 4*y^5 + 4*y^4 - 4*y^3 + 4*y^2 - 4*y + 1))"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"d1=D1(y=0)\n",
"d1b=D1b(x=0)\n",
"(d1/x^3).factor(),(d1b/y^3).factor()"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "6c34d700-f2ef-45f6-87c2-56d03b78f04c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(True, True)"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F1t=F1(x=x+1)\n",
"F1bt=F1b(y=y+1)\n",
"ZF1t = ZetaFunctions(F1t)\n",
"ZF1bt = ZetaFunctions(F1bt)\n",
"ZF1t.is_newton_degenerated(local=True), ZF1bt.is_newton_degenerated(local=True)"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "53529479-e3ee-4d7f-ba62-afd9e7eeffb3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of x^7*y^7 + 7*x^6*y^7 + 21*x^5*y^7 + 35*x^4*y^7 - 3*x^5*y^5*z + 35*x^3*y^7 - 15*x^4*y^5*z + 2*x^3*y^6 + 21*x^2*y^7 - 30*x^3*y^5*z + 6*x^2*y^6 + 7*x*y^7 - 30*x^2*y^5*z + 6*x*y^6 + 2*y^7 - 3*x^2*y^4*z - 15*x*y^5*z + 2*y^6 - 6*x*y^4*z - 6*y^5*z - 3*y^4*z + z^3:\n",
" support points = [(7, 7, 0), (6, 7, 0), (5, 7, 0), (4, 7, 0), (5, 5, 1), (3, 7, 0), (4, 5, 1), (3, 6, 0), (2, 7, 0), (3, 5, 1), (2, 6, 0), (1, 7, 0), (2, 5, 1), (1, 6, 0), (0, 7, 0), (2, 4, 1), (1, 5, 1), (0, 6, 0), (1, 4, 1), (0, 5, 1), (0, 4, 1), (0, 0, 3)]\n",
" vertices = [(0, 0, 3), (0, 6, 0)]\n",
" number of proper faces = 11\n",
" Facet 0: x >= 0\n",
" Facet 1: y >= 0\n",
" Facet 2: y + 2*z - 6 >= 0\n",
" Facet 3: z >= 0\n"
]
}
],
"source": [
"ZF1t.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "3c518be7-15e0-462d-9546-68094910993b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of x^7*y^7 + 7*x^7*y^6 + 21*x^7*y^5 + 35*x^7*y^4 - 3*x^5*y^5*z + 35*x^7*y^3 - 15*x^5*y^4*z + 21*x^7*y^2 + 2*x^6*y^3 - 30*x^5*y^3*z + 7*x^7*y + 6*x^6*y^2 - 30*x^5*y^2*z + 2*x^7 + 6*x^6*y - 15*x^5*y*z - 3*x^4*y^2*z + 2*x^6 - 6*x^5*z - 6*x^4*y*z - 3*x^4*z + z^3:\n",
" support points = [(7, 7, 0), (7, 6, 0), (7, 5, 0), (7, 4, 0), (5, 5, 1), (7, 3, 0), (5, 4, 1), (7, 2, 0), (6, 3, 0), (5, 3, 1), (7, 1, 0), (6, 2, 0), (5, 2, 1), (7, 0, 0), (6, 1, 0), (5, 1, 1), (4, 2, 1), (6, 0, 0), (5, 0, 1), (4, 1, 1), (4, 0, 1), (0, 0, 3)]\n",
" vertices = [(0, 0, 3), (6, 0, 0)]\n",
" number of proper faces = 11\n",
" Facet 0: x + 2*z - 6 >= 0\n",
" Facet 1: x >= 0\n",
" Facet 2: y >= 0\n",
" Facet 3: z >= 0\n"
]
}
],
"source": [
"ZF1bt.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": 48,
"id": "72e1d393-5e3d-4453-a7f8-8b67cebc291a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(2*y^2 + z) * (-y^2 + z)^2"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"cF1t = 2*y^6 - 3*y^4*z + z^3\n",
"cF1t.factor()"
]
},
{
"cell_type": "code",
"execution_count": 49,
"id": "4c62a268-6bc1-4470-aa1d-b8feb75f38b7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"NF1t=F1t(z=z+y^2)\n",
"ZNF1t = ZetaFunctions(NF1t)\n",
"ZNF1t.is_newton_degenerated(local=True)"
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "83481949-7133-4292-ad20-516a6dd7db82",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of x^7*y^7 + 7*x^6*y^7 + 18*x^5*y^7 + 20*x^4*y^7 - 3*x^5*y^5*z + 5*x^3*y^7 - 15*x^4*y^5*z + 2*x^3*y^6 - 9*x^2*y^7 - 30*x^3*y^5*z + 3*x^2*y^6 - 8*x*y^7 - 30*x^2*y^5*z - 4*y^7 - 3*x^2*y^4*z - 15*x*y^5*z - 6*x*y^4*z - 6*y^5*z + 3*y^2*z^2 + z^3:\n",
" support points = [(7, 7, 0), (6, 7, 0), (5, 7, 0), (4, 7, 0), (5, 5, 1), (3, 7, 0), (4, 5, 1), (3, 6, 0), (2, 7, 0), (3, 5, 1), (2, 6, 0), (1, 7, 0), (2, 5, 1), (0, 7, 0), (2, 4, 1), (1, 5, 1), (1, 4, 1), (0, 5, 1), (0, 2, 2), (0, 0, 3)]\n",
" vertices = [(0, 0, 3), (0, 2, 2), (2, 6, 0), (0, 7, 0)]\n",
" number of proper faces = 17\n",
" Facet 0: y >= 0\n",
" Facet 1: x >= 0\n",
" Facet 2: x + 2*y + 5*z - 14 >= 0\n",
" Facet 3: y + 2*z - 6 >= 0\n",
" Facet 4: z >= 0\n"
]
}
],
"source": [
"ZNF1t.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": 51,
"id": "fbe580cd-1e04-4020-ac10-ff94f1b5f4fe",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<iframe srcdoc=\"&lt;!DOCTYPE html&gt;\n",
"&lt;html&gt;\n",
"&lt;head&gt;\n",
"&lt;title&gt;&lt;/title&gt;\n",
"&lt;meta charset=&quot;utf-8&quot;&gt;\n",
"&lt;meta name=viewport content=&quot;width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0&quot;&gt;\n",
"&lt;style&gt;\n",
"\n",
" body { margin: 0px; overflow: hidden; }\n",
"\n",
" #menu-container { position: absolute; bottom: 30px; right: 40px; cursor: default; }\n",
"\n",
" #menu-message { position: absolute; bottom: 0px; right: 0px; white-space: nowrap;\n",
" display: none; background-color: #F5F5F5; padding: 10px; }\n",
"\n",
" #menu-content { position: absolute; bottom: 0px; right: 0px;\n",
" display: none; background-color: #F5F5F5; border-bottom: 1px solid black;\n",
" border-right: 1px solid black; border-left: 1px solid black; }\n",
"\n",
" #menu-content div { border-top: 1px solid black; padding: 10px; white-space: nowrap; }\n",
"\n",
" #menu-content div:hover { background-color: #FEFEFE; }\n",
"\n",
" .dark-theme #menu-container { color: white; }\n",
"\n",
" .dark-theme #menu-message { background-color: #181818; }\n",
"\n",
" .dark-theme #menu-content { background-color: #181818; border-color: white; }\n",
"\n",
" .dark-theme #menu-content div { border-color: white; }\n",
"\n",
" .dark-theme #menu-content div:hover { background-color: #303030; }\n",
"\n",
"&lt;/style&gt;\n",
"\n",
"&lt;/head&gt;\n",
"\n",
"&lt;body&gt;\n",
"\n",
"&lt;script src=&quot;/nbextensions/threejs-sage/r122/three.min.js&quot;&gt;&lt;/script&gt;\n",
"&lt;script&gt;\n",
" if ( !window.THREE ) document.write(&#x27; \\\n",
"&lt;script src=&quot;https://cdn.jsdelivr.net/gh/sagemath/threejs-sage@r122/build/three.min.js&quot;&gt;&lt;\\/script&gt; \\\n",
" &#x27;);\n",
"&lt;/script&gt;\n",
" \n",
"&lt;script&gt;\n",
"\n",
" var options = {&quot;animate&quot;: false, &quot;animationControls&quot;: true, &quot;aspectRatio&quot;: [1.0, 1.0, 1.0], &quot;autoScaling&quot;: [false, false, false], &quot;autoPlay&quot;: true, &quot;axes&quot;: false, &quot;axesLabels&quot;: [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;], &quot;axesLabelsStyle&quot;: null, &quot;decimals&quot;: 2, &quot;delay&quot;: 20, &quot;frame&quot;: true, &quot;loop&quot;: true, &quot;projection&quot;: &quot;perspective&quot;, &quot;theme&quot;: &quot;light&quot;, &quot;viewpoint&quot;: false};\n",
" var animate = options.animate;\n",
"\n",
" if ( options.theme === &#x27;dark&#x27; )\n",
" document.body.className = &#x27;dark-theme&#x27;;\n",
"\n",
" var scene = new THREE.Scene();\n",
"\n",
" var renderer = new THREE.WebGLRenderer( { antialias: true, preserveDrawingBuffer: true } );\n",
" renderer.setPixelRatio( window.devicePixelRatio );\n",
" renderer.setSize( window.innerWidth, window.innerHeight );\n",
" renderer.setClearColor( options.theme === &#x27;dark&#x27; ? 0 : 0xffffff, 1 );\n",
" document.body.appendChild( renderer.domElement );\n",
"\n",
" var b = [{&quot;x&quot;:-0.05706339097770922, &quot;y&quot;:-0.048541019662496854, &quot;z&quot;:-0.05999999999999995}, {&quot;x&quot;:7.0, &quot;y&quot;:8.0, &quot;z&quot;:4.0}]; // bounds\n",
"\n",
" if ( b[0].x === b[1].x ) {\n",
" b[0].x -= 1;\n",
" b[1].x += 1;\n",
" }\n",
" if ( b[0].y === b[1].y ) {\n",
" b[0].y -= 1;\n",
" b[1].y += 1;\n",
" }\n",
" if ( b[0].z === b[1].z ) {\n",
" b[0].z -= 1;\n",
" b[1].z += 1;\n",
" }\n",
"\n",
" var rxRange = Math.sqrt( Math.pow( b[1].z - b[0].z, 2 )\n",
" + Math.pow( b[1].y - b[0].y, 2 ) );\n",
" var ryRange = Math.sqrt( Math.pow( b[1].x - b[0].x, 2 )\n",
" + Math.pow( b[1].z - b[0].z, 2 ) );\n",
" var rzRange = Math.sqrt( Math.pow( b[1].x - b[0].x, 2 )\n",
" + Math.pow( b[1].y - b[0].y, 2 ) );\n",
" var xRange = b[1].x - b[0].x;\n",
" var yRange = b[1].y - b[0].y;\n",
" var zRange = b[1].z - b[0].z;\n",
"\n",
" var ar = options.aspectRatio;\n",
" var a = [ ar[0], ar[1], ar[2] ]; // aspect multipliers\n",
"\n",
" var autoScaling = options.autoScaling;\n",
" var autoAspect = 2.5;\n",
" if ( xRange &gt; autoAspect * rxRange &amp;&amp; autoScaling[0] ) a[0] = autoAspect * rxRange / xRange;\n",
" if ( yRange &gt; autoAspect * ryRange &amp;&amp; autoScaling[1] ) a[1] = autoAspect * ryRange / yRange;\n",
" if ( zRange &gt; autoAspect * rzRange &amp;&amp; autoScaling[2] ) a[2] = autoAspect * rzRange / zRange;\n",
"\n",
" // Distance from (xMid,yMid,zMid) to any corner of the bounding box, after applying aspectRatio\n",
" var midToCorner = Math.sqrt( a[0]*a[0]*xRange*xRange + a[1]*a[1]*yRange*yRange + a[2]*a[2]*zRange*zRange ) / 2;\n",
"\n",
" var xMid = ( b[0].x + b[1].x ) / 2;\n",
" var yMid = ( b[0].y + b[1].y ) / 2;\n",
" var zMid = ( b[0].z + b[1].z ) / 2;\n",
"\n",
" var box = new THREE.Geometry();\n",
" box.vertices.push( new THREE.Vector3( a[0]*b[0].x, a[1]*b[0].y, a[2]*b[0].z ) );\n",
" box.vertices.push( new THREE.Vector3( a[0]*b[1].x, a[1]*b[1].y, a[2]*b[1].z ) );\n",
" var boxMesh = new THREE.Line( box );\n",
" var boxColor = options.theme === &#x27;dark&#x27; ? &#x27;white&#x27; : &#x27;black&#x27;;\n",
" if ( options.frame ) scene.add( new THREE.BoxHelper( boxMesh, boxColor ) );\n",
"\n",
" if ( options.axesLabels ) {\n",
"\n",
" var d = options.decimals; // decimals\n",
" var offsetRatio = 0.1;\n",
" var al = options.axesLabels;\n",
" var als = options.axesLabelsStyle || [{}, {}, {}];\n",
"\n",
" var offset = offsetRatio * a[1]*( b[1].y - b[0].y );\n",
" var xm = xMid.toFixed(d);\n",
" if ( /^-0.?0*$/.test(xm) ) xm = xm.substr(1);\n",
" addLabel( al[0] + &#x27;=&#x27; + xm, a[0]*xMid, a[1]*b[1].y+offset, a[2]*b[0].z, als[0] );\n",
" addLabel( ( b[0].x ).toFixed(d), a[0]*b[0].x, a[1]*b[1].y+offset, a[2]*b[0].z, als[0] );\n",
" addLabel( ( b[1].x ).toFixed(d), a[0]*b[1].x, a[1]*b[1].y+offset, a[2]*b[0].z, als[0] );\n",
"\n",
" var offset = offsetRatio * a[0]*( b[1].x - b[0].x );\n",
" var ym = yMid.toFixed(d);\n",
" if ( /^-0.?0*$/.test(ym) ) ym = ym.substr(1);\n",
" addLabel( al[1] + &#x27;=&#x27; + ym, a[0]*b[1].x+offset, a[1]*yMid, a[2]*b[0].z, als[1] );\n",
" addLabel( ( b[0].y ).toFixed(d), a[0]*b[1].x+offset, a[1]*b[0].y, a[2]*b[0].z, als[1] );\n",
" addLabel( ( b[1].y ).toFixed(d), a[0]*b[1].x+offset, a[1]*b[1].y, a[2]*b[0].z, als[1] );\n",
"\n",
" var offset = offsetRatio * a[1]*( b[1].y - b[0].y );\n",
" var zm = zMid.toFixed(d);\n",
" if ( /^-0.?0*$/.test(zm) ) zm = zm.substr(1);\n",
" addLabel( al[2] + &#x27;=&#x27; + zm, a[0]*b[1].x, a[1]*b[0].y-offset, a[2]*zMid, als[2] );\n",
" addLabel( ( b[0].z ).toFixed(d), a[0]*b[1].x, a[1]*b[0].y-offset, a[2]*b[0].z, als[2] );\n",
" addLabel( ( b[1].z ).toFixed(d), a[0]*b[1].x, a[1]*b[0].y-offset, a[2]*b[1].z, als[2] );\n",
"\n",
" }\n",
"\n",
" function addLabel( text, x, y, z, style ) {\n",
"\n",
" var color = style.color || &#x27;black&#x27;;\n",
" var fontSize = style.fontSize || 14;\n",
" var fontFamily = style.fontFamily || &#x27;monospace&#x27;;\n",
" var fontStyle = style.fontStyle || &#x27;normal&#x27;;\n",
" var fontWeight = style.fontWeight || &#x27;normal&#x27;;\n",
" var opacity = style.opacity || 1;\n",
"\n",
" if ( options.theme === &#x27;dark&#x27; )\n",
" if ( color === &#x27;black&#x27; || color === &#x27;#000000&#x27; )\n",
" color = &#x27;white&#x27;;\n",
"\n",
" if ( Array.isArray( fontStyle ) ) {\n",
" fontFamily = fontFamily.map( function( f ) {\n",
" // Need to put quotes around fonts that have whitespace in their names.\n",
" return /\\s/.test( f ) ? &#x27;&quot;&#x27; + f + &#x27;&quot;&#x27; : f;\n",
" }).join(&#x27;, &#x27;);\n",
" }\n",
"\n",
" var canvas = document.createElement( &#x27;canvas&#x27; );\n",
" var context = canvas.getContext( &#x27;2d&#x27; );\n",
" var pixelRatio = Math.round( window.devicePixelRatio );\n",
"\n",
" // For example: italic bold 20px &quot;Times New Roman&quot;, Georgia, serif\n",
" var font = [fontStyle, fontWeight, fontSize + &#x27;px&#x27;, fontFamily].join(&#x27; &#x27;);\n",
"\n",
" context.font = font;\n",
" var width = context.measureText( text ).width;\n",
" var height = fontSize;\n",
"\n",
" // The dimensions of the canvas&#x27;s underlying image data need to be powers\n",
" // of two in order for the resulting texture to support mipmapping.\n",
" canvas.width = THREE.MathUtils.ceilPowerOfTwo( width * pixelRatio );\n",
" canvas.height = THREE.MathUtils.ceilPowerOfTwo( height * pixelRatio );\n",
"\n",
" // Re-compute the unscaled dimensions after the power of two conversion.\n",
" width = canvas.width / pixelRatio;\n",
" height = canvas.height / pixelRatio;\n",
"\n",
" canvas.style.width = width + &#x27;px&#x27;;\n",
" canvas.style.height = height + &#x27;px&#x27;;\n",
"\n",
" context.scale( pixelRatio, pixelRatio );\n",
" context.fillStyle = color;\n",
" context.font = font; // Must be set again after measureText.\n",
" context.textAlign = &#x27;center&#x27;;\n",
" context.textBaseline = &#x27;middle&#x27;;\n",
" context.fillText( text, width/2, height/2 );\n",
"\n",
" var texture = new THREE.Texture( canvas );\n",
" texture.needsUpdate = true;\n",
"\n",
" var materialOptions = { map: texture, sizeAttenuation: false, depthWrite: false };\n",
" if ( opacity &lt; 1 ) {\n",
" // Setting opacity=1 would cause the texture&#x27;s alpha component to be\n",
" // discarded, giving the text a black background instead of the\n",
" // background being transparent.\n",
" materialOptions.opacity = opacity;\n",
" }\n",
" var sprite = new THREE.Sprite( new THREE.SpriteMaterial( materialOptions ) );\n",
" sprite.position.set( x, y, z );\n",
"\n",
" // Scaling factor, chosen somewhat arbitrarily so that the size of the text\n",
" // is consistent with previously generated plots.\n",
" var scale = 1/625;\n",
" if ( options.projection === &#x27;orthographic&#x27; ) {\n",
" scale = midToCorner/256; // Needs to scale along with the plot itself.\n",
" }\n",
" sprite.scale.set( scale * width, scale * height, 1 );\n",
"\n",
" scene.add( sprite );\n",
"\n",
" return sprite;\n",
"\n",
" }\n",
"\n",
" if ( options.axes ) scene.add( new THREE.AxesHelper( Math.min( a[0]*b[1].x, a[1]*b[1].y, a[2]*b[1].z ) ) );\n",
"\n",
" var camera = createCamera();\n",
" camera.up.set( 0, 0, 1 );\n",
" camera.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );\n",
"\n",
" // camera is positioned so that the line from the camera to the center\n",
" // of the bounding sphere of the objects makes an angle of 60 degrees with x-axis\n",
" // and an angle of 30 degrees with z-axis and the field of view of the camera looking\n",
" // at the center has an angle of 45 degrees.\n",
" const sin8 = Math.sin(Math.PI / 8);\n",
" const sin5 = Math.sin(Math.PI / 5);\n",
" const cos5 = Math.cos(Math.PI / 5);\n",
" const sin3 = Math.sin(Math.PI / 3);\n",
" const cos3 = Math.cos(Math.PI / 3);\n",
" var r = midToCorner / sin8;\n",
" var offset = new THREE.Vector3( r * sin3 * cos5, r * sin3 * sin5, r * cos3 );\n",
"\n",
" if ( options.viewpoint ) {\n",
"\n",
" var aa = options.viewpoint;\n",
" var axis = new THREE.Vector3( aa[0][0], aa[0][1], aa[0][2] ).normalize();\n",
" var angle = aa[1] * Math.PI / 180;\n",
" var q = new THREE.Quaternion().setFromAxisAngle( axis, angle ).inverse();\n",
"\n",
" offset.set( 0, 0, offset.length() );\n",
" offset.applyQuaternion( q );\n",
"\n",
" }\n",
"\n",
" camera.position.add( offset );\n",
"\n",
" function createCamera() {\n",
"\n",
" var aspect = window.innerWidth / window.innerHeight;\n",
"\n",
" // Scale the near and far clipping planes along with the overall plot size.\n",
" var nearClip = 0.01 * midToCorner;\n",
" var farClip = 100 * midToCorner;\n",
"\n",
" if ( options.projection === &#x27;orthographic&#x27; ) {\n",
" var camera = new THREE.OrthographicCamera( -1, 1, 1, -1, -farClip, farClip );\n",
" updateCameraAspect( camera, aspect );\n",
" return camera;\n",
" }\n",
"\n",
" return new THREE.PerspectiveCamera( 45, aspect, nearClip, farClip );\n",
"\n",
" }\n",
"\n",
" function updateCameraAspect( camera, aspect ) {\n",
"\n",
" if ( camera.isPerspectiveCamera ) {\n",
" camera.aspect = aspect;\n",
" } else if ( camera.isOrthographicCamera ) {\n",
" // Fit the camera frustum to the bounding box&#x27;s diagonal so that the entire plot fits\n",
" // within at the default zoom level and camera position.\n",
" if ( aspect &gt; 1 ) { // Wide window\n",
" camera.top = midToCorner;\n",
" camera.right = midToCorner * aspect;\n",
" } else { // Tall or square window\n",
" camera.top = midToCorner / aspect;\n",
" camera.right = midToCorner;\n",
" }\n",
" camera.bottom = -camera.top;\n",
" camera.left = -camera.right;\n",
" }\n",
"\n",
" camera.updateProjectionMatrix();\n",
"\n",
" }\n",
"\n",
" var lights = [{&quot;x&quot;:-5, &quot;y&quot;:3, &quot;z&quot;:0, &quot;color&quot;:&quot;#7f7f7f&quot;, &quot;parent&quot;:&quot;camera&quot;}];\n",
" for ( var i=0 ; i &lt; lights.length ; i++ ) {\n",
" var light = new THREE.DirectionalLight( lights[i].color, 1 );\n",
" light.position.set( a[0]*lights[i].x, a[1]*lights[i].y, a[2]*lights[i].z );\n",
" if ( lights[i].parent === &#x27;camera&#x27; ) {\n",
" light.target.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );\n",
" scene.add( light.target );\n",
" camera.add( light );\n",
" } else scene.add( light );\n",
" }\n",
" scene.add( camera );\n",
"\n",
" var ambient = {&quot;color&quot;:&quot;#7f7f7f&quot;};\n",
" scene.add( new THREE.AmbientLight( ambient.color, 1 ) );\n",
"\n",
" var controls = new THREE.OrbitControls( camera, renderer.domElement );\n",
" controls.target.set( a[0]*xMid, a[1]*yMid, a[2]*zMid );\n",
" controls.addEventListener( &#x27;change&#x27;, function() { if ( !animate ) render(); } );\n",
"\n",
" window.addEventListener( &#x27;resize&#x27;, function() {\n",
"\n",
" renderer.setSize( window.innerWidth, window.innerHeight );\n",
" updateCameraAspect( camera, window.innerWidth / window.innerHeight );\n",
" if ( window.rescaleFatLines ) rescaleFatLines();\n",
" if ( !animate ) render();\n",
"\n",
" } );\n",
"\n",
" var texts = [];\n",
" for ( var i=0 ; i &lt; texts.length ; i++ ) addText( texts[i] );\n",
"\n",
" function addText( json ) {\n",
" var sprite = addLabel( json.text, a[0]*json.x, a[1]*json.y, a[2]*json.z, json );\n",
" sprite.userData = json;\n",
" }\n",
"\n",
" var points = [{&quot;point&quot;: [0.0, 0.0, 3.0], &quot;size&quot;: 10.0, &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 2.0, 2.0], &quot;size&quot;: 10.0, &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [2.0, 6.0, 0.0], &quot;size&quot;: 10.0, &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 7.0, 0.0], &quot;size&quot;: 10.0, &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [7.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [6.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [5.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [4.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [5.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [3.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [4.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [3.0, 6.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [2.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [3.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [2.0, 6.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [1.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [2.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 7.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [2.0, 4.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [1.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [1.0, 4.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 5.0, 1.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 2.0, 2.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 0.0, 3.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#ff0000&quot;, &quot;opacity&quot;: 1.0}, {&quot;point&quot;: [0.0, 0.0, 0.0], &quot;size&quot;: 30.0, &quot;color&quot;: &quot;#000000&quot;, &quot;opacity&quot;: 1.0}];\n",
" for ( var i=0 ; i &lt; points.length ; i++ ) addPoint( points[i] );\n",
"\n",
" function addPoint( json ) {\n",
"\n",
" var geometry = new THREE.Geometry();\n",
" var v = json.point;\n",
" geometry.vertices.push( new THREE.Vector3( a[0]*v[0], a[1]*v[1], a[2]*v[2] ) );\n",
"\n",
" var canvas = document.createElement( &#x27;canvas&#x27; );\n",
" canvas.width = 128;\n",
" canvas.height = 128;\n",
"\n",
" var context = canvas.getContext( &#x27;2d&#x27; );\n",
" context.arc( 64, 64, 64, 0, 2 * Math.PI );\n",
" context.fillStyle = json.color;\n",
" context.fill();\n",
"\n",
" var texture = new THREE.Texture( canvas );\n",
" texture.needsUpdate = true;\n",
"\n",
" var transparent = json.opacity &lt; 1 ? true : false;\n",
" var size = camera.isOrthographicCamera ? json.size : json.size/100;\n",
" var material = new THREE.PointsMaterial( { size: size, map: texture,\n",
" transparent: transparent, opacity: json.opacity,\n",
" alphaTest: .1 } );\n",
"\n",
" var c = new THREE.Vector3();\n",
" geometry.computeBoundingBox();\n",
" geometry.boundingBox.getCenter( c );\n",
" geometry.translate( -c.x, -c.y, -c.z );\n",
"\n",
" var mesh = new THREE.Points( geometry, material );\n",
" mesh.position.set( c.x, c.y, c.z );\n",
" mesh.userData = json;\n",
" scene.add( mesh );\n",
"\n",
" }\n",
"\n",
" var lines = [{&quot;points&quot;: [[0.0, 0.0, 3.0], [0.0, 2.0, 2.0]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;points&quot;: [[0.0, 2.0, 2.0], [2.0, 6.0, 0.0]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;points&quot;: [[0.0, 2.0, 2.0], [0.0, 7.0, 0.0]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;points&quot;: [[2.0, 6.0, 0.0], [0.0, 7.0, 0.0]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}];\n",
" for ( var i=0 ; i &lt; lines.length ; i++ ) addLine( lines[i] );\n",
"\n",
" function addLine( json ) {\n",
"\n",
" var geometry = new THREE.Geometry();\n",
" for ( var i=0 ; i &lt; json.points.length ; i++ ) {\n",
" var v = json.points[i];\n",
" geometry.vertices.push( new THREE.Vector3( a[0]*v[0], a[1]*v[1], a[2]*v[2] ) );\n",
" }\n",
"\n",
" var c = new THREE.Vector3();\n",
" geometry.computeBoundingBox();\n",
" geometry.boundingBox.getCenter( c );\n",
" geometry.translate( -c.x, -c.y, -c.z );\n",
"\n",
" var transparent = json.opacity &lt; 1 ? true : false;\n",
" var materialOptions = { color: json.color, linewidth: json.linewidth,\n",
" transparent: transparent, opacity: json.opacity };\n",
"\n",
" var mesh;\n",
" if ( json.linewidth &gt; 1 &amp;&amp; window.createFatLineStrip ) {\n",
" mesh = createFatLineStrip( geometry, materialOptions );\n",
" } else {\n",
" var material = new THREE.LineBasicMaterial( materialOptions );\n",
" mesh = new THREE.Line( geometry, material );\n",
" }\n",
"\n",
" mesh.position.set( c.x, c.y, c.z );\n",
" mesh.userData = json;\n",
" scene.add( mesh );\n",
"\n",
" }\n",
"\n",
" var surfaces = [{&quot;vertices&quot;: [{&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.019021130325903073, &quot;y&quot;: 0.006180339887498949, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.02, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.011755705045849465, &quot;y&quot;: -0.016180339887498948, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: -0.011755705045849461, &quot;y&quot;: -0.01618033988749895, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: -0.019021130325903073, &quot;y&quot;: 0.006180339887498945, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.019021130325903073, &quot;y&quot;: 0.006180339887498949, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.02, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.011755705045849465, &quot;y&quot;: -0.016180339887498948, &quot;z&quot;: 3.0}, {&quot;x&quot;: -0.011755705045849461, &quot;y&quot;: -0.01618033988749895, &quot;z&quot;: 3.0}, {&quot;x&quot;: -0.019021130325903073, &quot;y&quot;: 0.006180339887498945, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6, 7], [1, 3, 8, 6], [3, 4, 9, 8], [4, 5, 10, 9], [5, 2, 7, 10], [7, 6, 11], [6, 8, 11], [8, 9, 11], [9, 10, 11], [10, 7, 11]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 4.0}, {&quot;x&quot;: 0.05706339097770921, &quot;y&quot;: 0.018541019662496848, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.06, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.03526711513754839, &quot;y&quot;: -0.04854101966249684, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: -0.03526711513754838, &quot;y&quot;: -0.048541019662496854, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: -0.05706339097770922, &quot;y&quot;: 0.018541019662496834, &quot;z&quot;: 3.8200000000000003}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.8200000000000003}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6], [1, 3, 6], [3, 4, 6], [4, 5, 6], [5, 2, 6]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.006180339887498949, &quot;z&quot;: 2.980978869674097}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.02, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: -0.016180339887498948, &quot;z&quot;: 2.988244294954151}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: -0.01618033988749895, &quot;z&quot;: 3.0117557050458497}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.006180339887498945, &quot;z&quot;: 3.019021130325903}, {&quot;x&quot;: 1.1647083184890924e-18, &quot;y&quot;: 0.006180339887498949, &quot;z&quot;: 2.980978869674097}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.02, &quot;z&quot;: 3.0}, {&quot;x&quot;: 7.198293278059968e-19, &quot;y&quot;: -0.016180339887498948, &quot;z&quot;: 2.9882442949541503}, {&quot;x&quot;: -7.198293278059966e-19, &quot;y&quot;: -0.01618033988749895, &quot;z&quot;: 3.0117557050458497}, {&quot;x&quot;: -1.1647083184890924e-18, &quot;y&quot;: 0.006180339887498945, &quot;z&quot;: 3.019021130325903}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6, 7], [1, 3, 8, 6], [3, 4, 9, 8], [4, 5, 10, 9], [5, 2, 7, 10], [7, 6, 11], [6, 8, 11], [8, 9, 11], [9, 10, 11], [10, 7, 11]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 1.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.018541019662496848, &quot;z&quot;: 2.942936609022291}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.06, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: -0.04854101966249684, &quot;z&quot;: 2.9647328848624515}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: -0.048541019662496854, &quot;z&quot;: 3.0352671151375485}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.018541019662496834, &quot;z&quot;: 3.057063390977709}, {&quot;x&quot;: 0.8200000000000001, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6], [1, 3, 6], [3, 4, 6], [4, 5, 6], [5, 2, 6]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.0, &quot;z&quot;: 5.021051876504149e-17}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.006180339887499, &quot;z&quot;: -0.019021130325903024}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.02, &quot;z&quot;: 5.021051876504149e-17}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 5.983819660112501, &quot;z&quot;: -0.011755705045849415}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 5.983819660112501, &quot;z&quot;: 0.011755705045849512}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.006180339887499, &quot;z&quot;: 0.01902113032590312}, {&quot;x&quot;: 2.0, &quot;y&quot;: 6.006180339887499, &quot;z&quot;: -0.019021130325903073}, {&quot;x&quot;: 2.0, &quot;y&quot;: 6.02, &quot;z&quot;: 0.0}, {&quot;x&quot;: 2.0, &quot;y&quot;: 5.983819660112501, &quot;z&quot;: -0.011755705045849465}, {&quot;x&quot;: 2.0, &quot;y&quot;: 5.983819660112501, &quot;z&quot;: 0.011755705045849461}, {&quot;x&quot;: 2.0, &quot;y&quot;: 6.006180339887499, &quot;z&quot;: 0.019021130325903073}, {&quot;x&quot;: 2.0, &quot;y&quot;: 6.0, &quot;z&quot;: 0.0}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6, 7], [1, 3, 8, 6], [3, 4, 9, 8], [4, 5, 10, 9], [5, 2, 7, 10], [7, 6, 11], [6, 8, 11], [8, 9, 11], [9, 10, 11], [10, 7, 11]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 3.0000000000000004, &quot;y&quot;: 6.0, &quot;z&quot;: 6.123233995736767e-17}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.018541019662496, &quot;z&quot;: -0.05706339097770916}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.06, &quot;z&quot;: 5.021051876504149e-17}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 5.951458980337503, &quot;z&quot;: -0.03526711513754834}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 5.951458980337503, &quot;z&quot;: 0.035267115137548426}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.018541019662496, &quot;z&quot;: 0.057063390977709266}, {&quot;x&quot;: 2.8200000000000003, &quot;y&quot;: 6.0, &quot;z&quot;: 5.021051876504149e-17}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6], [1, 3, 6], [3, 4, 6], [4, 5, 6], [5, 2, 6]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 0.0, &quot;y&quot;: 7.82, &quot;z&quot;: 5.021051876504149e-17}, {&quot;x&quot;: 0.019021130325903073, &quot;y&quot;: 7.82, &quot;z&quot;: -0.006180339887498899}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.82, &quot;z&quot;: -0.019999999999999952}, {&quot;x&quot;: 0.011755705045849465, &quot;y&quot;: 7.82, &quot;z&quot;: 0.016180339887498996}, {&quot;x&quot;: -0.011755705045849461, &quot;y&quot;: 7.82, &quot;z&quot;: 0.016180339887499}, {&quot;x&quot;: -0.019021130325903073, &quot;y&quot;: 7.82, &quot;z&quot;: -0.006180339887498895}, {&quot;x&quot;: 0.019021130325903073, &quot;y&quot;: 7.0, &quot;z&quot;: -0.006180339887498949}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.0, &quot;z&quot;: -0.02}, {&quot;x&quot;: 0.011755705045849465, &quot;y&quot;: 7.0, &quot;z&quot;: 0.016180339887498948}, {&quot;x&quot;: -0.011755705045849461, &quot;y&quot;: 7.0, &quot;z&quot;: 0.01618033988749895}, {&quot;x&quot;: -0.019021130325903073, &quot;y&quot;: 7.0, &quot;z&quot;: -0.006180339887498945}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.0, &quot;z&quot;: 0.0}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6, 7], [1, 3, 8, 6], [3, 4, 9, 8], [4, 5, 10, 9], [5, 2, 7, 10], [7, 6, 11], [6, 8, 11], [8, 9, 11], [9, 10, 11], [10, 7, 11]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 0.0, &quot;y&quot;: 8.0, &quot;z&quot;: 6.123233995736767e-17}, {&quot;x&quot;: 0.05706339097770921, &quot;y&quot;: 7.82, &quot;z&quot;: -0.0185410196624968}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.82, &quot;z&quot;: -0.05999999999999995}, {&quot;x&quot;: 0.03526711513754839, &quot;y&quot;: 7.82, &quot;z&quot;: 0.04854101966249689}, {&quot;x&quot;: -0.03526711513754838, &quot;y&quot;: 7.82, &quot;z&quot;: 0.0485410196624969}, {&quot;x&quot;: -0.05706339097770922, &quot;y&quot;: 7.82, &quot;z&quot;: -0.018541019662496785}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.82, &quot;z&quot;: 5.021051876504149e-17}], &quot;faces&quot;: [[0, 1, 2], [0, 3, 1], [0, 4, 3], [0, 5, 4], [0, 2, 5], [2, 1, 6], [1, 3, 6], [3, 4, 6], [4, 5, 6], [5, 2, 6]], &quot;color&quot;: &quot;#0000ff&quot;, &quot;opacity&quot;: 1.0, &quot;linewidth&quot;: 1.0}, {&quot;vertices&quot;: [{&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 2.0, &quot;z&quot;: 2.0}, {&quot;x&quot;: 2.0, &quot;y&quot;: 6.0, &quot;z&quot;: 0.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 7.0, &quot;z&quot;: 0.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 0.0, &quot;z&quot;: 4.0}, {&quot;x&quot;: 1.0, &quot;y&quot;: 0.0, &quot;z&quot;: 3.0}, {&quot;x&quot;: 3.0, &quot;y&quot;: 6.0, &quot;z&quot;: 0.0}, {&quot;x&quot;: 0.0, &quot;y&quot;: 8.0, &quot;z&quot;: 0.0}], &quot;faces&quot;: [[7, 3, 2, 6], [6, 5, 0, 1, 2], [2, 1, 3], [4, 0, 1, 3, 7], [5, 0, 4]], &quot;color&quot;: &quot;#008000&quot;, &quot;opacity&quot;: 1.0, &quot;useFlatShading&quot;: true}];\n",
" for ( var i=0 ; i &lt; surfaces.length ; i++ ) addSurface( surfaces[i] );\n",
"\n",
" function addSurface( json ) {\n",
"\n",
" var useFaceColors = &#x27;faceColors&#x27; in json ? true : false;\n",
"\n",
" var geometry = new THREE.Geometry();\n",
" for ( var i=0 ; i &lt; json.vertices.length ; i++ ) {\n",
" var v = json.vertices[i];\n",
" geometry.vertices.push( new THREE.Vector3( a[0]*v.x, a[1]*v.y, a[2]*v.z ) );\n",
" }\n",
" for ( var i=0 ; i &lt; json.faces.length ; i++ ) {\n",
" var f = json.faces[i];\n",
" for ( var j=0 ; j &lt; f.length - 2 ; j++ ) {\n",
" var face = new THREE.Face3( f[0], f[j+1], f[j+2] );\n",
" if ( useFaceColors ) face.color.set( json.faceColors[i] );\n",
" geometry.faces.push( face );\n",
" }\n",
" }\n",
" geometry.computeVertexNormals();\n",
"\n",
" var side = json.singleSide ? THREE.FrontSide : THREE.DoubleSide;\n",
" var transparent = json.opacity &lt; 1 ? true : false;\n",
" var depthWrite = &#x27;depthWrite&#x27; in json ? json.depthWrite : !transparent;\n",
" var flatShading = json.useFlatShading ? json.useFlatShading : false;\n",
"\n",
" var material = new THREE.MeshPhongMaterial( { side: side,\n",
" color: useFaceColors ? &#x27;white&#x27; : json.color,\n",
" vertexColors: useFaceColors ? THREE.FaceColors : THREE.NoColors,\n",
" transparent: transparent, opacity: json.opacity,\n",
" shininess: 20, flatShading: flatShading,\n",
" depthWrite: depthWrite } );\n",
"\n",
" var c = new THREE.Vector3();\n",
" geometry.computeBoundingBox();\n",
" geometry.boundingBox.getCenter( c );\n",
" geometry.translate( -c.x, -c.y, -c.z );\n",
"\n",
" var mesh = new THREE.Mesh( geometry, material );\n",
" mesh.position.set( c.x, c.y, c.z );\n",
" if ( transparent &amp;&amp; json.renderOrder ) mesh.renderOrder = json.renderOrder;\n",
" mesh.userData = json;\n",
" scene.add( mesh );\n",
"\n",
" if ( json.showMeshGrid ) addSurfaceMeshGrid( json );\n",
"\n",
" }\n",
"\n",
" function addSurfaceMeshGrid( json ) {\n",
"\n",
" var geometry = new THREE.Geometry();\n",
"\n",
" for ( var i=0 ; i &lt; json.faces.length ; i++ ) {\n",
" var f = json.faces[i];\n",
" for ( var j=0 ; j &lt; f.length ; j++ ) {\n",
" var k = j === f.length-1 ? 0 : j+1;\n",
" var v1 = json.vertices[f[j]];\n",
" var v2 = json.vertices[f[k]];\n",
" // vertices in opposite directions on neighboring faces\n",
" var nudge = f[j] &lt; f[k] ? .0005*zRange : -.0005*zRange;\n",
" geometry.vertices.push( new THREE.Vector3( a[0]*v1.x, a[1]*v1.y, a[2]*(v1.z+nudge) ) );\n",
" geometry.vertices.push( new THREE.Vector3( a[0]*v2.x, a[1]*v2.y, a[2]*(v2.z+nudge) ) );\n",
" }\n",
" }\n",
"\n",
" var c = new THREE.Vector3();\n",
" geometry.computeBoundingBox();\n",
" geometry.boundingBox.getCenter( c );\n",
" geometry.translate( -c.x, -c.y, -c.z );\n",
"\n",
" var gridColor = options.theme === &#x27;dark&#x27; ? &#x27;white&#x27; : &#x27;black&#x27;;\n",
" var linewidth = json.linewidth || 1;\n",
" var materialOptions = { color: gridColor, linewidth: linewidth };\n",
"\n",
" var mesh;\n",
" if ( linewidth &gt; 1 &amp;&amp; window.createFatLineSegments ) {\n",
" mesh = createFatLineSegments( geometry, materialOptions );\n",
" } else {\n",
" var material = new THREE.LineBasicMaterial( materialOptions );\n",
" mesh = new THREE.LineSegments( geometry, material );\n",
" }\n",
"\n",
" mesh.position.set( c.x, c.y, c.z );\n",
" mesh.userData = json;\n",
" scene.add( mesh );\n",
"\n",
" }\n",
"\n",
" function render() {\n",
"\n",
" if ( window.updateAnimation ) animate = updateAnimation();\n",
" if ( animate ) requestAnimationFrame( render );\n",
"\n",
" renderer.render( scene, camera );\n",
"\n",
" }\n",
"\n",
" render();\n",
" controls.update();\n",
" if ( !animate ) render();\n",
"\n",
"\n",
" // menu functions\n",
"\n",
" function toggleMenu() {\n",
"\n",
" var m = document.getElementById( &#x27;menu-content&#x27; );\n",
" if ( m.style.display === &#x27;block&#x27; ) m.style.display = &#x27;none&#x27;\n",
" else m.style.display = &#x27;block&#x27;;\n",
"\n",
" }\n",
"\n",
"\n",
" function saveAsPNG() {\n",
"\n",
" var a = document.body.appendChild( document.createElement( &#x27;a&#x27; ) );\n",
" a.href = renderer.domElement.toDataURL( &#x27;image/png&#x27; );\n",
" a.download = &#x27;screenshot&#x27;;\n",
" a.click();\n",
"\n",
" }\n",
"\n",
" function saveAsHTML() {\n",
"\n",
" toggleMenu(); // otherwise visible in output\n",
" event.stopPropagation();\n",
"\n",
" var blob = new Blob( [ &#x27;&lt;!DOCTYPE html&gt;\\n&#x27; + document.documentElement.outerHTML ] );\n",
" var a = document.body.appendChild( document.createElement( &#x27;a&#x27; ) );\n",
" a.href = window.URL.createObjectURL( blob );\n",
" a.download = suggestFilename();\n",
" a.click();\n",
"\n",
" function suggestFilename() {\n",
" if ( !document.title ) {\n",
" return &#x27;graphic.html&#x27;;\n",
" } else if ( /\\.html?$/i.test( document.title ) ) {\n",
" return document.title; // already ends in .htm or .html\n",
" } else {\n",
" return document.title + &#x27;.html&#x27;;\n",
" }\n",
" }\n",
"\n",
" }\n",
"\n",
" function getViewpoint() {\n",
"\n",
" function roundTo( x, n ) { return +x.toFixed(n); }\n",
"\n",
" var v = camera.quaternion.inverse();\n",
" var r = Math.sqrt( v.x*v.x + v.y*v.y + v.z*v.z );\n",
" var axis = [ roundTo( v.x / r, 4 ), roundTo( v.y / r, 4 ), roundTo( v.z / r, 4 ) ];\n",
" var angle = roundTo( 2 * Math.atan2( r, v.w ) * 180 / Math.PI, 2 );\n",
"\n",
" var textArea = document.createElement( &#x27;textarea&#x27; );\n",
" textArea.textContent = JSON.stringify( axis ) + &#x27;,&#x27; + angle;\n",
" textArea.style.csstext = &#x27;position: absolute; top: -100%&#x27;;\n",
" document.body.append( textArea );\n",
" textArea.select();\n",
" document.execCommand( &#x27;copy&#x27; );\n",
"\n",
" var m = document.getElementById( &#x27;menu-message&#x27; );\n",
" m.innerHTML = &#x27;Viewpoint copied to clipboard&#x27;;\n",
" m.style.display = &#x27;block&#x27;;\n",
" setTimeout( function() { m.style.display = &#x27;none&#x27;; }, 2000 );\n",
"\n",
" }\n",
"\n",
" function getCamera() {\n",
"\n",
" function roundTo( x, n ) { return +x.toFixed(n); }\n",
"\n",
" var pos = camera.position;\n",
" var pos_r = [ roundTo( pos.x, 4 ), roundTo( pos.y, 4 ), roundTo( pos.z, 4 ) ];\n",
" // var up = camera.up; // up is always (0,0,1)\n",
" var textArea = document.createElement(&#x27;textarea&#x27;);\n",
" var cam_position = JSON.stringify(pos_r);\n",
" textArea.textContent = &#x27;,camera_position=&#x27; + cam_position;\n",
" textArea.style.csstext = &#x27;position: absolute; top: -100%&#x27;;\n",
" document.body.append( textArea );\n",
" textArea.select();\n",
" document.execCommand( &#x27;copy&#x27; );\n",
"\n",
" var m = document.getElementById( &#x27;menu-message&#x27; );\n",
" m.innerHTML = &#x27;Camera position &#x27;+ cam_position+&#x27; copied to clipboard&#x27;;\n",
" m.style.display = &#x27;block&#x27;;\n",
" setTimeout( function() { m.style.display = &#x27;none&#x27;; }, 2000 );\n",
"\n",
" }\n",
"\n",
"&lt;/script&gt;\n",
"\n",
"&lt;div id=&quot;menu-container&quot; onclick=&quot;toggleMenu()&quot;&gt;&amp;#x24d8;\n",
"&lt;div id=&quot;menu-message&quot;&gt;&lt;/div&gt;\n",
"&lt;div id=&quot;menu-content&quot;&gt;\n",
"&lt;div onclick=&quot;saveAsPNG()&quot;&gt;Save as PNG&lt;/div&gt;\n",
"&lt;div onclick=&quot;saveAsHTML()&quot;&gt;Save as HTML&lt;/div&gt;\n",
"&lt;div onclick=&quot;getCamera()&quot;&gt;Get camera&lt;/div&gt;\n",
"&lt;div onclick=&quot;getViewpoint()&quot;&gt;Get viewpoint&lt;/div&gt;\n",
"&lt;div&gt;Close Menu&lt;/div&gt;\n",
"&lt;/div&gt;&lt;/div&gt;\n",
"\n",
"\n",
"&lt;/body&gt;\n",
"&lt;/html&gt;\n",
"\"\n",
" width=\"100%\"\n",
" height=\"400\"\n",
" style=\"border: 0;\">\n",
"</iframe>\n"
],
"text/plain": [
"Graphics3d Object"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ZNF1t.newton_plot()"
]
},
{
"cell_type": "code",
"execution_count": 52,
"id": "a45f7abe-34ff-40ad-8138-fa0f4b93c479",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(3) * y^2 * (-x*y^2 + z)^2"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"aux=3*x^2*y^6 - 6*x*y^4*z + 3*y^2*z^2\n",
"aux.factor()"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "15a419b5-6ca0-48a2-b77e-11d039aa52cc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"NNF1t=NF1t(z=z+x*y^2)\n",
"ZNNF1t = ZetaFunctions(NNF1t)\n",
"ZNNF1t.is_newton_degenerated(local=True)"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "64631350-3ee6-40db-a55e-f1847f8be665",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of x^7*y^7 + 4*x^6*y^7 + 3*x^5*y^7 - 10*x^4*y^7 - 3*x^5*y^5*z - 25*x^3*y^7 - 15*x^4*y^5*z - 24*x^2*y^7 - 30*x^3*y^5*z - 14*x*y^7 - 30*x^2*y^5*z - 4*y^7 - 15*x*y^5*z - 6*y^5*z + 3*x*y^2*z^2 + 3*y^2*z^2 + z^3:\n",
" support points = [(7, 7, 0), (6, 7, 0), (5, 7, 0), (4, 7, 0), (5, 5, 1), (3, 7, 0), (4, 5, 1), (2, 7, 0), (3, 5, 1), (1, 7, 0), (2, 5, 1), (0, 7, 0), (1, 5, 1), (0, 5, 1), (1, 2, 2), (0, 2, 2), (0, 0, 3)]\n",
" vertices = [(0, 0, 3), (0, 2, 2), (0, 7, 0)]\n",
" number of proper faces = 15\n",
" Facet 0: y + 2*z - 6 >= 0\n",
" Facet 1: y >= 0\n",
" Facet 2: x >= 0\n",
" Facet 3: z >= 0\n",
" Facet 4: 2*y + 5*z - 14 >= 0\n"
]
}
],
"source": [
"ZNNF1t.give_info_newton()"
]
},
{
"cell_type": "markdown",
"id": "d018605b-b591-496e-b279-3f668a118e79",
"metadata": {},
"source": [
"Traslaccion de un golpe"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "094a930d-b77d-416b-a4e5-0257f8dc23ce",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"False"
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"GF1t=F1t(z=z+y^2+x*y^2)\n",
"ZGF1t = ZetaFunctions(GF1t)\n",
"ZGF1t.is_newton_degenerated(local=True)"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "6c768f51-4886-4e20-83fa-a17ea1ab3e53",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of x^7*y^7 + 4*x^6*y^7 + 3*x^5*y^7 - 10*x^4*y^7 - 3*x^5*y^5*z - 25*x^3*y^7 - 15*x^4*y^5*z - 24*x^2*y^7 - 30*x^3*y^5*z - 14*x*y^7 - 30*x^2*y^5*z - 4*y^7 - 15*x*y^5*z - 6*y^5*z + 3*x*y^2*z^2 + 3*y^2*z^2 + z^3:\n",
" support points = [(7, 7, 0), (6, 7, 0), (5, 7, 0), (4, 7, 0), (5, 5, 1), (3, 7, 0), (4, 5, 1), (2, 7, 0), (3, 5, 1), (1, 7, 0), (2, 5, 1), (0, 7, 0), (1, 5, 1), (0, 5, 1), (1, 2, 2), (0, 2, 2), (0, 0, 3)]\n",
" vertices = [(0, 0, 3), (0, 2, 2), (0, 7, 0)]\n",
" number of proper faces = 15\n",
" Facet 0: y + 2*z - 6 >= 0\n",
" Facet 1: y >= 0\n",
" Facet 2: x >= 0\n",
" Facet 3: z >= 0\n",
" Facet 4: 2*y + 5*z - 14 >= 0\n"
]
}
],
"source": [
"ZGF1t.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "588205d1-e7c5-4a6b-87f6-9128b5a2a2eb",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "8cd120e8-7440-4453-927e-6c8137d680c4",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "69465e5c-28b4-4f1b-b6a7-4132f41b4d43",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 22,
"id": "a097d5ea-0585-44b7-a912-04f36be90d51",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"F1=z^3 -3*(((y^2+2*x^3)^2+x^5*y)*(((x^2+y^3)^2+y^7*x)))*z + 2*((y^4*x^13)*(x^4*y^13)) + x^40 + y^40\n",
"D1=F1.discriminant(z)\n",
"ZD1 = ZetaFunctions(D1)\n",
"ZD1.is_newton_degenerated()"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "612d96ca-666e-4dcb-9ba5-84c705ecdd8e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of -27*x^80 - 54*x^40*y^40 - 27*y^80 - 108*x^57*y^17 - 108*x^17*y^57 - 108*x^34*y^34 + 6912*x^21*y^21 + 5184*x^20*y^22 + 1296*x^19*y^23 + 108*x^18*y^24 + 20736*x^18*y^23 + 10368*x^17*y^24 + 1296*x^16*y^25 + 20736*x^20*y^20 + 15552*x^19*y^21 + 3888*x^18*y^22 + 324*x^17*y^23 + 25920*x^15*y^25 + 7776*x^14*y^26 + 324*x^13*y^27 + 41472*x^22*y^17 + 31104*x^21*y^18 + 7776*x^20*y^19 + 648*x^19*y^20 + 62208*x^17*y^22 + 31104*x^16*y^23 + 3888*x^15*y^24 + 17280*x^12*y^27 + 2592*x^11*y^28 + 20736*x^24*y^14 + 15552*x^23*y^15 + 3888*x^22*y^16 + 324*x^21*y^17 + 145152*x^19*y^19 + 77760*x^18*y^20 + 11664*x^17*y^21 + 324*x^16*y^22 + 77760*x^14*y^24 + 23328*x^13*y^25 + 972*x^12*y^26 + 6480*x^9*y^29 + 324*x^8*y^30 + 145152*x^21*y^16 + 93312*x^20*y^17 + 19440*x^19*y^18 + 1296*x^18*y^19 + 217728*x^16*y^21 + 77760*x^15*y^22 + 5832*x^14*y^23 + 51840*x^11*y^26 + 7776*x^10*y^27 + 1296*x^6*y^31 + 124416*x^23*y^13 + 93312*x^22*y^14 + 23328*x^21*y^15 + 1944*x^20*y^16 + 333504*x^18*y^18 + 152928*x^17*y^19 + 17820*x^16*y^20 + 108*x^15*y^21 + 181440*x^13*y^23 + 38880*x^12*y^24 + 972*x^11*y^25 + 19440*x^8*y^28 + 972*x^7*y^29 + 108*x^3*y^33 + 82944*x^25*y^10 + 62208*x^24*y^11 + 15552*x^23*y^12 + 1296*x^22*y^13 + 414720*x^20*y^15 + 217728*x^19*y^16 + 31104*x^18*y^17 + 648*x^17*y^18 + 383616*x^15*y^20 + 111456*x^14*y^21 + 5184*x^13*y^22 + 90720*x^10*y^25 + 9720*x^9*y^26 + 3888*x^5*y^30 + 20736*x^27*y^7 + 15552*x^26*y^8 + 3888*x^25*y^9 + 324*x^24*y^10 + 352512*x^22*y^12 + 202176*x^21*y^13 + 34992*x^20*y^14 + 1620*x^19*y^15 + 590976*x^17*y^17 + 202176*x^16*y^18 + 13608*x^15*y^19 + 252720*x^12*y^22 + 39852*x^11*y^23 + 324*x^10*y^24 + 27216*x^7*y^27 + 972*x^6*y^28 + 324*x^2*y^32 + 200448*x^24*y^9 + 134784*x^23*y^10 + 29808*x^22*y^11 + 2160*x^21*y^12 + 622080*x^19*y^14 + 248832*x^18*y^15 + 23328*x^17*y^16 + 466560*x^14*y^19 + 93312*x^13*y^20 + 1944*x^12*y^21 + 98928*x^9*y^24 + 6480*x^8*y^25 + 4536*x^4*y^29 + 103680*x^26*y^6 + 77760*x^25*y^7 + 19440*x^24*y^8 + 1620*x^23*y^9 + 492480*x^21*y^11 + 230688*x^20*y^12 + 26892*x^19*y^13 + 596160*x^16*y^16 + 147744*x^15*y^17 + 4860*x^14*y^18 + 220320*x^11*y^21 + 21384*x^10*y^22 + 22356*x^6*y^26 + 324*x^5*y^27 + 324*x*y^31 + 41472*x^28*y^3 + 31104*x^27*y^4 + 7776*x^26*y^5 + 648*x^25*y^6 + 311040*x^23*y^8 + 155520*x^22*y^9 + 19440*x^21*y^10 + 570240*x^18*y^13 + 163296*x^17*y^14 + 6480*x^16*y^15 + 336960*x^13*y^18 + 42768*x^12*y^19 + 62208*x^8*y^23 + 1944*x^7*y^24 + 2592*x^3*y^28 + 6912*x^30 + 5184*x^29*y + 1296*x^28*y^2 + 108*x^27*y^3 + 124416*x^25*y^5 + 62208*x^24*y^6 + 7776*x^23*y^7 + 388800*x^20*y^10 + 116640*x^19*y^11 + 4860*x^18*y^12 + 365040*x^15*y^15 + 52812*x^14*y^16 + 112752*x^10*y^20 + 4860*x^9*y^21 + 9720*x^5*y^25 + 108*y^30 + 20736*x^27*y^2 + 10368*x^26*y^3 + 1296*x^25*y^4 + 155520*x^22*y^7 + 46656*x^21*y^8 + 1944*x^20*y^9 + 259200*x^17*y^12 + 38880*x^16*y^13 + 133488*x^12*y^17 + 6480*x^11*y^18 + 20736*x^7*y^22 + 648*x^2*y^27 + 25920*x^24*y^4 + 7776*x^23*y^5 + 324*x^22*y^6 + 103680*x^19*y^9 + 15552*x^18*y^10 + 97200*x^14*y^14 + 4860*x^13*y^15 + 26244*x^9*y^19 + 1620*x^4*y^24 + 17280*x^21*y^6 + 2592*x^20*y^7 + 38880*x^16*y^11 + 1944*x^15*y^12 + 19440*x^11*y^16 + 2160*x^6*y^21 + 6480*x^18*y^8 + 324*x^17*y^9 + 7776*x^13*y^13 + 1620*x^8*y^18 + 1296*x^15*y^10 + 648*x^10*y^15 + 108*x^12*y^12:\n",
" support points = [(80, 0, 0), (40, 40, 0), (0, 80, 0), (57, 17, 0), (17, 57, 0), (34, 34, 0), (21, 21, 0), (20, 22, 0), (19, 23, 0), (18, 24, 0), (18, 23, 0), (17, 24, 0), (16, 25, 0), (20, 20, 0), (19, 21, 0), (18, 22, 0), (17, 23, 0), (15, 25, 0), (14, 26, 0), (13, 27, 0), (22, 17, 0), (21, 18, 0), (20, 19, 0), (19, 20, 0), (17, 22, 0), (16, 23, 0), (15, 24, 0), (12, 27, 0), (11, 28, 0), (24, 14, 0), (23, 15, 0), (22, 16, 0), (21, 17, 0), (19, 19, 0), (18, 20, 0), (17, 21, 0), (16, 22, 0), (14, 24, 0), (13, 25, 0), (12, 26, 0), (9, 29, 0), (8, 30, 0), (21, 16, 0), (20, 17, 0), (19, 18, 0), (18, 19, 0), (16, 21, 0), (15, 22, 0), (14, 23, 0), (11, 26, 0), (10, 27, 0), (6, 31, 0), (23, 13, 0), (22, 14, 0), (21, 15, 0), (20, 16, 0), (18, 18, 0), (17, 19, 0), (16, 20, 0), (15, 21, 0), (13, 23, 0), (12, 24, 0), (11, 25, 0), (8, 28, 0), (7, 29, 0), (3, 33, 0), (25, 10, 0), (24, 11, 0), (23, 12, 0), (22, 13, 0), (20, 15, 0), (19, 16, 0), (18, 17, 0), (17, 18, 0), (15, 20, 0), (14, 21, 0), (13, 22, 0), (10, 25, 0), (9, 26, 0), (5, 30, 0), (27, 7, 0), (26, 8, 0), (25, 9, 0), (24, 10, 0), (22, 12, 0), (21, 13, 0), (20, 14, 0), (19, 15, 0), (17, 17, 0), (16, 18, 0), (15, 19, 0), (12, 22, 0), (11, 23, 0), (10, 24, 0), (7, 27, 0), (6, 28, 0), (2, 32, 0), (24, 9, 0), (23, 10, 0), (22, 11, 0), (21, 12, 0), (19, 14, 0), (18, 15, 0), (17, 16, 0), (14, 19, 0), (13, 20, 0), (12, 21, 0), (9, 24, 0), (8, 25, 0), (4, 29, 0), (26, 6, 0), (25, 7, 0), (24, 8, 0), (23, 9, 0), (21, 11, 0), (20, 12, 0), (19, 13, 0), (16, 16, 0), (15, 17, 0), (14, 18, 0), (11, 21, 0), (10, 22, 0), (6, 26, 0), (5, 27, 0), (1, 31, 0), (28, 3, 0), (27, 4, 0), (26, 5, 0), (25, 6, 0), (23, 8, 0), (22, 9, 0), (21, 10, 0), (18, 13, 0), (17, 14, 0), (16, 15, 0), (13, 18, 0), (12, 19, 0), (8, 23, 0), (7, 24, 0), (3, 28, 0), (30, 0, 0), (29, 1, 0), (28, 2, 0), (27, 3, 0), (25, 5, 0), (24, 6, 0), (23, 7, 0), (20, 10, 0), (19, 11, 0), (18, 12, 0), (15, 15, 0), (14, 16, 0), (10, 20, 0), (9, 21, 0), (5, 25, 0), (0, 30, 0), (27, 2, 0), (26, 3, 0), (25, 4, 0), (22, 7, 0), (21, 8, 0), (20, 9, 0), (17, 12, 0), (16, 13, 0), (12, 17, 0), (11, 18, 0), (7, 22, 0), (2, 27, 0), (24, 4, 0), (23, 5, 0), (22, 6, 0), (19, 9, 0), (18, 10, 0), (14, 14, 0), (13, 15, 0), (9, 19, 0), (4, 24, 0), (21, 6, 0), (20, 7, 0), (16, 11, 0), (15, 12, 0), (11, 16, 0), (6, 21, 0), (18, 8, 0), (17, 9, 0), (13, 13, 0), (8, 18, 0), (15, 10, 0), (10, 15, 0), (12, 12, 0)]\n",
" vertices = [(0, 30, 0), (30, 0, 0), (12, 12, 0)]\n",
" number of proper faces = 15\n",
" Facet 0: 2*x + 3*y - 60 >= 0\n",
" Facet 1: 3*x + 2*y - 60 >= 0\n",
" Facet 2: x >= 0\n",
" Facet 3: y >= 0\n",
" Facet 4: z >= 0\n"
]
}
],
"source": [
"ZD1.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bbee0079-f404-4ad3-b8c6-b95dc34fdcf1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "beea9f68-34eb-4fbf-95c7-709e523b21b4",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 25,
"id": "b07929c2-0908-4573-8af4-c72ae8a175d1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Newton's polyhedron of -27*x^80 - 54*x^40*y^40 - 27*y^80 - 108*x^57*y^17 - 108*x^17*y^57 - 108*x^34*y^34 + 6912*x^21*y^21 + 5184*x^20*y^22 + 1296*x^19*y^23 + 108*x^18*y^24 + 20736*x^18*y^23 + 10368*x^17*y^24 + 1296*x^16*y^25 + 20736*x^20*y^20 + 15552*x^19*y^21 + 3888*x^18*y^22 + 324*x^17*y^23 + 25920*x^15*y^25 + 7776*x^14*y^26 + 324*x^13*y^27 + 41472*x^22*y^17 + 31104*x^21*y^18 + 7776*x^20*y^19 + 648*x^19*y^20 + 62208*x^17*y^22 + 31104*x^16*y^23 + 3888*x^15*y^24 + 17280*x^12*y^27 + 2592*x^11*y^28 + 20736*x^24*y^14 + 15552*x^23*y^15 + 3888*x^22*y^16 + 324*x^21*y^17 + 145152*x^19*y^19 + 77760*x^18*y^20 + 11664*x^17*y^21 + 324*x^16*y^22 + 77760*x^14*y^24 + 23328*x^13*y^25 + 972*x^12*y^26 + 6480*x^9*y^29 + 324*x^8*y^30 + 145152*x^21*y^16 + 93312*x^20*y^17 + 19440*x^19*y^18 + 1296*x^18*y^19 + 217728*x^16*y^21 + 77760*x^15*y^22 + 5832*x^14*y^23 + 51840*x^11*y^26 + 7776*x^10*y^27 + 1296*x^6*y^31 + 124416*x^23*y^13 + 93312*x^22*y^14 + 23328*x^21*y^15 + 1944*x^20*y^16 + 333504*x^18*y^18 + 152928*x^17*y^19 + 17820*x^16*y^20 + 108*x^15*y^21 + 181440*x^13*y^23 + 38880*x^12*y^24 + 972*x^11*y^25 + 19440*x^8*y^28 + 972*x^7*y^29 + 108*x^3*y^33 + 82944*x^25*y^10 + 62208*x^24*y^11 + 15552*x^23*y^12 + 1296*x^22*y^13 + 414720*x^20*y^15 + 217728*x^19*y^16 + 31104*x^18*y^17 + 648*x^17*y^18 + 383616*x^15*y^20 + 111456*x^14*y^21 + 5184*x^13*y^22 + 90720*x^10*y^25 + 9720*x^9*y^26 + 3888*x^5*y^30 + 20736*x^27*y^7 + 15552*x^26*y^8 + 3888*x^25*y^9 + 324*x^24*y^10 + 352512*x^22*y^12 + 202176*x^21*y^13 + 34992*x^20*y^14 + 1620*x^19*y^15 + 590976*x^17*y^17 + 202176*x^16*y^18 + 13608*x^15*y^19 + 252720*x^12*y^22 + 39852*x^11*y^23 + 324*x^10*y^24 + 27216*x^7*y^27 + 972*x^6*y^28 + 324*x^2*y^32 + 200448*x^24*y^9 + 134784*x^23*y^10 + 29808*x^22*y^11 + 2160*x^21*y^12 + 622080*x^19*y^14 + 248832*x^18*y^15 + 23328*x^17*y^16 + 466560*x^14*y^19 + 93312*x^13*y^20 + 1944*x^12*y^21 + 98928*x^9*y^24 + 6480*x^8*y^25 + 4536*x^4*y^29 + 103680*x^26*y^6 + 77760*x^25*y^7 + 19440*x^24*y^8 + 1620*x^23*y^9 + 492480*x^21*y^11 + 230688*x^20*y^12 + 26892*x^19*y^13 + 596160*x^16*y^16 + 147744*x^15*y^17 + 4860*x^14*y^18 + 220320*x^11*y^21 + 21384*x^10*y^22 + 22356*x^6*y^26 + 324*x^5*y^27 + 324*x*y^31 + 41472*x^28*y^3 + 31104*x^27*y^4 + 7776*x^26*y^5 + 648*x^25*y^6 + 311040*x^23*y^8 + 155520*x^22*y^9 + 19440*x^21*y^10 + 570240*x^18*y^13 + 163296*x^17*y^14 + 6480*x^16*y^15 + 336960*x^13*y^18 + 42768*x^12*y^19 + 62208*x^8*y^23 + 1944*x^7*y^24 + 2592*x^3*y^28 + 6912*x^30 + 5184*x^29*y + 1296*x^28*y^2 + 108*x^27*y^3 + 124416*x^25*y^5 + 62208*x^24*y^6 + 7776*x^23*y^7 + 388800*x^20*y^10 + 116640*x^19*y^11 + 4860*x^18*y^12 + 365040*x^15*y^15 + 52812*x^14*y^16 + 112752*x^10*y^20 + 4860*x^9*y^21 + 9720*x^5*y^25 + 108*y^30 + 20736*x^27*y^2 + 10368*x^26*y^3 + 1296*x^25*y^4 + 155520*x^22*y^7 + 46656*x^21*y^8 + 1944*x^20*y^9 + 259200*x^17*y^12 + 38880*x^16*y^13 + 133488*x^12*y^17 + 6480*x^11*y^18 + 20736*x^7*y^22 + 648*x^2*y^27 + 25920*x^24*y^4 + 7776*x^23*y^5 + 324*x^22*y^6 + 103680*x^19*y^9 + 15552*x^18*y^10 + 97200*x^14*y^14 + 4860*x^13*y^15 + 26244*x^9*y^19 + 1620*x^4*y^24 + 17280*x^21*y^6 + 2592*x^20*y^7 + 38880*x^16*y^11 + 1944*x^15*y^12 + 19440*x^11*y^16 + 2160*x^6*y^21 + 6480*x^18*y^8 + 324*x^17*y^9 + 7776*x^13*y^13 + 1620*x^8*y^18 + 1296*x^15*y^10 + 648*x^10*y^15 + 108*x^12*y^12:\n",
" support points = [(80, 0, 0), (40, 40, 0), (0, 80, 0), (57, 17, 0), (17, 57, 0), (34, 34, 0), (21, 21, 0), (20, 22, 0), (19, 23, 0), (18, 24, 0), (18, 23, 0), (17, 24, 0), (16, 25, 0), (20, 20, 0), (19, 21, 0), (18, 22, 0), (17, 23, 0), (15, 25, 0), (14, 26, 0), (13, 27, 0), (22, 17, 0), (21, 18, 0), (20, 19, 0), (19, 20, 0), (17, 22, 0), (16, 23, 0), (15, 24, 0), (12, 27, 0), (11, 28, 0), (24, 14, 0), (23, 15, 0), (22, 16, 0), (21, 17, 0), (19, 19, 0), (18, 20, 0), (17, 21, 0), (16, 22, 0), (14, 24, 0), (13, 25, 0), (12, 26, 0), (9, 29, 0), (8, 30, 0), (21, 16, 0), (20, 17, 0), (19, 18, 0), (18, 19, 0), (16, 21, 0), (15, 22, 0), (14, 23, 0), (11, 26, 0), (10, 27, 0), (6, 31, 0), (23, 13, 0), (22, 14, 0), (21, 15, 0), (20, 16, 0), (18, 18, 0), (17, 19, 0), (16, 20, 0), (15, 21, 0), (13, 23, 0), (12, 24, 0), (11, 25, 0), (8, 28, 0), (7, 29, 0), (3, 33, 0), (25, 10, 0), (24, 11, 0), (23, 12, 0), (22, 13, 0), (20, 15, 0), (19, 16, 0), (18, 17, 0), (17, 18, 0), (15, 20, 0), (14, 21, 0), (13, 22, 0), (10, 25, 0), (9, 26, 0), (5, 30, 0), (27, 7, 0), (26, 8, 0), (25, 9, 0), (24, 10, 0), (22, 12, 0), (21, 13, 0), (20, 14, 0), (19, 15, 0), (17, 17, 0), (16, 18, 0), (15, 19, 0), (12, 22, 0), (11, 23, 0), (10, 24, 0), (7, 27, 0), (6, 28, 0), (2, 32, 0), (24, 9, 0), (23, 10, 0), (22, 11, 0), (21, 12, 0), (19, 14, 0), (18, 15, 0), (17, 16, 0), (14, 19, 0), (13, 20, 0), (12, 21, 0), (9, 24, 0), (8, 25, 0), (4, 29, 0), (26, 6, 0), (25, 7, 0), (24, 8, 0), (23, 9, 0), (21, 11, 0), (20, 12, 0), (19, 13, 0), (16, 16, 0), (15, 17, 0), (14, 18, 0), (11, 21, 0), (10, 22, 0), (6, 26, 0), (5, 27, 0), (1, 31, 0), (28, 3, 0), (27, 4, 0), (26, 5, 0), (25, 6, 0), (23, 8, 0), (22, 9, 0), (21, 10, 0), (18, 13, 0), (17, 14, 0), (16, 15, 0), (13, 18, 0), (12, 19, 0), (8, 23, 0), (7, 24, 0), (3, 28, 0), (30, 0, 0), (29, 1, 0), (28, 2, 0), (27, 3, 0), (25, 5, 0), (24, 6, 0), (23, 7, 0), (20, 10, 0), (19, 11, 0), (18, 12, 0), (15, 15, 0), (14, 16, 0), (10, 20, 0), (9, 21, 0), (5, 25, 0), (0, 30, 0), (27, 2, 0), (26, 3, 0), (25, 4, 0), (22, 7, 0), (21, 8, 0), (20, 9, 0), (17, 12, 0), (16, 13, 0), (12, 17, 0), (11, 18, 0), (7, 22, 0), (2, 27, 0), (24, 4, 0), (23, 5, 0), (22, 6, 0), (19, 9, 0), (18, 10, 0), (14, 14, 0), (13, 15, 0), (9, 19, 0), (4, 24, 0), (21, 6, 0), (20, 7, 0), (16, 11, 0), (15, 12, 0), (11, 16, 0), (6, 21, 0), (18, 8, 0), (17, 9, 0), (13, 13, 0), (8, 18, 0), (15, 10, 0), (10, 15, 0), (12, 12, 0)]\n",
" vertices = [(0, 30, 0), (30, 0, 0), (12, 12, 0)]\n",
" number of proper faces = 15\n",
" Facet 0: 2*x + 3*y - 60 >= 0\n",
" Facet 1: 3*x + 2*y - 60 >= 0\n",
" Facet 2: x >= 0\n",
" Facet 3: y >= 0\n",
" Facet 4: z >= 0\n"
]
}
],
"source": [
"F2=z^3 -3*x^4+x^5*z + 2*x^6 + y^13\n",
"D2=F2.discriminant(z)\n",
"ZD2 = ZetaFunctions(D1)\n",
"ZD2.is_newton_degenerated()\n",
"ZD2.give_info_newton()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "98bc922e-6e45-4fb4-890d-e5f3225966c9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 10.2",
"language": "sage",
"name": "sagemath-st"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}