当前位置: 首页>>代码示例>>Python>>正文


Python Bspline.plot方法代码示例

本文整理汇总了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()        
开发者ID:salvovitale,项目名称:zBlade,代码行数:30,代码来源:needle.py

示例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       
开发者ID:salvovitale,项目名称:zBlade,代码行数:19,代码来源:nozzle2D.py

示例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()
        

        
            
        
             
                        
        
                    
        
开发者ID:salvovitale,项目名称:zBlade,代码行数:36,代码来源:profile1.py


注:本文中的bspline.Bspline.plot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。