⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀         ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
4.3 KiB

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))
.show()