I'm trying to learn how to use the @interact command. The examples here: http://doc.sagemath.org/html/en/prep/Quickstarts/Interact.html do not work. I get a stack traces complaining about variable types etc.
Other examples I tried: https://wiki.sagemath.org/interact/calculus#Some_polar_parametric_curves With that I get: πΈππππππππππππππππππ<πππππππππππππππΆπ‘π½ππππΉπΌππΆπΎπππΎ>π ππππ»π ππππππππ·:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΈ|β―β―β―π»]',πππππππππππ=π'ππ·')ππΈ:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΉ|β―β―β―π»]',πππππππππππ=π'ππΈ')ππ·:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΌ/π»|β―β―β―π·πΆ]',πππππππππππ=π'ππ·')ππΈ:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΌ|β―β―β―π·πΆ]',πππππππππππ=π'ππΈ')π:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[πΆβ―β―|πΆ|β―β―β―πΈ]',πππππππππππ=π'π') TypeError Traceback (most recent call last) <ipython-input-105-fc4092c2f8fe> in <module>() 6 show(p, figsize = [Integer(5),Integer(5)], xmin = -Integer(2)-b, xmax = Integer(2)+b, ymin = -Integer(2)-b, ymax = Integer(2)+b, axes = False) 7 ----> 8 para() <ipython-input-105-fc4092c2f8fe> in para(n1, n2, a1, a2, b) 2 def para(n1 = slider(Integer(1),Integer(5),Integer(1),default = Integer(2)), n2 = slider(Integer(1),Integer(5),Integer(1),default = Integer(3)), a1 = slider(Integer(1),Integer(10),Integer(1)/Integer(10),Integer(6)/Integer(5)), a2 = slider(Integer(1),Integer(10),Integer(1)/Integer(10),Integer(6)), b = slider(Integer(0),Integer(2),Integer(1)/Integer(50),Integer(0))): 3 var('t') ----> 4 pretty_print(html('$r=' + latex(b+sin(a1*t)**n1 + cos(a2*t)**n2)+'$')) 5 p = parametric_plot((cos(t)*(b+sin(a1*t)**n1 + cos(a2*t)**n2), sin(t)*(b+sin(a1*t)**n1 + cos(a2*t)**n2)), (t,Integer(0), Integer(20)*pi), plot_points = Integer(1024), rgbcolor = (Integer(0),Integer(0),Integer(0))) 6 show(p, figsize = [Integer(5),Integer(5)], xmin = -Integer(2)-b, xmax = Integer(2)+b, ymin = -Integer(2)-b, ymax = Integer(2)+b, axes = False) TypeError: unsupported operand type(s) for *: 'instance' and 'sage.symbolic.expression.Expression' Any hints on how to make this work? Thanks, Andy -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.