openLaval.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:OpenLaval 作者: istellartech 项目源码 文件源码
def plot_chara(self, angle, step,Rstar = 1):

        counter = 1000
        i = np.arange(counter)
        Rstar_tmp = self.Rstar_min + i / counter
        Rstar_tmp = Rstar_tmp[Rstar_tmp < 1]
        fai = self.chara_line(Rstar_tmp)
        for j in range(0, angle, step):
            x1 = self.chara_x(Rstar_tmp * Rstar, fai - self.const + np.deg2rad(j))
            y1 = self.chara_y(Rstar_tmp * Rstar, fai - self.const + np.deg2rad(j))
            x2 = self.chara_x(Rstar_tmp * Rstar, - (fai - self.const - np.deg2rad(j)))
            y2 = self.chara_y(Rstar_tmp * Rstar, - (fai - self.const - np.deg2rad(j)))

            plt.plot(x1, y1, "r")
            plt.plot(x2, y2, "k")
        plt.xlim(-1, 1)
        plt.ylim(-1, 1)
        plt.gca().set_aspect('equal', adjustable='box')
        plt.show()

    # top arc angle is 0
    # v1 must be smaller than v2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号