I'm trying to make an interactive applet to visualize the Mandelbrot Set, much in the way of the implementation of interactive fractals (wiki.sagemath.org/interact/fractal#Exploring_Mandelbrot - cannot copy full link because of not enough karma ;-))
But I'd like to embed the applet in a webpage using SageMathCell, and for this all the code must be encapsulated in just one cell, something in the following scheme
%cython
def function(...)
...
@interact
...
Unfortunately, %cython
and @interact
behave badly together, because the latter is unknown to the former (just try to join the code in the two cells of the example above)
Which would be the smartest way to mix everything up? Any suggestion is highly appreciated.