我正在使用D3-Contour库绘制隐式曲线(由等式f(x,y)=0
描述的那些曲线),由于D3中存在大量可能性(因此大)。我只需要
f(x,y)=0
),f
,并能够有效地更新曲线 理想情况下,我的代码将是这样的:
class ImplicitCurve {
constructor(svg, ...anotherArguments) {
this.curve = svg.append(...........);
// dimensions of grid?
// grid of values?
}
paintFunction(f) {
this.curve
.attr(.......)
.attr(.......)
.attr(.......)
.attr(.......)
.attr(.......)
}
}
f
时,需要更改哪些对象?