小圆环绕大圆

Posted YC小杨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小圆环绕大圆相关的知识,希望对你有一定的参考价值。

function fn(n) {
return 380 + 100 * Math.sin(n * ((2 * Math.PI) / 7)) - 20;
};
function fm(m) {
return 380 - 100 * Math.cos(m * ((2 * Math.PI) / 7)) - 20;
};
function fg(g) {
div = document.querySelector("#div"+g);
div.style.position = "absolute";
div.style.width = "40px";
div.style.height = "40px"
div.style.background = "brown";
div.style.borderRadius = "20px";
div.style.left = fn(g) + "px"
div.style.top = fm(g) + "px"
};
div = document.querySelector("#div0");
div.style.position = "absolute";
div.style.left = "300px";
div.style.top = "300px";
div.style.width = "160px";
div.style.height = "160px"
div.style.background = "brown";
div.style.borderRadius = "80px";
fg(1);fg(2);fg(3);fg(4);fg(5);fg(6);fg(7);

以上是关于小圆环绕大圆的主要内容,如果未能解决你的问题,请参考以下文章

Intersection(HDU5120 + 圆交面积)

AI工具(缩放工具)(路径查找器)(旋转工具)5.12

HDOJ6354Everything Has Changed(计算几何)

canvas绘制一定数目的圆(均分)

HDU 5120 Intersection (求圆环相交面积)

[计算几何][圆反演] 2019 ICPC区域赛沈阳站E.Capture Stars