removed r=0 singularity
This commit is contained in:
parent
17bd8fb17f
commit
b7f276a8dd
2
force.py
2
force.py
|
@ -10,7 +10,7 @@ force_function = UFuncWrapper(0, c)
|
||||||
potential_function = UFuncWrapper(2, c)
|
potential_function = UFuncWrapper(2, c)
|
||||||
|
|
||||||
# Plot the force and potential.
|
# Plot the force and potential.
|
||||||
r = np.arange(0, 100, 0.02, dtype=np.float16)
|
r = np.arange(0.01, 100, 0.02, dtype=np.float16)
|
||||||
f, = plt.plot(r, force_function(r), label="force")
|
f, = plt.plot(r, force_function(r), label="force")
|
||||||
p, = plt.plot(r, potential_function(r), label="potential")
|
p, = plt.plot(r, potential_function(r), label="potential")
|
||||||
plt.legend(handles=[f, p])
|
plt.legend(handles=[f, p])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user