【发布时间】:2016-01-11 23:28:16
【问题描述】:
我正在尝试使用有限差分方法制作一个可以在它们之间进行点和插值的程序。它必须能够返回 xy 坐标,才能绘制到屏幕上
我的样条线类:
class Spline():
def __init__(self):
self.x = 1
self.y = 1
self.p = []
self.l = []
self.s = []
self.Width = 2
self.Color = "#000"
def AddPoints(self,*a):
self.p.append(a)
def DefineCurve(self,*a):
for pp in a:
self.s.append(pp)
def DefineLine(self,*a):
for pp in a:
self.l.append(pp)
def GetSpline(self):
return self.s
def GetLine(self):
tL = []
for a in self.l:
tL.append(self.l[a])
return tL
我愿意接受任何建议
【问题讨论】:
标签: python python-3.x spline