E-INTERATIVIDADE

559 days ago by jmarcellopereira

@interact def fbotao(Aperte=selector(['Sage', 'Julia', 'Python','Octave'],buttons=True)): show(Aperte) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fbotao(Aperte=selector(['Sage', 'Julia', 'Python','Octave','Scilab','Maxima'],nrows=2,ncols = 3,buttons=True)): show(Aperte) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fselecao(selecione=selector(['Sage', 'Julia', 'Python','Octave'])): show(selecione) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def frange_slider(numero = ('Numero',(1,10))): show(numero) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fslider(faixa = range_slider(-3,3,default=(-3,3))): show(faixa) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fcolor(c = color_selector('blue')): print(c) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fcheckbox(check=checkbox(True, label='Marque')): show(check) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def _(lista=('Lista', input_grid(1, 4, default=[[1,2,3,'bola']]))): show(lista) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def _(tabela=('Tabela', input_grid(2, 3, default=[[1,2,3],[4,4,4]]))): show(tabela) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f = x^2): show(plot(f,(x,-2,2)),figsize = (4,3)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=x^2, a=-3, b=3): show(plot(f,(x,a,b)),figsize = (4,3)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=('$f$', x^2), a=('Inferior', -3), b=('Superior', 3)): show(plot(f,(x,a,b)),figsize = (4,3)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=('$f$', x^2), a=('Inferior', -3), b=('Superior', (-2,4)), tamanho = ('Tamanho',(2,4))): show(plot(f,(x,a,b)),figsize = (tamanho,tamanho)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=input_box(x^2, width=20, label="$f$"), a=input_box(-3,width=20, label="$a$"), b=('Superior', (-2,4)), tamanho = ('Tamanho',(2,5))): show(plot(f,(x,a,b)),figsize = (tamanho,tamanho)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=input_box(x^2,width=20),color=color_selector('red'), zoom=range_slider(-3,3,default=(-3,3))): show(plot(f,(x,zoom[0], zoom[1]), color=color), figsize = (4,3)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

@interact def fgraf(f=input_box(x^2,width=20),color=color_selector('red'),Preencher=True,zoom=range_slider(-3,3,default=(-3,3)),tamanho = ('Tamanho',(2,5))): show(plot(f,(x,zoom[0], zoom[1]), color=color,fill=Preencher), figsize = (tamanho,tamanho)) 
       

Click to the left again to hide and once more to show the dynamic interactive window

def ftermSquare(n): return(1/n*sin(n*x*pi/3)) def ftermSawtooth(n): return(1/n*sin(n*x*pi/3)) def ftermParabola(n): return((-1)^n/n^2 * cos(n*x)) def fseriesSquare(n): return(4/pi*sum(ftermSquare(i) for i in range (1,2*n,2))) def fseriesSawtooth(n): return(1/2-1/pi*sum(ftermSawtooth(i) for i in range (1,n))) def fseriesParabola(n): return(pi^2/3 + 4*sum(ftermParabola(i) for i in range(1,n))) @interact def plotFourier(n=slider(1, 30,1,10,'Number of terms'),Function=['Saw Tooth','Square Wave','Periodic Parabola']): if Function=='Saw Tooth': show(plot(fseriesSawtooth(n),(x,-6,6),figsize=(4,3))) if Function=='Square Wave': show(plot(fseriesSquare(n),(x,-6,6),figsize=(4,3))) if Function=='Periodic Parabola': show(plot(fseriesParabola(n),(x,-6,6),figsize=(4,3))) 
       

Click to the left again to hide and once more to show the dynamic interactive window