Introduction
Following the star line , then try the bicorn.
Introduction
The double diagonal is also called the cocked-ha curve, which is the name of a set of quartic curves studied by Sylvester Cayley studied the same curve in 1867.
Formula description in 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 = 40;
while (start <= max) {
x = a * Math.sin(start);
const yNumerator = a * Math.pow(Math.cos(start), 2) * (2 + Math.cos(start));
const yDenominator = 3 + Math.pow(Math.sin(start), 2);
y = yNumerator / yDenominator;
points.push([x, y]);
start = start + acceleration;
}
// 实现把点绘制成线的方法
line({ points: points});
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。