ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 20 Feb 2017 00:59:44 +0100How to scale threejs graphs?https://ask.sagemath.org/question/24228/how-to-scale-threejs-graphs/ Hi,
jmol works nicely in scaling 3d graphs in sagecell, however threejs does not. Even manual scaling using aspect_ratio does not seem to work; aspect_ratio is apparently ignored.
Example:
%var x,y
g=plot3d(x^3*y^3, (x,-2,2),(y,-2,2),aspect_ratio=[1.0,1.0,.001])
threejs(g)
Is there another way to scale graphs with threejs?
Best
IngoSun, 21 Sep 2014 13:23:12 +0200https://ask.sagemath.org/question/24228/how-to-scale-threejs-graphs/Answer by paulmasson for <p>Hi,
jmol works nicely in scaling 3d graphs in sagecell, however threejs does not. Even manual scaling using aspect_ratio does not seem to work; aspect_ratio is apparently ignored.
Example:
%var x,y
g=plot3d(x^3*y^3, (x,-2,2),(y,-2,2),aspect_ratio=[1.0,1.0,.001])
threejs(g)
Is there another way to scale graphs with threejs?
Best
Ingo</p>
https://ask.sagemath.org/question/24228/how-to-scale-threejs-graphs/?answer=36667#post-id-36667As of Sage 7.5 there is a native Three.js viewer that respects `aspect_ratio`. You can invoke it by adding the option`viewer='threejs'` to `show()` or any 3D object.
Since the new viewer is a work in progress, feedback is welcome.Mon, 20 Feb 2017 00:59:44 +0100https://ask.sagemath.org/question/24228/how-to-scale-threejs-graphs/?answer=36667#post-id-36667