In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [8]:
def ballarc(h, R) :
q=np.zeros(len(R))
L=np.zeros(len(R))
for i in np.arange(0,len(R)):
r=R[i];
q[i]=0.5*np.arcsin(np.sqrt(2*h*r-h**2)/r)
L[i]=2*np.sqrt(2*r*h-h**2)
return (q,L)
In [13]:
R=np.arange(1,200)
(q,L)=ballarc(0.5,R)
plt.subplot(1,2,1)
plt.plot(R,q*180/np.pi)
plt.title('Gauge cone angle')
plt.subplot(1,2,2)
plt.plot(R,L)
plt.title('Width of the chord')
Out[13]:
In [ ]: