Recent

Top



Views: 7

Views: 21

import plotly.graph_objects as ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒍᒐ8Oⵔ옷ߦᗩᴥᕤᕦⵙⵔⵙⵔⵙᕤᕦᴥᗩߦ옷ⵔO8ᒍᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ
import numpy as ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ
def ⵙᗱᗴ𖧷ᑎߦᙏOᑐᑕⵙⵔⵙⵔⵙᑐᑕOᙏߦᑎ𖧷ᗱᗴⵙ(x):
    return (1-((-((-1)**ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor(x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)*(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)-ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))
            /(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)-ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))+ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))))) +
            ((-1)**ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)/1)*(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))/(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)-
            ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))+ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.exp(-1/(1-(x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2)+ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.floor((x/ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi*2))))))))/2 + .5))
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.linspace(0,4*ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.pi,1000)
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩߦᗩ𐊌ⵙⵔⵙⵔⵙ𐊌ᗩߦᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙᗱᗴ𖧷ᑎߦᙏOᑐᑕⵙⵔⵙⵔⵙᑐᑕOᙏߦᑎ𖧷ᗱᗴⵙ(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ)
ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩߦᗩ𐊌ⵙⵔⵙⵔⵙ𐊌ᗩߦᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ)*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕⵔꕤⵙⵔⵙⵔⵙꕤⵔᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.cos(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ))*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕⵔ人ⵙⵔⵙⵔⵙ人ⵔᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ=ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.cumsum(ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ.sin(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔᗩ𖧷ᗱᗴ옷𖧷ⵙⵔⵙⵔⵙ𖧷옷ᗱᗴ𖧷ᗩⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ))*(ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[1]-ⵙᔓᔕᗱᗴᑎᙁᗩᗯⵔꕤⵙⵔⵙⵔⵙꕤⵔᗯᗩᙁᑎᗱᗴᔓᔕⵙ[0])
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ=ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒍᒐ8Oⵔ옷ߦᗩᴥᕤᕦⵙⵔⵙⵔⵙᕤᕦᴥᗩߦ옷ⵔO8ᒍᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ.Figure()
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ.add_trace(ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒍᒐ8Oⵔ옷ߦᗩᴥᕤᕦⵙⵔⵙⵔⵙᕤᕦᴥᗩߦ옷ⵔO8ᒍᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ.Scatter(x=ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕⵔꕤⵙⵔⵙⵔⵙꕤⵔᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ,y=ⵙᔓᔕᗱᗴ𖧷ᗩИNꖴᗝᴥOᑐᑕⵔ人ⵙⵔⵙⵔⵙ人ⵔᑐᑕOᴥᗝꖴИNᗩ𖧷ᗱᗴᔓᔕⵙ,mode='lines',name='Curve'))
ⵙᗱᗴᴥᑎᕤᕦꖴꗳⵙⵔⵙⵔⵙꗳꖴᕤᕦᑎᴥᗱᗴⵙ.update_layout(autosize=True,xaxis=dict(scaleanchor='y',scaleratio=1))
...
Views: 25

import numpy as ⵙ人ߦᙏᑎИNⵙ〇ⵙ〇ⵙИNᑎᙏߦ人ⵙ
import plotly.graph_objects as ⵙᔓᔕ𖧷ᑐᑕᗱᗴᒍᒐ8Oⵔ옷ߦᗩᴥᕤᕦⵙⵔⵙⵔⵙᕤᕦᴥᗩߦ옷ⵔO8ᒍᒐᗱᗴᑐᑕ𖧷ᔓᔕⵙ
from math import *
import mpmath
from ipywidgets import interact,widgets,Text,Layout
from plotly.subplots import make_subplots

ⵙᗩᙁᑎᙏᴥOꗳⵙⵔⵙⵔⵙꗳOᴥᙏᑎᙁᗩⵙ=widgets.Text(value='(1-cos(((4)/2)*x))/2',layout=widgets.Layout(width='100%'),description='⚪ᗩ⚪ᙁ⚪ᑎ⚪ᙏ⚪ᴥ⚪Ⓞ⚪ꗳ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ꗳ⚪Ⓞ⚪ᴥ⚪ᙏ⚪ᑎ⚪ᙁ⚪ᗩ⚪')
ⵙᴥᗱᗴᗝꖴᙁᔓᔕⵔ𖧷ᴥᗩ𖧷ᔓᔕⵔᗱᗴᕤᕦИNᗩᴥⵙⵔⵙⵔⵙᴥᗩИNᕤᕦᗱᗴⵔᔓᔕ𖧷ᗩᴥ𖧷ⵔᔓᔕᙁꖴᗝᗱᗴᴥⵙ=widgets.FloatSlider(min=-4*(4*atan(1)),max=4*(4*atan(1)),value=-2*(4*atan(1)),step=(4*atan(1))/4,layout=widgets.Layout(width='100%'),readout_format='.256f',description='⚪ᙏ⚪Ⓞ⚪ᴥ⚪ꗳ⚪◯⚪ᗱᗴ⚪ᕤᕦ⚪ИN⚪ᗩ⚪ᴥ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ᴥ⚪ᗩ⚪ИN⚪ᕤᕦ⚪ᗱᗴ⚪◯⚪ꗳ⚪ᴥ⚪Ⓞ⚪ᙏ⚪')
ⵙᴥᗱᗴᗝꖴᙁᔓᔕⵔᗝИNᗱᗴⵔᗱᗴᕤᕦИNᗩᴥⵙⵔⵙⵔⵙᴥᗩИNᕤᕦᗱᗴⵔᗱᗴИNᗝⵔᔓᔕᙁꖴᗝᗱᗴᴥⵙ=widgets.FloatSlider(min=-4*(4*atan(1)),max=4*(4*atan(1)),value=2*(4*atan(1)),step=(4*atan(1))/4,layout=widgets.Layout(width='100%'),readout_format='.256f',description='⚪Ⓞ⚪✤⚪◯⚪ᗱᗴ⚪ᕤᕦ⚪ИN⚪ᗩ⚪ᴥ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ᴥ⚪ᗩ⚪ИN⚪ᕤᕦ⚪ᗱᗴ⚪◯⚪✤⚪Ⓞ⚪')
ⵙᴥᗱᗴᗝꖴᙁᔓᔕⵔᴥᗱᗴᗯOߦⵔ人𖧷ꖴ𖧷ИNᗩᑎꄍⵔ𖧷ИNꖴOߦⵔⵙⵔⵙߦOꖴИN𖧷ⵔꄍᑎᗩИN𖧷ꖴ𖧷人ⵔߦOᗯᗱᗴᴥⵔᔓᔕᙁꖴᗝᗱᗴᴥⵙ=widgets.IntSlider(min=1,max=16,value=8,layout=widgets.Layout(width='100%'),readout_format='.256f',description='⚪ᴥ⚪ᗱᗴ⚪ᗯ⚪Ⓞ⚪ߦ⚪◯⚪ᴥ⚪ᗱᗴ⚪⚭⚪ᙏ⚪ᑎ⚪ИN⚪◯⚪✤⚪ИN⚪ꖴ⚪Ⓞ⚪ߦ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ߦ⚪Ⓞ⚪ꖴ⚪ИN⚪✤⚪◯⚪ИN⚪ᑎ⚪ᙏ⚪⚭⚪ᗱᗴ⚪ᴥ⚪◯⚪ߦ⚪Ⓞ⚪ᗯ⚪ᗱᗴ⚪ᴥ⚪')
ⵙᴥᗱᗴᗝꖴᙁᔓᔕⵔ·ⵔᗱᗴᙁ8ᗩꖴᴥᗩᗯⵙⵔⵙⵔⵙᗯᗩᴥꖴᗩ8ᙁᗱᗴⵔ·ⵔᔓᔕᙁꖴᗝᗱᗴᴥⵙ=widgets.FloatSlider(min=-2,max=2,value=1,step=1/256,layout=widgets.Layout(width='100%'),readout_format='.256f',description='⚪·⚪◯⚪ᗱᗴ⚪ᙁ⚪⚭⚪ᗩ⚪ꖴ⚪ᴥ⚪ᗩ⚪ᗯ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ᗯ⚪ᗩ⚪ᴥ⚪ꖴ⚪ᗩ⚪⚭⚪ᙁ⚪ᗱᗴ⚪◯⚪·⚪')
ⵙᴥᗱᗴᗝꖴᙁᔓᔕⵔ𑫰ⵔᗱᗴᙁ8ᗩꖴᴥᗩᗯⵙⵔⵙⵔⵙᗯᗩᴥꖴᗩ8ᙁᗱᗴⵔ𑫰ⵔᔓᔕᙁꖴᗝᗱᗴᴥⵙ=widgets.FloatSlider(min=-2,max=2,value=1,step=1/256,layout=widgets.Layout(width='100%'),readout_format='.256f',description='⚪꞉⚪◯⚪ᗱᗴ⚪ᙁ⚪⚭⚪ᗩ⚪ꖴ⚪ᴥ⚪ᗩ⚪ᗯ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ᗯ⚪ᗩ⚪ᴥ⚪ꖴ⚪ᗩ⚪⚭⚪ᙁ⚪ᗱᗴ⚪◯⚪꞉⚪')

def ⵙߦᙏᗩᙁᑐᑕⵙⵔⵙⵔⵙᑐᑕᙁᗩᙏߦⵙ(x):return max(min(1,x),-1)
...
Views: 19

  <SCRIPT>    
  <!--◯⁂ᐃⵔ꞉ⵘ❋ⵔⵔ⁂❋❋ⵔ❋·⁂❋❋ⵈ⁂❋ⵔ⁂❋꞉ⵔⵔⵔ·⁂ⵔ꞉⁂ⵔᐃ··⁂⁂❋❋⠿ᐃⵔⵈⵔ∷ⵘ⁂⁂❋ⵘ꞉꞉ⵔ⠿ⵔ∷◌∷❋◯⚪◯❋∷◌∷ⵔ⠿ⵔ꞉꞉ⵘ❋⁂⁂ⵘ∷ⵔⵈⵔᐃ⠿❋❋⁂⁂··ᐃⵔ⁂꞉ⵔ⁂·ⵔⵔⵔ꞉❋⁂ⵔ❋⁂ⵈ❋❋⁂·❋ⵔ❋❋⁂ⵔⵔ❋ⵘ꞉ⵔᐃ⁂◯ⵙ◯⁂ᐃⵔ꞉ⵘ❋ⵔⵔ⁂❋❋ⵔ❋·⁂❋❋ⵈ⁂❋ⵔ⁂❋꞉ⵔⵔⵔ·⁂ⵔ꞉⁂ⵔᐃ··⁂⁂❋❋⠿ᐃⵔⵈⵔ∷ⵘ⁂⁂❋ⵘ꞉꞉ⵔ⠿ⵔ∷◌∷❋◯⚪◯❋∷◌∷ⵔ⠿ⵔ꞉꞉ⵘ❋⁂⁂ⵘ∷ⵔⵈⵔᐃ⠿❋❋⁂⁂··ᐃⵔ⁂꞉ⵔ⁂·ⵔⵔⵔ꞉❋⁂ⵔ❋⁂ⵈ❋❋⁂·❋ⵔ❋❋⁂ⵔⵔ❋ⵘ꞉ⵔᐃ⁂◯--!>
	var O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O = new (window.AudioContext || window.webkitAudioContext)();
	var O_0_EDON_ROTLICSO_O_OSCILATOR_NODE_0_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_1_EDON_ROTLICSO_O_OSCILATOR_NODE_1_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_2_EDON_ROTLICSO_O_OSCILATOR_NODE_2_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_3_EDON_ROTLICSO_O_OSCILATOR_NODE_3_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_4_EDON_ROTLICSO_O_OSCILATOR_NODE_4_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_5_EDON_ROTLICSO_O_OSCILATOR_NODE_5_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_6_EDON_ROTLICSO_O_OSCILATOR_NODE_6_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_7_EDON_ROTLICSO_O_OSCILATOR_NODE_7_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_8_EDON_ROTLICSO_O_OSCILATOR_NODE_8_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_9_EDON_ROTLICSO_O_OSCILATOR_NODE_9_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_01_EDON_ROTLICSO_O_OSCILATOR_NODE_10_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
	var O_11_EDON_ROTLICSO_O_OSCILATOR_NODE_11_O = O_TXETNOC_OIDUA_O_AUDIO_CONTEXT_O.createOscillator();
...
Views: 14

Views: 29