引子
继连锁螺线,接着尝试星形线(Astroid)。
- Origin
- My GitHub
简介
Johann Bernoulli 在 1691-1692 年首次探讨了星形线。它也呈现在 Leibniz 1715 年的函件中。它有时被称为四尖瓣,很显著因为它有四个尖。
Astroid 直到 1836 年才在维也纳出版的一本书中取得了当初的名称。即便在 1836 年当前,文献中也呈现了各种名称,包含 cubocycloid 和 paracycle 。
在笛卡尔坐标系中公式形容:
其中 a 为常数。
绘制
参数化转换:
这是示例,绘制次要逻辑代码:
function draw() { let a = 100, start = 0; let x = 0, y = 0, points = []; const acceleration = 0.1, max = 20; while (start <= max) { x = a * Math.pow(Math.cos(start), 3); y = a * Math.pow(Math.sin(start), 3); points.push([x, y]); start = start + acceleration; } // 实现把点绘制成线的办法 line({ points: points});}
参考资料
- Astroid Curves
- Astroid Wolfram