ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 19 Feb 2017 17:59:44 -0600How to scale threejs graphs?http://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 06:23:12 -0500http://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>
http://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.Sun, 19 Feb 2017 17:59:44 -0600http://ask.sagemath.org/question/24228/how-to-scale-threejs-graphs/?answer=36667#post-id-36667