{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Jupyter meets MathBox2\n", "\n", "This notebook contains a few examples of embedded [MathBox2](https://github.com/unconed/mathbox) plots." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Boilerplate code" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import json\n", "import numpy as np\n", "from IPython.display import HTML, Javascript, display" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "def json_numpy_serialzer(o):\n", " '''Helper function to serialize NumPy arrays.'''\n", " if isinstance(o, np.ndarray):\n", " return o.tolist()\n", " raise TypeError(\"{} of type {} is not JSON serializable\".format(repr(o), type(o)))\n", "\n", "def jsglobal(**params):\n", " '''Populate JS global namespace with provided Python obejcts.'''\n", " code = [];\n", " for name, value in params.items():\n", " jsdata = json.dumps(value, default=json_numpy_serialzer)\n", " code.append(\"window.{} = {};\".format(name, jsdata))\n", " display(Javascript(\"\\n\".join(code)))" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "\n", "// Loading the compiled MathBox bundle.\n", "require.config({\n", " paths: {\n", " mathBox: '//cdn.rawgit.com/unconed/mathbox/eaeb8e15/build/mathbox-bundle'\n", " }\n", "});\n", "\n", "// Helper function that setups WebGL context and initializes MathBox.\n", "window.with_mathbox = function(element, func) {\n", " require(['mathBox'], function(){\n", " var mathbox = mathBox({\n", " plugins: ['core', 'controls', 'cursor', 'mathbox'],\n", " controls: { klass: THREE.OrbitControls },\n", " mathbox: {inspect: false},\n", " element: element[0],\n", " loop: {start: false},\n", " \n", " });\n", " var three = mathbox.three;\n", " three.renderer.setClearColor(new THREE.Color(0xFFFFFF), 1.0);\n", " three.camera.position.set(-1, 1, 2);\n", " three.controls.noKeys = true;\n", " \n", " three.element.style.height = \"400px\";\n", " three.element.style.width = \"100%\";\n", " \n", " function isInViewport(element) {\n", " var rect = element.getBoundingClientRect();\n", " var html = document.documentElement;\n", " var w = window.innerWidth || html.clientWidth;\n", " var h = window.innerHeight || html.clientHeight;\n", " return rect.top < h && rect.left < w && rect.bottom > 0 && rect.right > 0;\n", " }\n", " \n", " // Running update/render loop only for visible plots.\n", " var intervalId = setInterval(function(){\n", " if (three.element.offsetParent === null) {\n", " clearInterval(intervalId);\n", " three.destroy();\n", " return;\n", " }\n", " var visible = isInViewport(three.canvas);\n", " if (three.Loop.running != visible) {\n", " visible? three.Loop.start() : three.Loop.stop();\n", " }\n", " }, 100);\n", "\n", " func(mathbox);\n", " \n", " window.dispatchEvent(new Event('resize'));\n", " })\n", "}" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "\n", "// Loading the compiled MathBox bundle.\n", "require.config({\n", " paths: {\n", " mathBox: '//cdn.rawgit.com/unconed/mathbox/eaeb8e15/build/mathbox-bundle'\n", " }\n", "});\n", "\n", "// Helper function that setups WebGL context and initializes MathBox.\n", "window.with_mathbox = function(element, func) {\n", " require(['mathBox'], function(){\n", " var mathbox = mathBox({\n", " plugins: ['core', 'controls', 'cursor', 'mathbox'],\n", " controls: { klass: THREE.OrbitControls },\n", " mathbox: {inspect: false},\n", " element: element[0],\n", " loop: {start: false},\n", " \n", " });\n", " var three = mathbox.three;\n", " three.renderer.setClearColor(new THREE.Color(0xFFFFFF), 1.0);\n", " three.camera.position.set(-1, 1, 2);\n", " three.controls.noKeys = true;\n", " \n", " three.element.style.height = \"400px\";\n", " three.element.style.width = \"100%\";\n", " \n", " function isInViewport(element) {\n", " var rect = element.getBoundingClientRect();\n", " var html = document.documentElement;\n", " var w = window.innerWidth || html.clientWidth;\n", " var h = window.innerHeight || html.clientHeight;\n", " return rect.top < h && rect.left < w && rect.bottom > 0 && rect.right > 0;\n", " }\n", " \n", " // Running update/render loop only for visible plots.\n", " var intervalId = setInterval(function(){\n", " if (three.element.offsetParent === null) {\n", " clearInterval(intervalId);\n", " three.destroy();\n", " return;\n", " }\n", " var visible = isInViewport(three.canvas);\n", " if (three.Loop.running != visible) {\n", " visible? three.Loop.start() : three.Loop.stop();\n", " }\n", " }, 100);\n", "\n", " func(mathbox);\n", " \n", " window.dispatchEvent(new Event('resize'));\n", " })\n", "}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Simple surface plot\n", "\n", "This code snippet shows an 3d surface plot of a function, defined in JS callback." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "with_mathbox(element, function(mathbox) {\n", " mathbox.cartesian({},{rotation:(t)=>[0, t*0.1, 0]}) // Setup rotating the coordinate frame.\n", " .grid({axes: [1, 3]}) // Add a grid to it.\n", " .area({width:50, height:50, // This defines 2D data source, sampled from JS callback \n", " expr: function(emit, x, y, i, j, t){\n", " var r = Math.sqrt(x*x+y*y);\n", " var z = Math.sin(r*10-t*0.5)*0.2 + 0.3;\n", " emit(x, z, y);\n", " }})\n", " .surface({color:'#AAA', shaded:true}) // Adding surface primitives, that draw data provided by \n", " .surface({color:'#55A', lineX:true, lineY:true, fill:false, zBias:1}); // the last defined datasource.\n", "})" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "with_mathbox(element, function(mathbox) {\n", " mathbox.cartesian({},{rotation:(t)=>[0, t*0.1, 0]}) // Setup rotating the coordinate frame.\n", " .grid({axes: [1, 3]}) // Add a grid to it.\n", " .area({width:50, height:50, // This defines 2D data source, sampled from JS callback \n", " expr: function(emit, x, y, i, j, t){\n", " var r = Math.sqrt(x*x+y*y);\n", " var z = Math.sin(r*10-t*0.5)*0.2 + 0.3;\n", " emit(x, z, y);\n", " }})\n", " .surface({color:'#AAA', shaded:true}) // Adding surface primitives, that draw data provided by \n", " .surface({color:'#55A', lineX:true, lineY:true, fill:false, zBias:1}); // the last defined datasource.\n", "})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Feeding data from Python\n", "\n", "Drawing JS-defined functions is nice, but what if we'd like to draw some data generated by Python code?" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "window.POS = [[-0.021712612066011223, 0.019946908931671718, 0.48508510856524284], [0.0327273957661201, 0.1138860251409253, 0.6685505902762708], [0.07692444531243454, 0.24035530188976806, 0.7943782658085321], [0.1702318453305351, 0.3548976717778088, 0.8734043162384201], [0.2787613469893774, 0.46941649386835466, 0.9415880012813798], [0.30062903587649853, 0.6324125668553141, 1.0356344745792456], [0.3885564727678274, 0.6928208184672779, 1.0128685551846488], [0.45599225293545126, 0.7523575353306768, 0.992430641038287], [0.4571169204470674, 0.8321116789067495, 0.9234562293651387], [0.5077310292328631, 0.9025071251788233, 0.7923438405529885], [0.5831815777901931, 0.8954726925739621, 0.6496760767980221], [0.6239593660611535, 1.0010948355577993, 0.5328431087788859], [0.6851540088017171, 1.011884826260192, 0.3508969811207159], [0.7352006375983341, 0.981815384666931, 0.1530262735660855], [0.7632562168236227, 0.9934318565456078, 0.006785026185938909], [0.8093345534511676, 0.9983190626188659, -0.17929540006409592], [0.8644414290745647, 0.9487311502319753, -0.3943447880381848], [0.8560455110290544, 0.8780544168886812, -0.5522547186508093], [0.9059021641886632, 0.790454325962804, -0.6672733141332893], [0.9653134544682264, 0.7127157999038585, -0.7881755346751647], [0.9359903003982328, 0.601645330897704, -0.8990174336671012], [0.9423854740373404, 0.5077831432183474, -0.9527627754681027], [0.9834553885352497, 0.36088827060553075, -1.0220855831284796], [0.9962854491259863, 0.2552553681427634, -1.008525217228836], [1.021364453020137, 0.10039346344879663, -0.9929378809600254], [1.0207933056464515, -0.01121205296977815, -0.8778318972911701], [0.9811723805717422, -0.16069655049621612, -0.7439717248848075], [0.9781230555819385, -0.218759011622166, -0.6193961483187317], [0.9756605763631575, -0.39311508183010524, -0.49409802562371624], [0.9438774902802154, -0.4432048695257236, -0.3030478034104447], [0.9734758681510441, -0.6161810759861627, -0.11872996745138187], [0.9526142117305343, -0.6940847038677704, 0.08660056650532763], [0.8822769252219008, -0.800342224281089, 0.2595532558211146], [0.867721371986362, -0.8337037965446238, 0.38945063110446876], [0.857425465095633, -0.8546736842315027, 0.5903308292167074], [0.8084039766520036, -0.9488167931916779, 0.6944267832106288], [0.7775909393681232, -1.0152339126760235, 0.8379842476618474], [0.7522310325651237, -1.0130124973932697, 0.9413854467885225], [0.7030576982423165, -0.9921403720743415, 0.9557043253535084], [0.6288825803373558, -0.9421679539057939, 0.9594880216066697], [0.5802323572645162, -0.9605318017845758, 0.983773673622973], [0.5486120727458672, -0.8704453083085932, 0.9224893179208554], [0.49568398888834675, -0.8314904944027474, 0.8509793992821255], [0.4120521774260051, -0.7870006242311169, 0.7032202560807268], [0.3504213676372365, -0.674068259837928, 0.5984261444790963], [0.3127933965639217, -0.5941754991301887, 0.4566109327969672], [0.27626389822648134, -0.4837550517014314, 0.22638140593676231], [0.18708110588665236, -0.33727524088058103, 0.06324357267572597], [0.1334684984766582, -0.2470787878240999, -0.12255674111622639], [0.09060535391233267, -0.1240091843657276, -0.3124122143006394], [0.0019315973232565484, 0.011963940431487774, -0.5159211580754794], [-0.10352886674409811, 0.11130218741718628, -0.639418617336354], [-0.11750017196180385, 0.2444065852048368, -0.7475102097581282], [-0.19351816451958778, 0.3747213198887104, -0.8837009778259333], [-0.2492975255301915, 0.5017844252945058, -0.9400446057433296], [-0.33027350304368047, 0.6238415373671896, -1.0149535598483304], [-0.3698124935257556, 0.6841771575078145, -1.0184785664543605], [-0.43052276582180293, 0.7602474534137534, -0.9650788305244647], [-0.47688541749309993, 0.8776532872922672, -0.895119099913518], [-0.5511807291663126, 0.9001296636651538, -0.8012054441892208], [-0.5889648184167151, 0.9825534577419979, -0.650297010802087], [-0.647554145197871, 0.972723283615886, -0.5794705265423247], [-0.6983628968955545, 0.9789249177488367, -0.36679757747304625], [-0.7238436412546757, 1.0010416431784794, -0.1789040642309804], [-0.7690811511669471, 0.9782245617554199, 0.013361206299430054], [-0.876034286621252, 0.9431122637647801, 0.1945949409567909], [-0.8533701246541922, 0.896902120303886, 0.39128320001396155], [-0.8902910852095849, 0.883796142442883, 0.5579981914558306], [-0.9067659077951664, 0.7608995513939398, 0.6901988607609387], [-0.9496714308587335, 0.6762902850295067, 0.8206391380555206], [-0.9408169505729869, 0.5922327450114919, 0.903772314230823], [-0.998005676708126, 0.4605261700657763, 1.0034424572668519], [-0.9652045515275052, 0.3670811213706203, 0.9834275391346292], [-0.9926067837840447, 0.21467200978448644, 0.9796210672096082], [-1.003212225104972, 0.10886011548792678, 0.9666335205846823], [-1.028363392756423, -0.026742717656198307, 0.8432166547416194], [-1.0224622534500185, -0.1323308620776508, 0.7310035852387098], [-0.9764187180206322, -0.26299588496767057, 0.6296060691037322], [-0.9749046459936155, -0.38591259470780165, 0.49179798639051703], [-0.971222402931843, -0.4785565228116384, 0.2933602351369565], [-0.9436721526063152, -0.5903033672307373, 0.11798143058565425], [-0.9473751842889281, -0.6832213535665959, -0.0817679968980099], [-0.890009367059236, -0.8200968683705339, -0.2903860491033628], [-0.866510958670028, -0.8126175694885819, -0.4208099253335214], [-0.8551343159840504, -0.9431164261214465, -0.5835547501101309], [-0.8074747813985281, -0.9424920493708613, -0.7357586203412533], [-0.766461336353189, -0.925084297515505, -0.8516447923425532], [-0.7283969029454631, -1.0010830845845369, -0.9464246851324747], [-0.6606993334609462, -1.0043456260484598, -0.9720865988140027], [-0.6274089153305504, -0.9557482374795282, -0.991496467169576], [-0.6074640928252268, -0.9740270024215091, -0.951334584580122], [-0.5431598161946101, -0.9263061021191122, -0.9377276057649359], [-0.45138254370706776, -0.8664748586841973, -0.8536879738961116], [-0.4338156634451455, -0.7880276318409924, -0.7423798814257326], [-0.3929833732869412, -0.6851037216254153, -0.5826158612106107], [-0.3169797115586934, -0.6111497162797248, -0.38684659864330917], [-0.2694187619620306, -0.4655760348425608, -0.25518290627746015], [-0.16801879853782195, -0.3376360413108912, -0.06471907151343295], [-0.1576901233301159, -0.22281546390888762, 0.1785442300834192], [-0.04826115838594404, -0.10975798299947921, 0.3406124780079019], [0.021590530236007384, -0.004001158836480596, 0.4827147906650767], [0.08135151559590256, 0.13504707102304733, 0.6763079692997395], [0.11760844589304789, 0.2761087087494568, 0.7878349550298583], [0.19121199996270408, 0.4036580135602872, 0.8978680284839978], [0.2349207333326672, 0.5059804355078692, 0.9836626687990642], [0.3126820447958093, 0.5934459693832264, 0.9807259802537317], [0.3740429222105109, 0.7079298198617793, 0.9804341350805287], [0.4049317017985513, 0.7715075873638508, 0.9364793656979498], [0.4981593126392864, 0.8429953423334344, 0.8620311901542353], [0.5346303212534196, 0.9067274038761535, 0.8073422270003173], [0.5904609909745349, 0.992615686735082, 0.6608669602044831], [0.6415396387148932, 0.9827495407269546, 0.5146434555250499], [0.6925136006785203, 1.0096369001712227, 0.37768442798467516], [0.7024302027288378, 0.9868265623025679, 0.1600584464462717], [0.7938207348268356, 0.9723660381596497, -0.05675757383613894], [0.815001794501064, 0.9458132051040341, -0.20245771917793065], [0.8274114422932121, 0.9328988497415582, -0.39241453570821916], [0.8760620586465557, 0.8183506375695935, -0.5707426431505687], [0.88350732068457, 0.7531011086260455, -0.7178612235252976], [0.9736349843042114, 0.6357890792791315, -0.8430616144946151], [0.9453333838082891, 0.5889766783318563, -0.921431066013097], [0.9839669583798563, 0.44862445854685595, -0.9722174237159235], [1.0185769479198266, 0.33445823121235013, -0.9907070504583562], [0.9971931395260327, 0.18864399624449846, -1.0011087304452557], [1.0211091099766423, 0.11254526499219464, -0.9686881380889961], [1.0137846413260598, -0.02530549796332669, -0.8588310117298289], [1.0050361988832524, -0.16341524394782872, -0.7410838477999412], [0.9709317706443162, -0.29024658664343816, -0.6385189577970662], [0.9738251165427759, -0.38085850947434086, -0.47825773895928325], [0.9814299638059443, -0.4908800350035139, -0.30221783729037816], [0.9662779919116923, -0.5777142670101936, -0.10557703166718325], [0.9224122445060077, -0.7319413051143473, 0.07664247517015718], [0.8954309112946376, -0.776082879500723, 0.2668104396950709], [0.8771267367822961, -0.8224919274073156, 0.43537658872558793], [0.8299626548072234, -0.9380583306010843, 0.6057671303187029], [0.8235333900163332, -0.9911881417230979, 0.731080062324913], [0.7657516075079696, -0.9683469027971271, 0.8640881627743741], [0.7295524566251529, -1.0034468154782452, 0.9477017231804017], [0.6984804134853362, -1.0309662756880185, 1.0009706677868098], [0.6286884089252246, -0.9894607346981527, 0.9508606708304119], [0.5530319229555193, -0.9115061927489183, 0.963787058694559], [0.5066228133209907, -0.9062618950651868, 0.9057912880817843], [0.4763953952428235, -0.8042832746828875, 0.8194169283380536], [0.42071001321750434, -0.7818680342928935, 0.7425049134566258], [0.36346959849281907, -0.6928676018067169, 0.5858631137349115], [0.3243306305834034, -0.5697031273738683, 0.37051050340272457], [0.2754887597680656, -0.4593772813814268, 0.2479134016623404], [0.16727380705563444, -0.3588425293460111, 0.03995019059726316], [0.13836094768594864, -0.22775607017909855, -0.17549840349549584], [0.05867485792872453, -0.07412678148114414, -0.3318111804953476], [-0.006846361750365572, -0.0063835700712123675, -0.532127898218308], [-0.08501975469685084, 0.13762357813558188, -0.6550351865646606], [-0.13149284051710025, 0.29920076915485905, -0.78566577231609], [-0.17553648769948735, 0.3851629723024306, -0.8596547200076361], [-0.2954675190037931, 0.4866630359074209, -0.9392222678803851], [-0.3217056349974406, 0.6220768313311816, -0.9873950133962784], [-0.35831172462850913, 0.7109804169129441, -0.9825145727850513], [-0.4048439734113634, 0.8026801065824802, -0.9416488148692457], [-0.4900295527407083, 0.8431728871105878, -0.9061230228600003], [-0.5292244726877853, 0.8643921158920825, -0.8187865299707321], [-0.6151616943514723, 0.9521304284243975, -0.7168470228741075], [-0.6200190098869061, 0.9978839281739873, -0.4725246557255143], [-0.670694579599089, 1.0197065528277218, -0.297019069059754], [-0.7473672292212509, 0.9664604349653491, -0.16435515088637515], [-0.793546840559231, 0.97307602791272, 0.0072812384141260796], [-0.8037155401371819, 0.9546980623728037, 0.21473675434048287], [-0.8436444911230289, 0.8928987091426718, 0.4096640059216276], [-0.8799254971200993, 0.8275775211428595, 0.5785555017395361], [-0.8840589524293522, 0.7836208285178192, 0.685622185487488], [-0.9443257077716795, 0.6348669518493888, 0.8210802118864344], [-0.9459836574391964, 0.5676959670876615, 0.9555777346942632], [-0.9793186197726033, 0.4410241518575221, 0.986891344020668], [-0.9812581298634053, 0.35891636461029236, 1.0055302190846236], [-0.988544355507193, 0.1851087872152338, 0.9733884997886648], [-1.0104606094355137, 0.09663087707354305, 0.9323321440301733], [-0.9916830529665399, -0.009993733752382423, 0.8386437398318596], [-0.9835344512369392, -0.1355497418467996, 0.7599964572539887], [-1.0190158883300253, -0.26138007487799964, 0.6150911029744375], [-0.9609103532178999, -0.35316159268536, 0.48618390280838364], [-0.9634691648705561, -0.5013985864221209, 0.29191456715136965], [-0.969798045788819, -0.6349645390956419, 0.0847648107446389], [-0.9011142406473885, -0.707587902733243, -0.06413743193739668], [-0.9556563081850192, -0.8166471704221544, -0.28172393972259313], [-0.8529400093383099, -0.8578300578677479, -0.4563120026034071], [-0.8405054286103689, -0.9496965541331863, -0.5902568963531984], [-0.8157784871517916, -0.9361988591711995, -0.7520740227997754], [-0.7416406266249469, -0.9795369770761626, -0.8633965871716472], [-0.7163419859832119, -1.028687044378311, -0.941170447551059], [-0.6415591669204382, -0.9700990394187805, -1.0076071450219926], [-0.618106280268884, -0.9725956412527355, -0.9831115694115519], [-0.5761927017899277, -0.9480701781341843, -0.9489144693780137], [-0.5213176212658813, -0.8692279266921018, -0.8974835620109745], [-0.4776264539133964, -0.8344818878028372, -0.7872698008517124], [-0.41093513459661024, -0.7699852960280015, -0.7294473204539754], [-0.3372700397090793, -0.6633500387604508, -0.5758275988468521], [-0.28383814004244207, -0.5645711121935932, -0.4278571742886259], [-0.22495749919746355, -0.4333405233417464, -0.16410407068791052], [-0.17449839197063016, -0.34032054063038203, 0.0038198381627120095], [-0.10959442609034398, -0.2189845713759756, 0.1470694847619538], [-0.07818207261763196, -0.0822080791357748, 0.3165362921747215], [0.035391742697688876, 0.009391934211619761, 0.5174982312896494], [0.06795662995523319, 0.17386682657307823, 0.6702153874008898], [0.177109245022796, 0.2515446000212735, 0.8009040767703816], [0.20085402284294565, 0.39734292414553274, 0.9248383184801422], [0.2728028710139329, 0.4811290476177785, 0.9721878876803909], [0.3129409561610282, 0.5989824215928005, 1.0169023270028195], [0.3680929984630705, 0.6956100725290787, 0.9957471003622113], [0.45644672839180933, 0.79847949142881, 0.9542021552371515], [0.4877325325857244, 0.8348542376250144, 0.8734482391368111], [0.5337912537772174, 0.9127210096652201, 0.8265911302634354], [0.5849096977151972, 0.9529701133665361, 0.6160884010586971], [0.6596043035236036, 0.9553651191766196, 0.4859592045870825], [0.7150525135095409, 0.9572475678704014, 0.3350706915289767], [0.7540921245656405, 1.0264952507679102, 0.13198605418687684], [0.7665420885786921, 1.0129766018295459, -0.03821585983099301], [0.8021657585075117, 0.9280027447881745, -0.24392962799200016], [0.8427356936247905, 0.9146902676785569, -0.3855188807722062], [0.8593145066681122, 0.8336808330191688, -0.5757983774590416], [0.9262285116741241, 0.7496190439533698, -0.704652492488632], [0.9315865525279804, 0.6204666421928525, -0.8301944682231029], [0.9298062186076841, 0.5801171349989348, -0.9342804512732433], [0.9598459563307736, 0.45703174617883463, -0.9659965692955574], [0.9814128766562255, 0.3748637987665698, -0.9667452045876775], [1.0280842998488238, 0.2167394578303869, -1.01604348257033], [1.0232138445120347, 0.0890056126623092, -0.9373100893476954], [1.0124662738238523, -0.060387586093366544, -0.8238620095359562], [1.0145326663607566, -0.14643762025478332, -0.7265965549713712], [1.001363304277746, -0.27390532206768703, -0.612116899210154], [0.964716453894001, -0.3888912171313722, -0.43877451939821915], [0.9865649447485035, -0.5027798337938852, -0.2872685037080949], [0.9149623327869197, -0.6134933917856193, -0.08536828945195002], [0.9223683479214366, -0.7360473250930644, 0.12506629272602104], [0.9199707510445438, -0.8052502707249187, 0.30441614973803754], [0.8882096088382336, -0.858898638647788, 0.4438126090176869], [0.8686184396709972, -0.9093475731205681, 0.615820862430703], [0.8156982305674906, -0.9273302245961857, 0.7469198924487982], [0.7747957765668044, -0.9485530900422943, 0.8436874844407898], [0.707699053093978, -1.0114119994409134, 0.9412675090239092], [0.6693594521691839, -0.9896840629194971, 0.9729179492148874], [0.6133169070741896, -0.9701850412947789, 1.0021977654524967], [0.5929884489530938, -0.9331084050309902, 0.9888462476586335], [0.5001086774249732, -0.8991739989206002, 0.9501343248179404], [0.4762020972636958, -0.8126802793718072, 0.8259648412825062], [0.4204079653825698, -0.7552903862832898, 0.7701601221925184], [0.3458900006781457, -0.6626206641847326, 0.5036479630271031], [0.31645118847117837, -0.5736225172121394, 0.3847458957702094], [0.22311388494661924, -0.4571844053503806, 0.2003937303254711], [0.17123864724855722, -0.34011940014775444, 0.015796441361357418], [0.10648616701157508, -0.1921876971981264, -0.15135942726555116], [0.06490241572123936, -0.10885121394986555, -0.325721231090192], [0.006909851126878121, 0.020374104343086574, -0.4897963603146918], [-0.0922019904256628, 0.11974912736045101, -0.6491908816057209], [-0.14343170753351878, 0.2988013145843258, -0.8134276057301113], [-0.2282228522617024, 0.4221604858563928, -0.9252728959499031], [-0.2953514795453526, 0.47098976246858437, -1.0199562741581965], [-0.3450118831496566, 0.5700405750984175, -0.9974974887592906], [-0.4277749196096591, 0.6857770105029821, -0.9474805516746803], [-0.4334461281223768, 0.7917697524232468, -0.9885856527479742], [-0.5008212720033612, 0.8622319992019589, -0.9163825839515173], [-0.5469853644531906, 0.9420407560215731, -0.7879639021291408], [-0.6048803615312089, 0.9198106741124128, -0.6779806659829873], [-0.6288320210250804, 0.9746777140085672, -0.514515053091619], [-0.7103175403686474, 0.998404452681747, -0.34741064331348337], [-0.7376613665825378, 0.9682035769915517, -0.12557444463444184], [-0.8021315831927089, 1.0019295388604812, 0.04693968586030572], [-0.8356137429337304, 0.958458452901408, 0.20617187989036292], [-0.864115046093741, 0.8900751602896936, 0.409465842769531], [-0.924444492376189, 0.8074460501112791, 0.5788607077114762], [-0.9382728555022309, 0.7739195343083106, 0.7285785327312151], [-0.9461561133680327, 0.6550877242298975, 0.8735748304405423], [-0.9374469657217241, 0.567579169034921, 0.8960147498162296], [-0.9400888283302408, 0.472655217754376, 0.9765285233375359], [-0.9963429218517916, 0.33234516576668777, 0.9758609506313981], [-1.0035360686440862, 0.23055135102818014, 0.948657627379902], [-1.0052420472436727, 0.09334614214424304, 0.9368347231184577], [-1.023429166038969, -0.058228270638354104, 0.8733193898447625], [-1.0212770220133602, -0.13952190866137737, 0.72843516204756], [-0.9681847887177649, -0.2907026905820698, 0.5751002717311864], [-0.9617298602859932, -0.4007544906124002, 0.4665064522738013], [-0.9462263451133939, -0.5167934605319902, 0.25211594408285165], [-0.9449999257281183, -0.6121050532099966, 0.057780301500923316], [-0.9062868077338219, -0.7178281621306329, -0.12141626594484341], [-0.9079471426897651, -0.7880145453948149, -0.3111582425244919], [-0.8648940854677961, -0.8075314968638923, -0.4721972152093565], [-0.8433028430137928, -0.9528109159531599, -0.6272052535325748], [-0.8205361575393982, -0.9690324726265568, -0.7599631208364191], [-0.7935430804645318, -0.9852421355855037, -0.8646070825069175], [-0.7424359238761182, -1.0074889515048115, -0.9841063385546289], [-0.6397212006240565, -0.9884863799192896, -0.9942479622611193], [-0.6265828845513414, -0.9521989745132197, -1.0005381089862955], [-0.5663159192165059, -0.9087810864124587, -0.9781282509198124], [-0.5421374184717173, -0.9051288781474323, -0.880707613617333], [-0.4637511656236762, -0.8341282818687582, -0.7956079275125695], [-0.38907449422720564, -0.7560151436861852, -0.71138716808683], [-0.38228062287255726, -0.6930041636877173, -0.5495542053532132], [-0.30918288221628515, -0.520197088065522, -0.37607077578763715], [-0.26945886160746496, -0.42042459469026383, -0.19360372133468576], [-0.15490123071438805, -0.31949909920539143, -0.003516185455857181], [-0.09625061276266861, -0.20744087274791492, 0.15615092007533188], [-0.03667745805953223, -0.06746079831121055, 0.3554752426618967], [0.029893349145859137, 0.0461196755826723, 0.5646199842168318], [0.07661709584920892, 0.1569584289096845, 0.6758459673101899], [0.14210610956588254, 0.2398442118549599, 0.7911370574519859], [0.21206341274260662, 0.40312119219062154, 0.8852685235637654], [0.25386703109101283, 0.5077910276748719, 0.9504987439404848], [0.3169420286489033, 0.6075958795266441, 1.0154042770381564], [0.40627738436615046, 0.7307639873189191, 1.0015901833902323], [0.4290034109558526, 0.8137449129123148, 0.9470806583556437], [0.49909871540617884, 0.8912131660984743, 0.8815141481862602], [0.5570793269578211, 0.8924334733329299, 0.7848122840830953], [0.5838461061173726, 0.9826193023639889, 0.639105772472473], [0.6076491596814482, 0.9817038777121686, 0.483145816221938], [0.7084285668739291, 1.013132122083332, 0.30874822325047574], [0.7625599056426846, 0.9314406129095278, 0.11742863866737266], [0.7607033407917178, 0.949038210227039, -0.03736769780005862], [0.8370859830875832, 0.9225534264879629, -0.2192631965788886], [0.8568392291559735, 0.8787585923931025, -0.4343259517937829], [0.8701714738672671, 0.8317516787478014, -0.5701825396743649], [0.9179313514167412, 0.7034016923407577, -0.7192757059393677], [0.9482826305482129, 0.6413685863304514, -0.8406131302698164], [0.9198051700122549, 0.5301534731505266, -0.9343687956340049], [0.96721125787568, 0.4530203131200725, -1.0050921427045119], [0.979056302154982, 0.3203774547925723, -0.9894286024297925], [1.022876811122644, 0.24356033933377164, -1.014496941600163], [0.9981386823696722, 0.06255533827062273, -0.9326650107888695], [1.0082494798562451, -0.03924038146663554, -0.8475321748631813], [1.026190386445643, -0.15148069873462852, -0.7371374438792934], [0.9898116168713993, -0.2708912341364352, -0.578648910942138], [0.9697114130591925, -0.4416668473765396, -0.4527254681699627], [0.9661497753941833, -0.5533270975154555, -0.255038769106823], [0.9353670218570787, -0.6008669387822977, -0.0923655863842838], [0.8832765101072056, -0.7226894512592221, 0.13501964132399494], [0.9171380956638024, -0.8146403998361277, 0.31571668609670295], [0.8437967948291931, -0.8810019530958245, 0.4907774331247499], [0.8472494444918118, -0.9418995046706935, 0.6450198259930586], [0.7590838632399193, -0.9672833690372226, 0.7463745801088506], [0.740717765201052, -1.014848936696379, 0.8863710235239336], [0.7253741258356615, -1.0136151031705816, 0.9579792866031699], [0.6741223248070501, -0.9970249908419473, 1.035062156791439], [0.6040344225004491, -0.9731201789417416, 0.9904734430808136], [0.5629163902852925, -0.9337864591856081, 0.9630261461388507], [0.5003880252600328, -0.8832523584373337, 0.9289607583842141], [0.48164965056687065, -0.8164416853389155, 0.7948710021942027], [0.4098905825624631, -0.7206096812786924, 0.7089305241347644], [0.3551172538856126, -0.6596596805251167, 0.5322607674460347], [0.3037501088189956, -0.5384067220556517, 0.3333337157381478], [0.24072711617193118, -0.42894409384354154, 0.1698358349483981], [0.15060086424424252, -0.34234632282012967, -0.013592010884512949], [0.0752551720883569, -0.1998038728206581, -0.20326803124561144], [0.039462522718887526, -0.09162347752419002, -0.36335953114702124], [-0.04222372464766182, 0.04891740952030149, -0.5284978436271028], [-0.06825403277153241, 0.2083562021096539, -0.7269294773642307], [-0.1408588179326783, 0.2771357064434122, -0.8480645615275002], [-0.19230932047143465, 0.43567763961864475, -0.9131354277672241], [-0.2659733949593394, 0.5190031771783115, -0.9602235527978081], [-0.3125623354223629, 0.6302129146520814, -0.9912041616452605], [-0.3636539977339534, 0.7132006790392487, -0.9734408261179929], [-0.4624267341289055, 0.8304932376087387, -0.9357193661117205], [-0.5094362832654347, 0.8253025247258075, -0.8753175199275331], [-0.5783890425595292, 0.9291182912579047, -0.7400530959232883], [-0.602749680407616, 0.9605100945296586, -0.628698203963033], [-0.6490396945175356, 0.9425234335547379, -0.47463004860790914], [-0.6885597896452396, 0.9946635942724461, -0.2867654464522393], [-0.7469595373800756, 1.0094603327395486, -0.07688856790209715], [-0.7868308644669313, 0.9338384113847972, 0.05924644284536755], [-0.8568139816946106, 0.9480960620826202, 0.2781522630602199], [-0.8425200026589952, 0.8906789472637029, 0.41610988058438114], [-0.8556792794892748, 0.8337663786058136, 0.596512739979931], [-0.9103413930642335, 0.7424242438749468, 0.7407106259056487], [-0.9503353704773972, 0.6804909217337177, 0.849584634681802], [-0.9459884233060386, 0.5408376325174195, 0.9388588376686396], [-1.019756928964865, 0.4179826353654637, 0.9824950316916704], [-1.0128515988968474, 0.3730180767616812, 0.9666273105884314], [-0.9878637045018662, 0.2361029150962508, 0.9909844675492736], [-1.0054320432637067, 0.06749458988901906, 0.941359075536493], [-1.0157272878912396, -0.049543291548476656, 0.8553164254390582], [-1.0024204912300807, -0.17034928256038478, 0.7191393924821659], [-1.0082602318335738, -0.2705428456248303, 0.611068481428203], [-0.9838892380257533, -0.4172127714175635, 0.4169335438187176], [-0.9516044437641179, -0.5410737235206332, 0.2410795279454296], [-0.9381409171681994, -0.6129293338640563, 0.0009715276330159103], [-0.9126209988614937, -0.7117671896301533, -0.11152759428626886], [-0.904862493435442, -0.8106083867594112, -0.29122803721739715], [-0.8957118895828499, -0.8365711857743696, -0.43656549136949935], [-0.8215928486215962, -0.9080482101057755, -0.6725690973863669], [-0.8084394996463974, -0.943743717751295, -0.767819052475828], [-0.7584412768213364, -0.9855668708444066, -0.8696821707284693], [-0.7179541994527681, -1.0004787906662835, -0.9540838219975526], [-0.687601492810595, -0.9873030354462435, -0.9569813124075284], [-0.5837444393124956, -1.0014741953692712, -0.9860861085104569], [-0.5542560104765962, -0.9429688659236273, -0.9858209760842351], [-0.5413195765242462, -0.8916939883016208, -0.8942666015539222], [-0.4631655009139562, -0.8291096989581687, -0.8289881389385274], [-0.3962719973162149, -0.7167426826929493, -0.6967425088379203], [-0.3360049545116185, -0.6851823865156059, -0.5414787566397914], [-0.2707044836837365, -0.5692342196814232, -0.37178982280740747], [-0.19613207206884006, -0.4521798900619578, -0.19538360047461725], [-0.15128154492648532, -0.2821586724210463, 0.004627428702665051], [-0.0850871206457999, -0.17299180162251226, 0.20332299863545486], [-0.043126250702421806, -0.09292859935491816, 0.3487127784393919], [0.04738928029144909, 0.05391371327819814, 0.5708882716998381], [0.10771741473805298, 0.162857032851312, 0.6681915724905714], [0.15862821347266975, 0.28467969898033774, 0.8225992505409853], [0.19759304742927503, 0.39754027604145276, 0.9064500489713234], [0.29190016601662483, 0.531776350537591, 0.9947660993840388], [0.3084685606809528, 0.607078454464996, 0.9968701500466254], [0.4350580803862557, 0.7343529411958281, 0.9693275498826364], [0.4472763711413056, 0.8065374885710657, 0.9361277670523427], [0.5163450556124528, 0.8675749774018292, 0.86472379979787], [0.5825717120054904, 0.891332400878471, 0.7437762890641463], [0.5921033413654007, 0.9487684269153801, 0.613655241547387], [0.6668959044270019, 1.0125886551376375, 0.48946921728857723], [0.6828134365501012, 0.9977910702288961, 0.306387787061602], [0.751302247373759, 1.019534618707996, 0.0994753470856782], [0.7899740837936028, 0.9633371379722574, -0.07036735673421976], [0.8025037178495673, 0.9150580091916987, -0.275685941858014], [0.846783444632584, 0.9122767774224669, -0.41400306198382575], [0.8843858732380766, 0.8185318073704534, -0.6302971948955636], [0.9121209815691397, 0.7391403617503385, -0.7151509105174405], [0.9456897720132671, 0.6538512371142043, -0.8455669353266329], [0.9642667185180915, 0.5163081811128843, -0.9430891041651254], [1.0035255826453646, 0.45117101000658477, -0.9749207629455912], [0.9882484012376409, 0.33146254280722526, -1.0187978472883996], [0.9634964542099904, 0.18918321042301547, -0.9687435063471858], [1.0015027341073528, 0.09254508549749453, -0.9173062234363363], [1.0005396115865168, -0.026885374912737205, -0.8137105542517753], [0.9940245400147157, -0.2003526683782912, -0.7368405645006113], [0.9851623678677902, -0.3076671052847944, -0.5423624379782066], [0.9432851923826011, -0.41890936794424083, -0.4332378473284025], [0.963857347625387, -0.5206728920882084, -0.24178551390336314], [0.9529620898079493, -0.6346361438526814, -0.0507547120359986], [0.9110993568818275, -0.7100266982868769, 0.14379824842326197], [0.9243906507452259, -0.7785966328304487, 0.33529275796710734], [0.8196747253639317, -0.9019327642602961, 0.515622828334798], [0.8198763403345829, -0.9220150302517173, 0.6373663493824694], [0.8029926233520108, -0.9473737786761502, 0.7567896406107599], [0.736474809988205, -1.0243565149356535, 0.8889347440632202], [0.6765752838778352, -1.0072907297657197, 0.9665550790998355], [0.7053702194991162, -0.9856862222946196, 1.0191766180460993], [0.6210924304183776, -0.9642628223320984, 0.9925690431166403], [0.5575091641073253, -0.9090180744488581, 0.9715673523276286], [0.5189308548508105, -0.8919915010250563, 0.8902383924166886], [0.49855961233866186, -0.8145972218323004, 0.8248828759249665], [0.3900016319411234, -0.7177844418457638, 0.6770369492121745], [0.3339458812188067, -0.6298163517156508, 0.48942714503533996], [0.2937735490523952, -0.5258644071099574, 0.356343917676206], [0.24764430625163938, -0.4332208621071745, 0.16603109126029236], [0.16679571836971205, -0.297936813521104, -0.007457251685493308], [0.09280025687505272, -0.2136453081404747, -0.1927831653744282], [0.01879378732635963, -0.08549455195400009, -0.39903020355335395], [-0.02714468194797382, 0.04064911989797308, -0.5748363638087669], [-0.10424786157579248, 0.17771849966342504, -0.6896238973872617], [-0.15213771368093798, 0.2817197065696424, -0.8159217608995526], [-0.2088330303171674, 0.41138024946091784, -0.9290808495620512], [-0.2921744874603162, 0.5203493537923991, -0.9291184056650963], [-0.3538846927180252, 0.638420959270396, -1.0133804559037227], [-0.4047551650651459, 0.7110892699724674, -0.9733052717977112], [-0.44402503980602814, 0.8032762409348521, -0.9343840598980803], [-0.49192372006279234, 0.8567655689846947, -0.8550869780277899], [-0.574327419826025, 0.9446477318403772, -0.7420764389068977], [-0.6028680875314852, 0.963137021572808, -0.6313845633050578], [-0.6647661475093561, 1.0068791888784547, -0.47645268522519657], [-0.704443642346545, 0.9650362910892787, -0.2831143798177844], [-0.7693015166834065, 0.9663169522468203, -0.0932290400921932], [-0.7845778168299528, 0.9608164818647296, 0.07875081350259444], [-0.7804383056144072, 0.9274824035993975, 0.26615464776211595], [-0.8466214745976469, 0.8800732253281421, 0.46572343969340124], [-0.8845276947842603, 0.8266349693136407, 0.6148069479132151], [-0.9040599264995398, 0.7308222667047575, 0.7488477572106834], [-0.9456499505737702, 0.6524588168207552, 0.829509984302534], [-0.9452516685554276, 0.5589167293646623, 0.9528994735983196], [-0.9776061268721709, 0.4391249382844666, 0.9708683864112321], [-0.9706742491787675, 0.29032073841966205, 1.011596808972989], [-0.9847505826417445, 0.19878920175834427, 0.9686163564588854], [-0.9842515731697183, 0.029246196375352508, 0.9362386687663191], [-0.9957250170311057, -0.03869529143236195, 0.8351502270534321], [-0.9589361687716439, -0.2033131934724456, 0.7242897309825381], [-1.0056288167232932, -0.3088517432158596, 0.5826244410850799], [-0.9637022444502203, -0.38173988244937396, 0.39627030808627234], [-0.9349325755393983, -0.5387337641447205, 0.2104863139494336], [-0.9737545767578435, -0.6322786733263422, 0.027315016299124632], [-0.9012657594836968, -0.7379416566717343, -0.15989375839645867], [-0.8844125671696659, -0.7732968181110169, -0.35490030376332826], [-0.8409175718445915, -0.8578227946819045, -0.5084870358712116], [-0.8141198129023668, -0.9347425014809092, -0.6096886321843593], [-0.7929555447501975, -0.9665196710310636, -0.7933553532680966], [-0.7845413862029571, -0.9971635028564398, -0.8839920528093704], [-0.6776440264533716, -0.9901596212726661, -0.9626705795602232], [-0.6606553759749172, -0.9857481603266482, -1.0026756566234016], [-0.5997839939306085, -0.9364090200744185, -1.0032505262312374], [-0.5384268529014337, -0.9126892047439812, -0.9507800517909002], [-0.5072629879127394, -0.8700655978135032, -0.8972796845719933], [-0.41767337637035173, -0.8239392264558616, -0.76994407231894], [-0.36652861565860334, -0.7359907777786464, -0.6409013229520978], [-0.33618374357005726, -0.6367097149804055, -0.5137075775514132], [-0.31153750530368024, -0.5253461640723515, -0.3131615543933354], [-0.23245247469713887, -0.4092308392108569, -0.16141211080239018], [-0.17844354962810674, -0.28935826207447474, 0.06200635484520322], [-0.11008728350502223, -0.18325061946518714, 0.1864804919982589], [-0.03228233729054857, -0.0531319619876232, 0.4296815246731424], [0.06259366524164037, 0.09570325687574091, 0.549421973503239], [0.08929893495764023, 0.1542805448773871, 0.6911245691054863], [0.1275531800916504, 0.3166267993216038, 0.8119117121546803], [0.19632962084834144, 0.41906932365441324, 0.8932631782346988], [0.2854432196885788, 0.5419935931178442, 0.9692070080861521], [0.3244498608864033, 0.611168083256195, 1.0105615925738602], [0.40209746488262216, 0.738814400404638, 0.9817820727199591], [0.4500522763332471, 0.838411146316267, 0.9292882794894118], [0.5032486198327097, 0.8916991168904546, 0.8673347842979966], [0.5216450140771058, 0.8964579962279698, 0.737464430601024], [0.6316347275555656, 0.982344244789801, 0.6238296617987193], [0.6744091217565842, 0.9729160725623631, 0.4664434869615117], [0.6892368049520511, 1.0189447478640394, 0.26906429878690385], [0.7563048268148536, 0.9544104671844982, 0.06723764434104068], [0.8125271876728438, 0.9819628303058582, -0.11854778551999892], [0.8533399730510081, 0.9072412843780039, -0.2788509429873834], [0.8516678155019035, 0.8568365967453987, -0.43104013648276107], [0.9252053026107673, 0.8112866184157651, -0.5828982955047289], [0.9125918058164832, 0.7295398135407059, -0.7480337693126299], [0.9181613277570277, 0.6455212236936396, -0.8470692345572337], [0.9571831297294948, 0.49981273703986395, -0.9339369242070574], [0.9459105806914234, 0.4071052593838229, -0.9852782475190234], [0.9725154776537022, 0.3113975526176968, -1.0039795401118299], [0.9630900414920165, 0.18783623802506472, -0.9637954912994964], [1.0198017800780013, 0.0523831033878792, -0.9182009596525723], [0.9695527244422735, -0.02669370551982045, -0.7957662857447005], [0.9947670501817418, -0.19315148048595765, -0.7640509117816412], [1.008121544715045, -0.30104782060833224, -0.5437295224263372], [0.9674192093758506, -0.4384089305635902, -0.41935604578978875], [0.9753345889568904, -0.5139131447862387, -0.19282341776531528], [0.9439743922299287, -0.6469084607163643, -0.0493515064093157], [0.9029309914033978, -0.7223243166289726, 0.15399078508253142], [0.9229047545166162, -0.7883660658463795, 0.32997151426864757], [0.8353543388940466, -0.8892973454381893, 0.5335012110504113], [0.8153805328011121, -0.9204455297565198, 0.6528808569722182], [0.7956478505731015, -0.9591211921906272, 0.8123434800513515], [0.7772557509465887, -0.9664751081873605, 0.8823164648644767], [0.7024966924230727, -1.023459376379881, 0.9568039655629005], [0.6599799164331906, -0.9995752922959744, 0.9859134890731612], [0.6315837521004775, -0.9491858894954787, 1.0030813962311749], [0.5344245740663385, -0.9238704093065067, 0.9512058220567116], [0.5331075831842192, -0.9098256848462013, 0.8774684670826726], [0.4398741902118251, -0.8151945975968691, 0.8060074444900054], [0.34758833452590804, -0.7293730422850013, 0.6741507826405858], [0.35570559466239043, -0.6440825331376344, 0.4904954320435423], [0.28316615584853194, -0.5279648663243118, 0.33454034558161266], [0.13926057680787, -0.4430229573672761, 0.13312345509970844], [0.16634324913539944, -0.33214414256801283, -0.058647208156567605], [0.08798334256799827, -0.20713703940825895, -0.2116214234170291], [0.020470784486947367, -0.019916930537908828, -0.41586857648484454], [-0.046110876875144174, 0.08521781038016189, -0.5808619212909188], [-0.06710115195945883, 0.20339905008234216, -0.718160584913497], [-0.16291088772908766, 0.37230509331784783, -0.8213614299505154], [-0.2184162920027243, 0.42920731790961814, -0.8999406527716385], [-0.3126476467499549, 0.5379787110888498, -1.0342255975003132], [-0.3526882958438971, 0.6597461459447451, -0.9720769450402891], [-0.38828726140419545, 0.7466146971066712, -1.0207223432473684], [-0.470777278906974, 0.8427352855419704, -0.9485506157974166], [-0.5149245759949765, 0.8637167560892756, -0.8751194633524122], [-0.5745799512949843, 0.9192845181611622, -0.7252648540646052], [-0.6116018616093946, 0.9908253670486677, -0.6337061628338067], [-0.6396992978415312, 0.9934837136212653, -0.40921161291113595], [-0.710936415061638, 0.9701010595744886, -0.24452006083501612], [-0.7554760032604249, 0.9480396450756822, -0.08191522829076694], [-0.7880103282245199, 0.9880558324246158, 0.03182711329100518], [-0.8064117220228528, 0.917219970310451, 0.3268214656640025], [-0.8972291783027428, 0.8831529760579035, 0.4710169581566716], [-0.9013681527547776, 0.7885210122647742, 0.6133667109807086], [-0.9263915372014507, 0.697974423932768, 0.7767229387835941], [-0.9641964684629589, 0.651127424598165, 0.8302400898204726], [-0.9650651058509628, 0.5250720580853369, 0.9441181643260239], [-0.9577619577679055, 0.4135772678073188, 0.9801668714119078], [-0.9923779423306872, 0.319951014723145, 0.9749873892951288], [-1.0163997360352333, 0.13915770610951583, 1.013954288865147], [-1.022837662227879, 0.015726440875634372, 0.8969887430273671], [-1.011595241423018, -0.04295679189577553, 0.8112121620277456], [-0.989262259836079, -0.23264053756220074, 0.7028882076676324], [-1.019890019947546, -0.32454561586895103, 0.5369472699165514], [-0.9736624167312065, -0.42200490703161636, 0.35924385887448856], [-0.9816150632891002, -0.5403715845126762, 0.21982438650993597], [-0.9108061737178728, -0.6546312705457431, -0.010949025907126174], [-0.9119743141089597, -0.7518409418418548, -0.1874761696120495], [-0.8604753251650541, -0.8026988052845098, -0.36541920501267705], [-0.858431061562523, -0.8830318518722209, -0.5169714883020099], [-0.8322004483705229, -0.9716380141635867, -0.6907484048288997], [-0.797487627076688, -0.9706395169450501, -0.8199894497192289], [-0.7427764895701747, -1.0010450999414908, -0.9123170267197832], [-0.7286102015599741, -0.9910095998724647, -0.9555819604755826], [-0.641121967633413, -0.9796722340568278, -0.9843026899712036], [-0.6008079486010155, -1.0008902418873644, -0.9997041691878022], [-0.5860142254967837, -0.8981413774118207, -0.9564508876357082], [-0.4786844388816272, -0.8913103460008145, -0.886116352353631], [-0.44353169520628727, -0.808741235667118, -0.7772429517573608], [-0.3621007835862355, -0.7415054873845799, -0.7027544383565705], [-0.30112731195539316, -0.644053242028417, -0.47347082647833344], [-0.26017988760305444, -0.5299792885919841, -0.3166354293032895], [-0.23502677146977888, -0.4130468380175533, -0.1291736405802523], [-0.1658614763406714, -0.30493565860941396, 0.05339220931048449], [-0.061473434217968956, -0.17525954004932465, 0.2250486205802365], [-0.028083560880067984, -0.027091051423264813, 0.39905893211865734], [0.031723244736593756, 0.06275684901769227, 0.5714096901674607], [0.10473574989892132, 0.22058474925522298, 0.6761834092606108], [0.17390829048033005, 0.3034215460361312, 0.8482049480665109], [0.24928410842359577, 0.45743491069689907, 0.9274843008280901], [0.3019865447532273, 0.5280111967658072, 0.9781400293727714], [0.37536295572820366, 0.6318077710418563, 1.0038450675495256], [0.3959028150384226, 0.7341713622280832, 0.9929314768276853], [0.4546139592943376, 0.816822854262136, 0.9246716969797504], [0.47840272373739257, 0.886661795289193, 0.8603254829286208], [0.5954095553787849, 0.9321213474044069, 0.7101882977215391], [0.6033035180347499, 0.9827540563590178, 0.5967391079308529], [0.6721417308655445, 0.986713325235669, 0.4749310988489315], [0.7466520456566555, 0.9812679592576832, 0.27928991597833736], [0.7608939753570928, 0.9904954439969926, 0.05822151224867832], [0.8269789165813931, 0.9882061355180566, -0.1420977120941504], [0.8588117084808791, 0.923562614170262, -0.3092730019709293], [0.8449172001683073, 0.8880493978392182, -0.4631271155792174], [0.8768542867256559, 0.7840193668874222, -0.6359601541001209], [0.910438942140054, 0.7292397311115959, -0.7554205328476796], [0.9306871002143695, 0.5926199883563178, -0.8973773713524253], [0.9797816194132399, 0.5030715087449996, -0.9452703073336579], [0.9422920882716446, 0.4198424449572499, -0.9522656641301166], [0.9623029351433938, 0.305319800701579, -0.9932055592855908], [1.014620589621637, 0.1694746763774646, -0.9657484091184637], [1.0033613568333781, 0.05861042573172165, -0.9260631444065929], [1.0030764674237693, -0.06233095961597228, -0.7917210032800701], [1.0046962977930596, -0.22562658270597435, -0.7230199948555293], [0.9945746479125271, -0.34446267054782465, -0.5273677841945777], [0.968366193167515, -0.4201162940667501, -0.33472519838937065], [0.9567430588116606, -0.5518289858001715, -0.1765680685389845], [0.9593469274519612, -0.6159537596913852, -0.005515924415274118], [0.9017812602783222, -0.7400374235568499, 0.16580605433223594], [0.8919884684771798, -0.8360656481231639, 0.3777165000411629], [0.870387398985108, -0.8814921169304185, 0.5288184738735544], [0.8183673232351881, -0.9096262014833778, 0.7019329517669205], [0.7878173789779632, -0.9898140522452776, 0.7804522878975239], [0.7501584601491743, -1.006881596238267, 0.9107739840952325], [0.693231426020205, -0.9843753397735284, 0.9706784844461045], [0.6747137596787754, -1.0344588207696714, 0.9929558551895153], [0.6502866389288928, -1.0141335670508949, 1.009909191752434], [0.563112929199501, -0.8974115781073323, 0.9498938341755205], [0.5251681813686652, -0.8432553715848277, 0.8837698929176574], [0.4227064881176908, -0.7800914479927743, 0.7556033583020609], [0.3861011971801001, -0.697555758599534, 0.664639110145746], [0.323213870936741, -0.6107745092107472, 0.45685577470996147], [0.2607441028583938, -0.4909063340631031, 0.3421712691018172], [0.22252620966588588, -0.4118703316569219, 0.14865362496081727], [0.1468005407793912, -0.28795439112569043, -0.05479416705889129], [0.06929551835428206, -0.15448232409547907, -0.26422328186957383], [0.03752828101002753, -0.06322415143382963, -0.4349090101842881], [-0.09768714655676929, 0.07855043282835712, -0.5794018581950927], [-0.08704871367116626, 0.23228323160565884, -0.7550071476170079], [-0.1462039368271088, 0.3179223557857558, -0.8429193430919272], [-0.22966013198752824, 0.43417956722772744, -0.9456823098068495], [-0.28272485596794344, 0.5683565472461956, -1.006549069229126], [-0.34831268782174885, 0.6397922914280545, -0.9780703763530049], [-0.39629039961557466, 0.7724766440341103, -1.0141034406925165], [-0.442110390960069, 0.8237558833168502, -0.9458735807550536], [-0.5078124905907013, 0.9170575738530766, -0.8144596583938276], [-0.553907626492764, 0.9171426055510159, -0.7254870855800886], [-0.614003543321642, 0.9982466132088741, -0.5941422246433288], [-0.6685854380840179, 0.9813857818966545, -0.4156705719017829], [-0.718604846210097, 1.003510666039038, -0.2613818794041815], [-0.7559269597303359, 0.967719129553957, -0.06278692657828237], [-0.8085053639894818, 0.9772167619824776, 0.15927344706220556], [-0.8159724087983382, 0.8995134394085609, 0.29912547682679325], [-0.8982193054667849, 0.8662968050222846, 0.44394106761644075], [-0.9197672697993434, 0.8183789953117121, 0.6527425966232546], [-0.9523192321645535, 0.7053478331501268, 0.7783292857328948], [-0.9365885402206146, 0.5883086508990779, 0.8804986892604331], [-0.9753872435104028, 0.5415699185608038, 0.9464640450212763], [-0.971027185724763, 0.40397957840485055, 1.0052276420061326], [-1.0046887780736864, 0.301674256165821, 1.0223004400668725], [-0.9598183899922011, 0.19757627878785433, 0.9581916234689716], [-0.9882480997945544, 0.05702014419376271, 0.9171150225561285], [-0.9840293968569239, -0.07632705220363915, 0.798673830314833], [-0.9903137446866699, -0.19220619891155422, 0.6943388467528625], [-1.0078074935509294, -0.34772541593582756, 0.5281309900998539], [-0.9775025507868916, -0.44284126111698624, 0.34894581791483836], [-0.9411837393161459, -0.5919041408695118, 0.19815369717393122], [-0.9268440307150373, -0.6418707253570715, -0.0613265074925611], [-0.9401468368613097, -0.7514599662365474, -0.18418800251416162], [-0.8873647364382343, -0.8385711135982246, -0.34280220183956134], [-0.8483293013151421, -0.8950873727850603, -0.5560448945527418], [-0.8191383093087444, -0.912894818080803, -0.6843838454106758], [-0.7835915748718962, -0.9727962325458357, -0.8071510707155487], [-0.7469662732383003, -1.0142388195879486, -0.874722587374889], [-0.6859692103071768, -0.9573792063404087, -0.9589563873203206], [-0.6569983753918613, -1.007781013380042, -1.004719475677951], [-0.6265050980984104, -0.9204236957146122, -0.9922427517339262], [-0.5364125141910869, -0.9014496899365252, -0.9288575713098981], [-0.44768027556828566, -0.8663569933906021, -0.8789485468688539], [-0.439880254804596, -0.7795774733372495, -0.7654989301929646], [-0.39132658434229267, -0.7264110333397283, -0.6510293017214275], [-0.321813587190569, -0.638361246914926, -0.5157294378606064], [-0.2648578255394575, -0.4916506918880803, -0.29310040900234213], [-0.2064234682233369, -0.39522628583626596, -0.1552929841025656], [-0.15794673435710752, -0.2517351918882143, 0.0896606522787964], [-0.09590355528393832, -0.12771226699681637, 0.23760742574327065], [-0.035331145553905124, -0.00700954131538261, 0.45516319080246925], [0.03224091197030899, 0.08695713191936272, 0.5839893492154807], [0.11680023647344283, 0.24356392455184178, 0.7423093882737081], [0.16672273209006133, 0.3062137945571668, 0.8620971022626815], [0.20615692776345376, 0.4450565188305418, 0.9505251798738155], [0.30754347247851344, 0.5741408417681371, 0.997101719459047], [0.3537872400790023, 0.663169477757619, 1.0018303421610277], [0.41868519058519643, 0.7572069171481514, 0.9840252962049357], [0.47585601424323637, 0.8103852355361717, 0.9217548322060686], [0.524894683202048, 0.9271091263037018, 0.8520722702072905], [0.57023753570741, 0.9347492003837369, 0.7401044285080867], [0.6213689415513626, 0.9875754663854444, 0.5934392377383978], [0.6463096599968966, 1.004553345904698, 0.42980400687855835], [0.7324272808448905, 0.9829010999055908, 0.2647322360591379], [0.75558734164228, 1.0281568773008365, 0.09163693222182243], [0.7861903348401676, 0.9341369383491864, -0.11773731012874239], [0.8182233675756517, 0.9424072818517724, -0.30468113139861996], [0.8385213078446494, 0.878504843169802, -0.4849383621828383], [0.9053756084208616, 0.8231158227376658, -0.6453759064856315], [0.9382860338219723, 0.6979131188875954, -0.7865314579810644], [0.9411044223203995, 0.6035016255188826, -0.8684644704481033], [0.9376016215001238, 0.5287958708395025, -0.9685882462474065], [0.9864150486901863, 0.3766580009383644, -0.9834983832246234], [1.0114608656426551, 0.28247654393281996, -0.9665250881324333], [0.9939882931182, 0.16792228282514862, -0.9850463148519364], [1.0086190450147894, 0.023222426957604195, -0.9156746105578671], [1.0305626319172456, -0.11647543979011817, -0.8063003754550897], [1.0083761627715142, -0.21060672262074656, -0.7151506092553953], [0.9974271458610731, -0.36368322371035106, -0.537194473433881], [0.9677962016524757, -0.5100077827831706, -0.36181909960789965], [0.9694842826824773, -0.5633764746582631, -0.1746061078220359], [0.9811070426295289, -0.6369847688755278, 0.010608544002810572], [0.9636152008862954, -0.7613183688229683, 0.20720549753905654], [0.8527403049506395, -0.8178924208630596, 0.37498879146957775], [0.8543895985297726, -0.8826670429223242, 0.5498323311512114], [0.7972483095228338, -0.94789614344164, 0.6920505207682202], [0.7524069554252213, -0.959472783471769, 0.8527231139159712], [0.7462625673934956, -1.005957993836414, 0.8632313759397697], [0.6660477129229889, -0.9927691979414561, 0.9964473271465526], [0.6455842356731047, -1.0176535522949701, 0.9812329191473692], [0.5894910592115878, -0.99930354969531, 0.9844484800139328], [0.5673567132378907, -0.951851745194615, 0.9363086809075548], [0.45542323317510847, -0.8776528148049628, 0.8677495335814466], [0.46077273718481665, -0.7815994662434653, 0.7393434418716007], [0.3849261987935682, -0.7143411471132245, 0.6279728998922588], [0.3202398989313847, -0.6071612929116912, 0.47477064480788955], [0.28145953895242115, -0.5071696625504822, 0.3311410970041063], [0.21337197570443495, -0.3679568433917778, 0.12738703225849565], [0.1275856172016832, -0.2544045253511853, -0.051705314549050946], [0.021096299380362463, -0.16755867103199917, -0.2322285425224395], [0.03681079984055052, -0.0606505411015003, -0.4203358639649736], [-0.012608871327310173, 0.10633620478839345, -0.6279255980456335], [-0.12552001822537726, 0.22636815374412614, -0.7423752940493569], [-0.14654622924003677, 0.3536883452076503, -0.8122586395908219], [-0.21326235772295402, 0.4654614933908731, -0.9410406371749773], [-0.266236620060114, 0.5626874250912011, -1.0053234542930123], [-0.3528497026563817, 0.6600171282632442, -1.0197708629035052], [-0.39534447865441846, 0.7478637406376482, -0.9715901950454842], [-0.4839787084573196, 0.824334714698915, -0.9088487105197934], [-0.5279042842553915, 0.8841988413002306, -0.7926717957720754], [-0.5691829542585238, 0.9559616360872116, -0.7037685760144238], [-0.6238309041184834, 0.986763343521439, -0.5949779206061148], [-0.644594755848962, 1.0206389669303875, -0.40810902620301936], [-0.7185570073548606, 0.9746624364201383, -0.21310135498130894], [-0.76606806171239, 0.9996116316226463, -0.07598027966154092], [-0.7876122303267811, 0.9562693732604883, 0.14126637658682836], [-0.864707044286158, 0.9305472877330848, 0.3119667587733228], [-0.8700932166917316, 0.8757512002089632, 0.49418443979996685], [-0.8587932968751989, 0.7708085061280312, 0.6547855723455238], [-0.916063716307721, 0.685057611539618, 0.7827303755548057], [-0.9503846248766039, 0.6154584370643522, 0.8933395574150557], [-0.9369359520555264, 0.5125565105529135, 0.9671042387976415], [-0.949512980043066, 0.3629502280122928, 0.9888949867892268], [-0.9894608162203681, 0.24513067756673082, 0.9983211104817437], [-1.0441495380333716, 0.16759380638923665, 0.9345081565559391], [-1.024923570570286, 0.03878574514765021, 0.8637877600936443], [-0.9577366687359928, -0.09500046305404815, 0.7964176531083506], [-0.9697110709641592, -0.22302000910330178, 0.6760536610518986], [-0.9879257566266854, -0.35205648538478124, 0.5277197733149819], [-0.9614456483696946, -0.4826725675845749, 0.3332589944174429], [-0.9684294586482092, -0.5657663310672842, 0.1759270873029768], [-0.8916369437702477, -0.6587075577809585, -0.0223409356025452], [-0.9248773190842541, -0.7330405871837645, -0.20629079991782542], [-0.8759648213615799, -0.829402694817231, -0.3749257931815414], [-0.8419551376194735, -0.885449004048105, -0.5520459413472022], [-0.8150224613499651, -0.9347060703544642, -0.7371935104486165], [-0.779704038159873, -0.9572720859002091, -0.8301012937577933], [-0.7798759116073982, -1.023687067166918, -0.911651977645662], [-0.7086209975051337, -0.9966676375742609, -0.973772489742855], [-0.6569759636553695, -1.0052140514989645, -0.9951886648806322], [-0.5970404524822386, -0.9613644846639068, -0.9718810307747051], [-0.5428521867291343, -0.9276274592196274, -0.9516146378325531], [-0.4944146808710646, -0.855593015392228, -0.8393037228763327], [-0.4037614656390744, -0.7962266016127706, -0.7772685511320823], [-0.3909974283868193, -0.6948021538263357, -0.6042066510788645], [-0.329415640822014, -0.6267330526219304, -0.4551588409152132], [-0.2486246519667142, -0.4833866816883886, -0.3010762171905286], [-0.19332993572047638, -0.42437804412954333, -0.10571727889406377], [-0.12355704784471896, -0.24354373977516094, 0.09083598609541814], [-0.0802370674355674, -0.17849404049474044, 0.27474639033294285], [5.656054254942269e-05, -0.004881930189240744, 0.4508391049113573], [0.03118514302653708, 0.11153191467598492, 0.6397379302406483], [0.10772089994865802, 0.20844248728565062, 0.7378036654555391], [0.1749328703694182, 0.3345039032319455, 0.8705574148035244], [0.24534581392970084, 0.4533178311673297, 0.9376677331830023], [0.266548519669598, 0.574191171604878, 0.958523826902601], [0.35120605729242593, 0.6573290239077548, 1.0090537665609858], [0.4058819399077386, 0.7538735686097872, 1.007461870019833], [0.4397480682875493, 0.8334039148499676, 0.937978417936782], [0.5130905487093035, 0.8947556624162903, 0.8039226701790839], [0.5459001767729696, 0.9578422787156664, 0.705558712609412], [0.6019663003615826, 0.9680876599570251, 0.5798656773233193], [0.6869046077069478, 1.0172175941417454, 0.39321850571904277], [0.7083184874229573, 1.005845120120512, 0.2445062269484853], [0.7555126631377984, 1.005565959501682, 0.03107173200661633], [0.8428722316025481, 0.9235960342390502, -0.11966502970723164], [0.8081209946713784, 0.9389020666517488, -0.3314112932887837], [0.861637042061159, 0.8382621911148487, -0.5226305593390638], [0.9135291696557399, 0.7941092261660464, -0.6608852919124156], [0.9249939340734087, 0.6835397128190213, -0.7894908700248638], [0.9652140689547811, 0.5877990363541031, -0.8782100419513468], [0.9564931110522621, 0.4708097072625373, -0.9376493591679492], [0.9526490115651471, 0.379552173925129, -0.9737112667423372], [0.9749137826939083, 0.28904278936020616, -1.0049575828944555], [0.9953987558074548, 0.18495605415625427, -0.9388091357886417], [1.0016631368589881, 0.008931572974845729, -0.8923940957054131], [1.031646305676345, -0.06014914556057701, -0.8050396068853833], [1.0223045719676391, -0.25911132063172326, -0.652454133977369], [0.9917441348482412, -0.32710157425596403, -0.5288644802084257], [0.9741220953448768, -0.5000295180420085, -0.35463389404653095], [0.9539660620752695, -0.5664617289261153, -0.10386857962925139], [0.9234488637378515, -0.6684798534151828, 0.005245568989562341], [0.8715474458539629, -0.7389046538668211, 0.2333842628712121], [0.853809501313531, -0.8666822515345349, 0.38190570036174315], [0.8832166369275682, -0.9255025506695622, 0.5735997494945727], [0.8177016740986401, -0.950474754463912, 0.6933356472347603], [0.7819466404050953, -0.9844288364662935, 0.8178651042765248], [0.7317972724676598, -0.9742971532060178, 0.9212175460589702], [0.693317907467919, -0.9714473903691943, 0.9701582908293567], [0.6738501872721461, -0.9993966693655412, 1.010077438736089], [0.5894345548453895, -0.9584527815272739, 0.9750459956238424], [0.5383356304057186, -0.9271731446930641, 0.949357012790718], [0.47394256495219156, -0.8440787370038021, 0.9082178756770907], [0.4035922552900771, -0.8303930537612418, 0.7309171453405875], [0.3920952002864321, -0.7129422623865459, 0.6249888163374101], [0.33725813988865333, -0.6084678014113599, 0.4721179101164817], [0.21266953396212698, -0.48194701662148653, 0.29526166893635625], [0.194836284231912, -0.36587882774240754, 0.12303468027674433], [0.1734683916440126, -0.2283376302232366, -0.09307853946726807], [0.06944156792711347, -0.14571595678804652, -0.33273997087151624], [0.023397207845313867, 0.028119809106881534, -0.443082276736315], [-0.0818646508922265, 0.08682363142249527, -0.6321867885503114], [-0.08295187449832567, 0.2406637471274343, -0.7379009817620175], [-0.17122107687966603, 0.3286404762579447, -0.8801413115311757], [-0.22617061380180187, 0.4673039627382516, -0.9784530024816471], [-0.2846103376707594, 0.6012668484885658, -0.9877788357439745], [-0.36600801989711357, 0.6985470665152724, -1.0033699702597323], [-0.42990065085315693, 0.728153220070086, -0.985351060951902], [-0.4365682099601632, 0.8578988425128822, -0.914583989696129], [-0.5284356678965942, 0.9169261623466722, -0.8238204214857932], [-0.6059170442087004, 0.9483532131093111, -0.7019362497961662], [-0.6304055159244194, 0.9840099561659842, -0.5738437755639401], [-0.6750928941675494, 0.9647208673717911, -0.4130603013576215], [-0.7279202861311844, 1.01101131104733, -0.2212477030536768], [-0.7562288296097613, 1.0058025096265786, 0.02009256746907881], [-0.8098600058844899, 0.9432921071250877, 0.16045363530136675], [-0.8358135803512561, 0.9227974919665112, 0.3582587670649856], [-0.8778940533973972, 0.8677124246941266, 0.5138328757155772], [-0.8767136127183801, 0.7754142149715176, 0.6670035714036853], [-0.9213067819980691, 0.7191163833003311, 0.7925447450002846], [-0.9692302112127317, 0.5670231981873989, 0.9136000921675194], [-0.9537280873611025, 0.5291482692246623, 0.9633670005668178], [-0.9790149620964401, 0.38663390242177026, 0.9852644169111736], [-1.0051578970582071, 0.2728987974125575, 1.0187158387455726], [-0.9854216294329199, 0.13142136142976082, 0.9673834249768676], [-0.9964398192593726, 0.004455993382484123, 0.8641947623339865], [-1.0150982476222457, -0.08593407542303907, 0.7919282382741243], [-1.0052370547285516, -0.23214338548477179, 0.669353338189222], [-0.9944990618156176, -0.3691134192679471, 0.4685629645638303], [-0.9486767096886245, -0.4566020871145114, 0.34654006466875975], [-0.9421232599145469, -0.6160586841059037, 0.15258007889268987], [-0.9235062759275026, -0.6721442733797149, -0.08474122908154835], [-0.9104581881938675, -0.7661130548391631, -0.20372832881363398], [-0.8819066110146783, -0.846754450080626, -0.41368956285952707], [-0.8337577636850872, -0.885068041795864, -0.5720346386256995], [-0.8212248516096431, -0.992526293734994, -0.7529159643071126], [-0.7917727296150004, -0.9823768703077115, -0.8469537618545887], [-0.7640980422344147, -0.9977700331598635, -0.9211199772223083], [-0.66348041918336, -1.0059866204393217, -0.9822457182165355], [-0.6571292948757398, -0.9327306394434224, -0.9868269753876161], [-0.6099353211112112, -0.994640954921101, -1.0121808304933706], [-0.559987097363967, -0.9378159268313078, -0.940447379390877], [-0.5080327001499428, -0.8836292773554308, -0.8436927593273903], [-0.462679959517678, -0.8300886518359218, -0.7256743029246419], [-0.3385068362317491, -0.6933989986890695, -0.5922318943666243], [-0.30186325554142207, -0.5513143755628668, -0.46580467952879934], [-0.264102191713395, -0.501957349834606, -0.2691210086623316], [-0.19788668188383043, -0.3817849016376631, -0.08196529011229643], [-0.09213520121194776, -0.2556158715153257, 0.12016530213715078], [-0.055770916674548345, -0.13079844332972893, 0.28296899446699436], [0.009805630262203331, -0.0475914160757679, 0.49358039304368206], [0.06992568656018039, 0.11497803356995762, 0.6205894208457872], [0.1236139427498507, 0.2530036703310967, 0.7661220873248973], [0.20869250276928325, 0.3910523088875105, 0.8878981784788096], [0.21300636417573895, 0.46071275049869864, 0.9639787924837913], [0.34593544579463587, 0.5663374889845237, 1.0013265104210212], [0.38717979377163736, 0.6779994333815209, 0.9747382091539131], [0.4595848128171992, 0.745639818395475, 0.95860776326477], [0.48204251095661094, 0.8391741551841015, 0.8948198572306306], [0.5645113579526824, 0.9103074102209892, 0.8386189052189101], [0.5823323196432327, 0.9473613139694101, 0.7251854417669228], [0.6226976582855269, 0.9730032073004115, 0.5614694281580447], [0.6985889575388862, 1.0154158567184095, 0.3671160080674199], [0.7035447401043581, 0.9816875870973409, 0.22375666359623475], [0.7847060684947122, 0.9906694305532725, 0.024818196524385577], [0.7728352623687107, 0.9606867070995355, -0.20045453319736123], [0.8579988511108672, 0.9029703694551017, -0.3460117114597628], [0.869511662059942, 0.8482721209116026, -0.5425502564229782], [0.8992431759078725, 0.7757855738262925, -0.6670883094982945], [0.9387819816047428, 0.7015456219959917, -0.7929508753762359], [0.9364434195812055, 0.5699065628341775, -0.9171758441020139], [0.9509853295893098, 0.5073648633534492, -0.942556151215623], [0.9654259568317506, 0.3540290689712168, -1.029236354712841], [0.9790220804455629, 0.2663737845156564, -1.015874625177696], [1.0214379211062823, 0.14214555206719492, -0.9348485278130968], [0.9840583061927164, 0.02367638873127964, -0.9064655465927732], [1.0121443558123264, -0.08727805309596876, -0.7524753342156135], [0.9820535822096729, -0.25743113163146636, -0.6533111780300782], [1.0145471233550014, -0.38693449288211773, -0.5261862804279662], [0.9287736251360975, -0.4720230366992084, -0.35822714924210347], [0.9762257849029191, -0.5478230071639123, -0.14379130285127376], [0.9792268756310564, -0.6735243195687305, 0.03704228311300975], [0.896213244917176, -0.7363737442427177, 0.24951799866975882], [0.8377235575190823, -0.8773864519091001, 0.3824997730875765], [0.8346927397786151, -0.9272386579816042, 0.56020446066195], [0.7949574677904816, -0.9709082875930404, 0.7610652891564934], [0.8014572723091021, -0.9451475459051052, 0.8699115766689918], [0.7302583589301048, -0.9952848097140359, 0.9057723426688883], [0.6903520224483221, -1.018491257449967, 0.9474487591828623], [0.625034874394157, -0.9662532106789922, 1.001839511905382], [0.602891086993132, -0.9530197593018368, 0.9664357675484051], [0.5493457708346072, -0.9060654125308998, 0.961081591193232], [0.512046692155657, -0.8541410612635678, 0.8539620287031789], [0.41111373596456247, -0.792259230273124, 0.7265512573224806], [0.3812387471225977, -0.7000691523834177, 0.6293375045423788], [0.32177452241263393, -0.5987391928081781, 0.4578506748870153], [0.23727961548614382, -0.5005820031257394, 0.28805448573455095], [0.1645224000795508, -0.3773078472380014, 0.06782317195976403], [0.11390538929453208, -0.2353037780241368, -0.09570464059916643], [0.07953577694865646, -0.1312349367827971, -0.28448398133036334], [-0.03689925007909458, -0.014383900755145729, -0.47037573021722107], [-0.07150525989564172, 0.12293131028849992, -0.5805608643077896], [-0.12008402041442177, 0.2510640174305084, -0.7589405090066083], [-0.2084376837591916, 0.3328601934369618, -0.903101012537332], [-0.24026510776741994, 0.4358877932450509, -0.9346357178185312], [-0.3103667306735541, 0.5922349003688584, -1.0171908143763213], [-0.3344969033255197, 0.6793205908461576, -1.0365221033548708], [-0.3986602502043024, 0.7415884706515072, -0.9956437010973177], [-0.5033906417004125, 0.835278647030347, -0.8975362007208473], [-0.5224849305060528, 0.9530465499191834, -0.8283487178374606], [-0.5948815738804978, 0.922216867376238, -0.7138852437538701], [-0.6131187677544703, 0.9712940994352209, -0.5352197449112263], [-0.6821624363155387, 0.976710493035961, -0.3937255151301775], [-0.7648770801377975, 0.9942487508261459, -0.19525502120134683], [-0.7751480248984615, 1.0029932450055605, -0.03593842579637185], [-0.8067911632100786, 0.9323314517708853, 0.18589304911701943], [-0.8611145391392433, 0.9228911743969197, 0.372423594608467], [-0.868650661881152, 0.8517096263663094, 0.5340218205389644], [-0.8973026954694624, 0.7837089275218866, 0.6710892883708697], [-0.9514732643676967, 0.6865086271821479, 0.8142494199764573], [-0.9402397928108404, 0.6254351406019347, 0.8912692250442409], [-0.9963436254779369, 0.47405056361051756, 0.9580782972873078], [-0.9980548809114624, 0.35061291354433327, 0.9947694290831305], [-0.9932826645246335, 0.23121263113151114, 0.9701674284170048], [-0.9905234521656352, 0.1380090341540312, 0.9369924375051496], [-1.003438867046474, 0.01307718939603237, 0.8824495249618068], [-0.9668687476275635, -0.1491814730112151, 0.7439367146959296], [-0.977838386099685, -0.23888422039650695, 0.631836876355077], [-0.9608004116800227, -0.37844968176241583, 0.4979440752861488], [-0.9724996271712008, -0.4949377895432736, 0.30682570879521553], [-0.9280139729846553, -0.5934730097470766, 0.16187356671568767], [-0.9271071572918188, -0.6878748114964233, -0.07664702120328575], [-0.8917784743466499, -0.7649451345206089, -0.24438983765202046], [-0.8748231190301302, -0.8456088512420766, -0.44439977364267025], [-0.8317768731619593, -0.8668253002485768, -0.5492251063598248], [-0.8074603979666013, -0.9555421493641654, -0.723509954052159], [-0.7835020891469262, -0.9763351256068136, -0.8339883756902559], [-0.7535862731918679, -1.0044997504618358, -0.9104000548368157], [-0.6670877156697412, -1.0232864830526804, -0.9594365372290917], [-0.6436708590601616, -0.9830796936236352, -1.0032484917882363], [-0.6305680731221017, -0.9430230056287258, -1.0153010756077687], [-0.519703117259309, -0.9313504567890535, -0.9101666380929292], [-0.4775729717563701, -0.832698922290518, -0.8608920637532707], [-0.4623572036753975, -0.7906940469341848, -0.725267683038559], [-0.35933988689832685, -0.7023089415145879, -0.5643369622625356], [-0.30969682132079246, -0.6211014276022294, -0.42364696139267893], [-0.26438863956193115, -0.4657514352851213, -0.24749180920115815], [-0.18455685571211067, -0.3742524730169654, -0.043540052227210246], [-0.14363622302675488, -0.2422078383258184, 0.12316334158619353], [-0.08352204403182861, -0.12696472743007964, 0.2873874296878172], [0.040808639890812765, 0.020318339464396762, 0.44674977523383264]];" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Make an array of 3d points.\n", "np.random.seed(123)\n", "t = np.linspace(0, 2*np.pi, 1000)\n", "x, y, z = np.sin(t*10), np.sin(t*20), np.sin(t*30+0.5)\n", "pos = np.vstack([x, y, z]).T\n", "pos += np.random.normal(size=pos.shape)*0.02\n", "\n", "jsglobal(POS=pos) # Pass this array to JS-world as a global variable \"POS\"." ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "with_mathbox(element, function(mathbox) {\n", " mathbox.cartesian({},{rotation:(t)=>[0, t*0.1, 0]})\n", " .grid({axes: [1, 3]})\n", " // Now we can see the data on JS side!\n", " .array({data:POS, channels:3, live:false})\n", " .point({color:\"#55a\"})\n", " .line({width:1.0})\n", "})" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "with_mathbox(element, function(mathbox) {\n", " mathbox.cartesian({},{rotation:(t)=>[0, t*0.1, 0]})\n", " .grid({axes: [1, 3]})\n", " // Now we can see the data on JS side!\n", " .array({data:POS, channels:3, live:false})\n", " .point({color:\"#55a\"})\n", " .line({width:1.0})\n", "})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Tesseract rotation\n", "\n", "Let's draw something more exotic!" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "with_mathbox(element, function(mathbox) {\n", " mathbox.three.element.style.height = '600px';\n", " mathbox.cartesian().grid({width: 2, opacity: 0.5, axes: [1, 3], origin: [0, -1, 0]});\n", "\n", " // Create a view that uses Stereographic 4d->3d projection, instead of 3d cartesian we used before.\n", " var view = mathbox.stereographic4({position:[0, 0, 0], scale:[0.5, 0.5, 0.5]});\n", "\n", " // Define Tesseract vertices and edges.\n", " var edges = [];\n", " var points = []\n", " for (var e=-1; e<2; e+=2)\n", " for (var i=-1; i<2; i+=2)\n", " for (var j=-1; j<2; j+=2)\n", " for (var k=-1; k<2; k+=2) {\n", " edges.push([i, j, k, e])\n", " edges.push([i, j, e, k])\n", " edges.push([i, e, j, k])\n", " edges.push([e, i, j, k])\n", " points.push([i, j, k, e])\n", " }\n", "\n", " view.matrix({width:edges.length/2, height:2, data:edges, live: false})\n", " .transpose({order:\"yx\", id:\"edges\"})\n", " .array({data:points, id:\"points\"})\n", " .clock({speed:0.25})\n", " // Animate rotation in 4d space.\n", " .transform4({}, {matrix:function(t) {\n", " var c = Math.cos(t), s = Math.sin(t);\n", " return [c, 0, 0,-s,\n", " 0, 1, 0, 0,\n", " 0, 0, 1, 0,\n", " s, 0, 0, c];\n", " }}) \n", " // Draw points. \n", " .point({size:8, points:\"#points\"})\n", " // Label them. \n", " .format({live:false, expr:(x, y, z, w)=>{\n", " return x+\", \"+y+\", \"+z+\", \"+w;\n", " }}).label({size:16, depth:0.5, outline:0.5})\n", " // This line linearly interpolates our edges in 4d space before doing projection,\n", " // which gives us nice curved edges.\n", " .lerp({width:32, source:\"#edges\"})\n", " .line({color:0x3090FF, depth:1.0, width:4});\n", "})" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "with_mathbox(element, function(mathbox) {\n", " mathbox.three.element.style.height = '600px';\n", " mathbox.cartesian().grid({width: 2, opacity: 0.5, axes: [1, 3], origin: [0, -1, 0]});\n", "\n", " // Create a view that uses Stereographic 4d->3d projection, instead of 3d cartesian we used before.\n", " var view = mathbox.stereographic4({position:[0, 0, 0], scale:[0.5, 0.5, 0.5]});\n", "\n", " // Define Tesseract vertices and edges.\n", " var edges = [];\n", " var points = []\n", " for (var e=-1; e<2; e+=2)\n", " for (var i=-1; i<2; i+=2)\n", " for (var j=-1; j<2; j+=2)\n", " for (var k=-1; k<2; k+=2) {\n", " edges.push([i, j, k, e])\n", " edges.push([i, j, e, k])\n", " edges.push([i, e, j, k])\n", " edges.push([e, i, j, k])\n", " points.push([i, j, k, e])\n", " }\n", "\n", " view.matrix({width:edges.length/2, height:2, data:edges, live: false})\n", " .transpose({order:\"yx\", id:\"edges\"})\n", " .array({data:points, id:\"points\"})\n", " .clock({speed:0.25})\n", " // Animate rotation in 4d space.\n", " .transform4({}, {matrix:function(t) {\n", " var c = Math.cos(t), s = Math.sin(t);\n", " return [c, 0, 0,-s,\n", " 0, 1, 0, 0,\n", " 0, 0, 1, 0,\n", " s, 0, 0, c];\n", " }}) \n", " // Draw points. \n", " .point({size:8, points:\"#points\"})\n", " // Label them. \n", " .format({live:false, expr:(x, y, z, w)=>{\n", " return x+\", \"+y+\", \"+z+\", \"+w;\n", " }}).label({size:16, depth:0.5, outline:0.5})\n", " // This line linearly interpolates our edges in 4d space before doing projection,\n", " // which gives us nice curved edges.\n", " .lerp({width:32, source:\"#edges\"})\n", " .line({color:0x3090FF, depth:1.0, width:4});\n", "})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Gray-Scott [Reaction-Diffusion](http://mrob.com/pub/comp/xmorphia/) on Torus (GLSL)\n", "\n", "Mathbox allows to inject custom GLSL functions into its dataflow pipelines. It also exposes Render-to-Texture functionality to make pre-CUDA style GPU computing possible with minimal amounts of boilerplate code. This sample computers reaction-diffusion simulation in an offscreen texture, and then uses this texture to displace and colorize torus surface." ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "application/javascript": [ "with_mathbox(element, function(mathbox) {\n", "\n", "mathbox.three.camera.position.set(-0.1, 1, 1.5);\n", "var W = 512, H = 256;\n", "mathbox\n", " .rtt({width:W, height:H, type:\"float\", id:\"rtt\"}) // offscreen rendering\n", " // main simulation shader code\n", " .shader({code:`\n", " uniform vec2 dataSize;\n", " uniform vec2 spot;\n", " uniform vec2 fk;\n", " vec4 getsample(vec2 p);\n", " vec2 sample(vec2 p) {\n", " return getsample(mod(p, dataSize)).xy;\n", " }\n", " vec4 main(vec2 p) {\n", " if (length(spot-p)<2.0) {\n", " return vec4(0.0, 0.5, 0.0, 0.0);\n", " }\n", " float f = fk.x, k = fk.y;\n", " const vec2 dx=vec2(1.,0.0), dy=vec2(0.0,1.);\n", " vec2 v = sample(p);\n", " vec2 lap = sample(p+dx)+sample(p-dx)+sample(p+dy)+sample(p-dy)-4.0*v;\n", " float rate = v.x * v.y * v.y;\n", " vec2 dv = vec2(0.2, 0.1)*lap + vec2(-rate, rate);\n", " dv += vec2(f * (1.0 - v.x), -(f + k) * v.y);\n", " v = clamp(v+dv, 0.0, 1.0);\n", " return vec4(v, 0.0, 0.0);\n", " }`, fk:[0.034, 0.056]}, {spot:(t)=>[(t*0.02+0.75)%1*W, (t*0.12+0.5)%1*H]})\n", " .play({ // animate Gray-Scott reaction-diffusion parameters\n", " loop: true, to:4, pace:3.0,\n", " script:[\n", " {fk:[0.034, 0.056]}, \n", " {fk:[0.029, 0.057]},\n", " {fk:[0.014, 0.054]},\n", " {fk:[0.025, 0.060]},\n", " {fk:[0.034, 0.056]}]})\n", " .resample({indices:2}).compose() // this triggers Render-to-Texture pass\n", " .end() // back from offscreen rendering\n", "\n", " .cartesian({}, {rotation:(t)=>[t*0.1+1.5, 0, 0]})\n", " // shader to compute surface colors\n", " .shader({code:`\n", " vec4 sample(vec4 p);\n", " vec4 main(vec4 p) {\n", " float v = sample(p).y;\n", " return vec4(0.5+v, 0.5, 0.5, 1.0);\n", " }\n", " `}).resample()\n", " // shader to compute 3d positions of torus vertices\n", " .shader({code:`\n", " uniform vec4 dataSize;\n", " const float pi = 3.141593;\n", " vec4 sample(vec4 p);\n", " vec4 main(vec4 p) {\n", " float v = sample(p).y;\n", " vec2 pq = p.xy/(dataSize.xy-1.0)*2.0*pi;\n", " float r = v*0.2 + 0.3;\n", " float a = 0.7 + r*cos(pq.y);\n", " return vec4(a*cos(pq.x), a*sin(pq.x), r*sin(pq.y), 0.0);\n", " }`}).resample({source:'#rtt'})\n", " // draw the torus!\n", " .surface({shaded:true, closedX:true, colors:'<<', color:\"#fff\"});\n", "\n", " // this hack triggers RTT pass multiple times per frame for faster simulation\n", " mathbox.three.on('update', function(){\n", " var rtt = mathbox.select('rtt')[0].controller.rtt;\n", " for (var i=0; i<5; ++i)\n", " rtt.render()\n", " })\n", "})" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%%javascript\n", "with_mathbox(element, function(mathbox) {\n", "\n", "mathbox.three.camera.position.set(-0.1, 1, 1.5);\n", "var W = 512, H = 256;\n", "mathbox\n", " .rtt({width:W, height:H, type:\"float\", id:\"rtt\"}) // offscreen rendering\n", " // main simulation shader code\n", " .shader({code:`\n", " uniform vec2 dataSize;\n", " uniform vec2 spot;\n", " uniform vec2 fk;\n", " vec4 getsample(vec2 p);\n", " vec2 sample(vec2 p) {\n", " return getsample(mod(p, dataSize)).xy;\n", " }\n", " vec4 main(vec2 p) {\n", " if (length(spot-p)<2.0) {\n", " return vec4(0.0, 0.5, 0.0, 0.0);\n", " }\n", " float f = fk.x, k = fk.y;\n", " const vec2 dx=vec2(1.,0.0), dy=vec2(0.0,1.);\n", " vec2 v = sample(p);\n", " vec2 lap = sample(p+dx)+sample(p-dx)+sample(p+dy)+sample(p-dy)-4.0*v;\n", " float rate = v.x * v.y * v.y;\n", " vec2 dv = vec2(0.2, 0.1)*lap + vec2(-rate, rate);\n", " dv += vec2(f * (1.0 - v.x), -(f + k) * v.y);\n", " v = clamp(v+dv, 0.0, 1.0);\n", " return vec4(v, 0.0, 0.0);\n", " }`, fk:[0.034, 0.056]}, {spot:(t)=>[(t*0.02+0.75)%1*W, (t*0.12+0.5)%1*H]})\n", " .play({ // animate Gray-Scott reaction-diffusion parameters\n", " loop: true, to:4, pace:3.0,\n", " script:[\n", " {fk:[0.034, 0.056]}, \n", " {fk:[0.029, 0.057]},\n", " {fk:[0.014, 0.054]},\n", " {fk:[0.025, 0.060]},\n", " {fk:[0.034, 0.056]}]})\n", " .resample({indices:2}).compose() // this triggers Render-to-Texture pass\n", " .end() // back from offscreen rendering\n", "\n", " .cartesian({}, {rotation:(t)=>[t*0.1+1.5, 0, 0]})\n", " // shader to compute surface colors\n", " .shader({code:`\n", " vec4 sample(vec4 p);\n", " vec4 main(vec4 p) {\n", " float v = sample(p).y;\n", " return vec4(0.5+v, 0.5, 0.5, 1.0);\n", " }\n", " `}).resample()\n", " // shader to compute 3d positions of torus vertices\n", " .shader({code:`\n", " uniform vec4 dataSize;\n", " const float pi = 3.141593;\n", " vec4 sample(vec4 p);\n", " vec4 main(vec4 p) {\n", " float v = sample(p).y;\n", " vec2 pq = p.xy/(dataSize.xy-1.0)*2.0*pi;\n", " float r = v*0.2 + 0.3;\n", " float a = 0.7 + r*cos(pq.y);\n", " return vec4(a*cos(pq.x), a*sin(pq.x), r*sin(pq.y), 0.0);\n", " }`}).resample({source:'#rtt'})\n", " // draw the torus!\n", " .surface({shaded:true, closedX:true, colors:'<<', color:\"#fff\"});\n", "\n", " // this hack triggers RTT pass multiple times per frame for faster simulation\n", " mathbox.three.on('update', function(){\n", " var rtt = mathbox.select('rtt')[0].controller.rtt;\n", " for (var i=0; i<5; ++i)\n", " rtt.render()\n", " })\n", "})" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.13" } }, "nbformat": 4, "nbformat_minor": 0 }