Fix bio domination bug.
This commit is contained in:
parent
2604e3889a
commit
6a97bd6cf7
13 changed files with 64 additions and 134 deletions
|
@ -20,8 +20,7 @@ def morph_shape(x, L, H, morph_type="linear"):
|
|||
elif morph_type == "hyperbolic_tan":
|
||||
y = np.tanh((x/L)*np.pi/2.0)
|
||||
elif morph_type == "circle":
|
||||
y = np.tanh((x/L)*np.pi/2.0)
|
||||
|
||||
y = np.sqrt(L*L-np.power((L-x),2))
|
||||
return y
|
||||
|
||||
x_base = np.linspace(0, base_length, 10)
|
||||
|
@ -31,7 +30,7 @@ x_lamp = np.linspace(base_length, height, 100)
|
|||
y_lamp = base_radius + morph_shape(x_lamp-base_length,
|
||||
height-base_length,
|
||||
radius-base_radius,
|
||||
"hyperbolic_tan")
|
||||
"circle")
|
||||
x = np.append(x_base, x_lamp)
|
||||
y = np.append(y_base, y_lamp)
|
||||
plt.plot(x, y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue