📜  如何围绕圆形绘制花瓣javascript代码示例

📅  最后修改于: 2022-03-11 15:03:31.657000             🧑  作者: Mango

代码示例1
size(400, 400);
background(#ffffff);
smooth();
// set centre point
translate(width/2, height/2);
// centre circle
ellipse(0, 0, 50, 50);
// draw 5 petals, rotating after each one
for (int i = 0; i < 5; i++) {
  ellipse(0, -50, 50, 50);
  rotate(radians(72));
}