This repository has been archived on 2024-09-22. You can view files and clone it, but cannot push or open issues or pull requests.
O/𖣠⚪ᕤᕦИNꖴᙏᗩᴥᕤᕦⓄᴥߦ⚪𔗢⚪🞋⚪𔗢⚪ߦᴥⓄᕤᕦ.../⚪ИN⚪Ⓞ⚪옷⚪✤⚪人⚪ߦ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪ߦ.../⚪ᴥ⚪ᗱᗴ⚪✤⚪人⚪ߦ⚪ᑎ⚪ᒍᒐ⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪𖡼⚪.../YP.⚪ИN⚪Ⓞ⚪ꖴ⚪✤⚪ᗩ⚪ᙏ⚪ꖴ⚪ꕤ⚪Ⓞ⚪ᴥ⚪ߦ⚪...

16 lines
4.3 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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