0
0
mirror of http://CODE.RHODECODE.COM/u/O/O/O synced 2024-11-23 18:28:41 -05:00
O/𖣠⚪∣❁∣𔗢✤𔗢✻𔗢ЭЄ𔗢ᗩ𔗢ߦ𔗢റ𖣓𖡼𔗢𖡼𔗢𖡼𔗢𖡼⚪🞋⚪𖡼𔗢𖡼𔗢𖡼𔗢𖡼𖣓റ𔗢ߦ𔗢ᗩ𔗢ЭЄ𔗢✻𔗢✤𔗢∣❁∣⚪𖣠/𖣠⚪ИN⚪𖣠⚪Ⓞ⚪𖣠⚪ꖴ⚪𖣠⚪✤⚪𖣠⚪ᑐᑕ⚪𖣠⚪ИN⚪𖣠⚪ᑎ⚪𖣠⚪ꗳ⚪𖣠⚪𖣓⚪𖣠⚪ᔓᔕ⚪𖣠⚪ᑎ⚪𖣠⚪ꖴ⚪𖣠⚪⚭⚪𖣠⚪ᗩ⚪𖣠⚪ꗳ⚪𖣠⚪◌⚪𖣠⚪◌⚪𖣠⚪◌⚪𖣠⚪◌⚪𖣠⚪◌⚪𖣠⚪◌⚪𖣠⚪ꗳ⚪𖣠⚪ᗩ⚪𖣠⚪⚭⚪𖣠⚪ꖴ⚪𖣠⚪ᑎ⚪𖣠⚪ᔓᔕ⚪𖣠⚪𖣓⚪𖣠⚪ꗳ⚪𖣠⚪ᑎ⚪𖣠⚪ИN⚪𖣠⚪ᑐᑕ⚪𖣠⚪✤⚪𖣠⚪ꖴ⚪𖣠⚪Ⓞ⚪𖣠⚪ИN⚪𖣠/⚪ᗱᗴ⚪ᴥ⚪ᑎ⚪✤⚪ᗩ⚪ᗯ⚪ᴥ⚪ᑎ⚪ᑐᑕ⚪◌⚪◌⚪◌⚪◌⚪◌⚪◌⚪ᑐᑕ⚪ᑎ⚪ᴥ⚪ᗯ⚪ᗩ⚪✤⚪ᑎ⚪ᴥ⚪ᗱᗴ⚪/⚪ᔓᔕ⚪ᴥ⚪ᗱᗴ⚪ИN⚪ᴥ⚪Ⓞ⚪ᑐᑕ⚪◯⚪✤⚪옷⚪ᕤᕦ⚪ꖴ⚪ᗩ⚪ᴥ⚪✤⚪ᔓᔕ⚪◌⚪◌⚪◌⚪◌⚪◌⚪◌⚪ᔓᔕ⚪✤⚪ᴥ⚪ᗩ⚪ꖴ⚪ᕤᕦ⚪옷⚪✤⚪◯⚪ᑐᑕ⚪Ⓞ⚪ᴥ⚪ИN⚪ᗱᗴ⚪ᴥ⚪ᔓᔕ⚪/YP.⚪ИN⚪Ⓞ⚪ꖴ⚪✤⚪ᗩ⚪ᙏ⚪ꖴ⚪ꕤ⚪Ⓞ⚪ᴥ⚪ߦ⚪ᗩ⚪◯⚪ᙁ⚪ᗩ⚪ꖴ⚪✤⚪ИN⚪ᗱᗴ⚪ИN⚪Ⓞ⚪ߦ⚪ꕤ⚪ᗱᗴ⚪◯⚪ᗱᗴ⚪ᙁ⚪ᑐᑕ⚪ᴥ⚪ꖴ⚪ᑎ⚪¤⚪ᔓᔕ⚪◯⚪ᗱᗴ⚪ᴥ⚪ᑎ⚪✤⚪ᗩ⚪ᗯ⚪ᴥ⚪ᑎ⚪ᑐᑕ⚪◯⚪ᔓᔕ⚪ᑎ⚪ꖴ⚪⚭⚪ᗩ⚪ꗳ⚪◌⚪◌⚪◌⚪◌⚪◌⚪◌⚪ꗳ⚪ᗩ⚪⚭⚪ꖴ⚪ᑎ⚪ᔓᔕ⚪◯⚪ᑐᑕ⚪ᑎ⚪ᴥ⚪ᗯ⚪ᗩ⚪✤⚪ᑎ⚪ᴥ⚪ᗱᗴ⚪◯⚪ᔓᔕ⚪¤⚪ᑎ⚪ꖴ⚪ᴥ⚪ᑐᑕ⚪ᙁ⚪ᗱᗴ⚪◯⚪ᗱᗴ⚪ꕤ⚪ߦ⚪Ⓞ⚪ИN⚪ᗱᗴ⚪ИN⚪✤⚪ꖴ⚪ᗩ⚪ᙁ⚪◯⚪ᗩ⚪ߦ⚪ᴥ⚪Ⓞ⚪ꕤ⚪ꖴ⚪ᙏ⚪ᗩ⚪✤⚪ꖴ⚪Ⓞ⚪ИN⚪.PY

35 lines
1.2 KiB
Plaintext
Raw Normal View History

import plotly.graph_objects as go
import numpy as np
# Define the curvature function
def kappa(x):
return (1-((-((-1)**np.floor(x/np.pi*2)*(np.exp(-1/((x/np.pi*2)-np.floor((x/np.pi*2))))
/(np.exp(-1/((x/np.pi*2)-np.floor((x/np.pi*2))))+np.exp(-1/(1-(x/np.pi*2)+np.floor((x/np.pi*2))))))) +
((-1)**np.floor((x/np.pi*2)/1)*(np.exp(-1/(1-(x/np.pi*2)+np.floor((x/np.pi*2))))/(np.exp(-1/((x/np.pi*2)-
np.floor((x/np.pi*2))))+np.exp(-1/(1-(x/np.pi*2)+np.floor((x/np.pi*2))))))))/2 + .5))
# Generate x values
x_vals = np.linspace(0, 4*np.pi, 1000)
# Compute kappa values
kappa_vals = kappa(x_vals)
# Integrate kappa values to get theta values (angles)
theta_vals = np.cumsum(kappa_vals) * (x_vals[1]-x_vals[0])
# Compute x and y coordinates of the curve
x_coords = np.cumsum(np.cos(theta_vals)) * (x_vals[1]-x_vals[0])
y_coords = np.cumsum(np.sin(theta_vals)) * (x_vals[1]-x_vals[0])
# Create a plot using plotly
fig = go.Figure()
# Add line to the figure for the curve
fig.add_trace(go.Scatter(x=x_coords, y=y_coords, mode='lines', name='Curve'))
# Update layout
fig.update_layout(
autosize=True,
xaxis=dict(scaleanchor='y', scaleratio=1) # this line sets the aspect ratio
)
fig.show()