Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Project: A Project
Path: SageManifolds/Worksheets/JNCF2018/jncf18_vector.ipynb / CTYPE html><html><head><title>< / title><meta charset=&quot;utf-8&quot;><meta name=viewport content=&quot;width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0&quot;><style> body { margin: 0px; overflow: hidden; } < / style>< / head><body><script src=&quot;https: / cdn.rawgit.com / mrdoob / three.js / r80 / build / three.min.js&quot;>< / script><script src=&quot;https: / cdn.rawgit.com / mrdoob / three.js / r80 / examples / js / controls / OrbitControls.js&quot;>< / script> <script> var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); renderer.setSize( window.innerWidth, window.innerHeight ); renderer.setClearColor( 0xffffff, 1 ); document.body.appendChild( renderer.domElement ); var options = {&quot;aspect_ratio&quot;: [1.0, 1.0, 1.0], &quot;decimals&quot;: 2, &quot;frame&quot;: true, &quot;axes&quot;: false, &quot;axes_labels&quot;: [&quot;x&quot;, &quot;y&quot;, &quot;z&quot;]}; / When animations are supported by the viewer, the value 'false' / will be replaced with an option set in Python by the user var animate = false; / options.animate; var b = [{&quot;x&quot;:-0.996968676322, &quot;y&quot;:-1.32521311195, &quot;z&quot;:-1.37732515381}, {&quot;x&quot;:1.03714948454, &quot;y&quot;:0.996968676322, &quot;z&quot;:1.0}]; / bounds if ( b[0].x === b[1].x ) { b[0].x -= 1; b[1].x += 1; } if ( b[0].y === b[1].y ) { b[0].y -= 1; b[1].y += 1; } if ( b[0].z === b[1].z ) { b[0].z -= 1; b[1].z += 1; } var rRange = Math.sqrt( Math.pow( b[1].x - b[0].x, 2 ) + Math.pow( b[1].x - b[0].x, 2 ) ); var xRange = b[1].x - b[0].x; var yRange = b[1].y - b[0].y; var zRange = b[1].z - b[0].z; var ar = options.aspect_ratio; var a = [ ar[0], ar[1], ar[2] ];
Views: 393