Introduction
Following interlocking spiral , then try the star line (Astroid).
Introduction
Johann Bernoulli first discussed star lines in 1691-1692. It also appears in Leibniz 1715 years of letters. It is sometimes called the quadricuspid valve, obviously because it has four cusps.
Astroid didn't get its current name in a book published in Vienna until 1836. Even after 1836, various names appeared in the literature, including cubocycloid and paracycle.
The formula is described in the Cartesian coordinate system:
Where a is a constant.
draw
Parametric conversion:
This is the example , drawing the main logic code:
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});
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。