Conteúdo

Cálculo Diferencial e Integral II

Testing

Sage 9.0

Due to problems with sage notebooks and jsmol 3d models I am converting to sage jupyter notebooks and three.js 3d models. Unfortunately the latter seem error prone when layering several transparent surfaces. The animation below was produced with three.js in sage 9.0beta6. In the latter parts of the circle inside the intersection of two cilinders become invisible and that varies when rotating the model. This move has also uncovered a possible Firefox bug discussed below.

The sage code can be found below.

A Firefox bug

Firefox bug

Firefox seems unable to correctly display an iframe (displaying a three.js animation produced with Sage 9.0) inside a details element which is closed when the page is loaded. Below you will see the same graphic as in the next details element, except in Firefox browsers. This details is closed when the page loads and the iframe displays correctly except in Firefox.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1717264

Animation produced with Sage using three.js of the intersection of cylinders $x^2+y^2\leq 1$ (yellow) and $y^2+z^2\leq 1$ (blue). The orange circle is the projection on the $xy$ plane.
Firefox bug

Firefox seems unable to correctly display an iframe (displaying a three.js animation produced with Sage 9.0) inside a details element which is closed when the page is loaded. This is exemplified above. Below you will see the same graphic as in the previous details element but it will display in all tested browsers. This details is open when the page loads and the iframe displays correctly in all browsers. It remains to be seen if this is dependent on the iframe displaying a three.js animation as produced by sage.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1717264

Animation produced with Sage using three.js of the intersection of cylinders $x^2+y^2\leq 1$ (yellow) and $y^2+z^2\leq 1$ (blue). The orange circle is the projection on the $xy$ plane.

Sage code

u, v = var('u,v')
d1=parametric_plot3d([u*cos(v), u*sin(v), (1-u^2*(sin(v))^2 )^(1/2) ], (u,0, 1), (v,0, 2*pi), opacity=0.5, plot_points=[160,160])
d5=parametric_plot3d([ u*sin(v), u*cos(v), 0], (u,0, 1), (v,0, 2*pi), opacity=0.5,color='red')
d2=parametric_plot3d([ u*cos(v), u*sin(v) , -(1-u^2*(sin(v))^2 )^(1/2)], (u,0, 1), (v,0, 2*pi), opacity=0.5, plot_points=[160,160])
d3=parametric_plot3d([(1-u^2*(sin(v))^2 )^(1/2), u*sin(v) , u*cos(v)], (u,0, 1), (v,0, 2*pi), opacity=0.5,color='yellow', plot_points=[160,160])
d4=parametric_plot3d([ -(1-u^2*(sin(v))^2 )^(1/2), u*sin(v), u*cos(v)], (u,0, 1), (v,0, 2*pi), opacity=0.5,color='yellow', plot_points=[160,160])
d1+d2+d3+d4+d5


Última edição desta versão: João Palhoto Matos, 14/07/2021 14:37:32.