本文整理汇总了Python中bspline.Bspline.plot方法的典型用法代码示例。如果您正苦于以下问题:Python Bspline.plot方法的具体用法?Python Bspline.plot怎么用?Python Bspline.plot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bspline.Bspline
的用法示例。
在下文中一共展示了Bspline.plot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Corner
# 需要导入模块: from bspline import Bspline [as 别名]
# 或者: from bspline.Bspline import plot [as 别名]
class Corner(object):
"""
we define the needle to be inserted into the divergent part of the nozzle
"""
def __init__(self, needleDef):
"""
Constructor
l-> lenght
A-> inlet Area
m-> inlet derivative
ncp-> number of Control Point
type -> stretching function
"""
self._needleDef = needleDef
self._P = needleDef.getCPc()
self._corner = Bspline(self._P, p = 2)
def __call__(self, u):
return self._corner(u)
def plot(self):
return self._corner.plot()
示例2: __init__
# 需要导入模块: from bspline import Bspline [as 别名]
# 或者: from bspline.Bspline import plot [as 别名]
class NozzleComp:
def __init__(self, cdDef, p = 3):
self._cdDef = cdDef
self._P = cdDef.getCP()
self._p = p
self._convDiv = Bspline(self._P, p = p)
def __call__(self, u):
return self._convDiv(u)
def plot(self):
self._convDiv.plot()
def getCP(self):
return self._P
示例3: __init__
# 需要导入模块: from bspline import Bspline [as 别名]
# 或者: from bspline.Bspline import plot [as 别名]
class Profile1:
def __init__(self, cp_s, cp_p, p = 3, pitch = 0.0, height = 0.0 ):
self._p = p
self._pitch = pitch
self._height = height
if height == 0.0 and pitch == 0.0:
self._cp_s = cp_s
self._cp_p = cp_p
else:
self._cp_s = self._redefCP(cp_s)
self._cp_p = self._redefCP(cp_p)
self._prof_s = Bspline(self._cp_s, p = p)
self._prof_p = Bspline(self._cp_p, p = p)
def _redefCP(self, cp):
pitch, height = self._pitch, self._height
cp_new = []
for i in xrange(len(cp)):
cp_new.append(Point(cp[i].x, cp[i].y + pitch, cp[i].z + height))
return cp_new
def getProfS(self, u):
return self._prof_s(u)
def getProfP(self, u):
return self._prof_p(u)
def plot(self):
self._prof_s.plot()
self._prof_p.plot()