Re: [sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread William Stein
For sage worksheets, I've created https://github.com/sagemathinc/cocalc/issues/2450 On Sun, Oct 29, 2017 at 1:12 PM William Stein wrote: > On Sun, Oct 29, 2017 at 9:31 AM Simon Willerton < > s.willer...@sheffield.ac.uk> wrote: > >> I have the following code to help my

Re: [sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread William Stein
On Sun, Oct 29, 2017 at 9:31 AM Simon Willerton wrote: > I have the following code to help my students visualize surfaces > > t, theta = var('t, theta', domain='real') > x(t) = cosh(t) > z(t) = t > formula = (x(t)*cos(theta), x(t)*sin(theta), z(t)) > parameters =

[sage-support] Re: 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread Eric Gourgoulhon
Hi, You must add the keyword argument online=True to show(...): show(surface.plot(aspect_ratio=1, color='yellow'), viewer='threejs', online= True) Then it works in a Jupyter notebook running SageMath 8.0 in CoCalc:

[sage-support] 3d plotting in CoCalc with SageMath 8.0

2017-10-29 Thread Simon Willerton
I have the following code to help my students visualize surfaces t, theta = var('t, theta', domain='real') x(t) = cosh(t) z(t) = t formula = (x(t)*cos(theta), x(t)*sin(theta), z(t)) parameters = ((t, -3, 3), (theta, -pi, pi)) surface = ParametrizedSurface3D(formula, parameters)

[sage-support] Re: [piecewise] AttributeError: ComplexField_class_with_category object has no attribute complex_field

2017-10-29 Thread Marcel Partap
like basically, why don't the piecewise functions collapse to scalars? This should result in the same output, no? M_vec(x) = vector([M_Tx(x), M_by(x), M_bz(x)]).column() M_vec(x = l1) M_vec_l1 = vector([M_Tx(l1), M_by(x=l1), M_bz(x=l1)]).column() M_vec_l1 gives instead [

[sage-support] [piecewise] AttributeError: ComplexField_class_with_category object has no attribute complex_field

2017-10-29 Thread Marcel Partap
For graphing strain load on a shaft in relation to coordinate x, I have created a set of piecewise functions. Now I wanted to munge them into a single parametrized vector to easily get the length via norm() at a specified point. M_Tx = piecewise([[[0, l1], M_t], [(l1, l1+l2), 0]]) M_by =