SINTEF / Splipy

Spline modelling made easy.
GNU General Public License v3.0
100 stars 18 forks source link

Circle_segment_from_three_points not working for larger than half-circles #72

Closed VikingScientist closed 6 years ago

VikingScientist commented 6 years ago
from splipy import *                                                           
import splipy.curve_factory as cf                                              
import matplotlib.pyplot as plt                                                

crv = cf.circle_segment_from_three_points([4,0], [0,4], [0,-4])                
print(crv)                                                                     

u = np.linspace(crv.start(0), crv.end(0), 100)                                    
x = crv(u)                                                                        
plt.plot(x[:,0], x[:,1])                                                          
plt.show()                                                                        
p=3, [0.         0.         0.         1.57079633 1.57079633 1.57079633]
[[ 4.          0.          1.        ]
 [ 2.82842712  2.82842712  0.70710678]
 [ 0.         -4.          1.        ]]

bad_circle