示例#1
0
 def create_splines(self):
     """
     create cubic splines for x and y coordinate with respect to curve 
     length parameter
     """
     lenUp = geom.curve_pt_dist_normalized(self.upPts)
     lenLo = geom.curve_pt_dist_normalized(self.loPts)
     self.upCurve = CurveXyt(self.upPts[:, 0], self.upPts[:, 1], lenUp)
     self.loCurve = CurveXyt(self.loPts[:, 0], self.loPts[:, 1], lenLo)
示例#2
0
 def _create_splines(self):
     """
     create cubic splines for x and y coordinate with respect to curve 
     length parameter
     """
     # parametric splines x = x(t), y = y(t)
     lenUp = geom.curve_pt_dist_normalized(self.ptsUp)
     lenLo = geom.curve_pt_dist_normalized(self.ptsLo)
     self._curveUp = CurveXyt(self.ptsUp[:,0],self.ptsUp[:,1],lenUp)
     self._curveLo = CurveXyt(self.ptsLo[:,0],self.ptsLo[:,1],lenLo)
     ptsUp,ptsLo = self._sort_pts()
     self._curveUp2 = interp1d(ptsUp[:,0],ptsUp[:,1],'cubic')
     self._curveLo2 = interp1d(ptsLo[:,0],ptsLo[:,1],'cubic')
     self._xmin = max([ptsUp[0,0],ptsLo[0,0]])
     self._xmax = min([ptsUp[-1,0],ptsLo[-1,0]])