rikorin0528
@rikorin0528

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

ブロックリーゲームタートルレベル10

ブロックリーゲームタートルレベル10で下記のコードをブロックに変換したいです。

float R = 45; //図形の大きさ調整用

float x;
float y;
float r;

void setup() {
size(400, 400);
background(255);
}

void draw() {
background(255);

//中心線
strokeWeight(1);
stroke(200);
line(width/2, 0, width/2, height);
line(0, height/2, width, height/2);

//カエデの描画
noFill();
strokeWeight(2);
stroke(200, 0, 0);
noFill();

pushMatrix();
translate(width/2, height/2);
beginShape();
for (float theta = 0; theta < 360; theta += 1) {
r = - R * (1 + (9.0/10.0) * cos(radians(8 * theta))) * (1 + (1.0/10.0) * cos(radians(24 * theta))) * ((9.0/10.0) + (1.0/10.0) * cos(radians(200 * theta))) * (1 + sin(radians(theta)));

x = r * cos(radians(theta));
y = r * sin(radians(theta));

vertex(x, y);

}
endShape(CLOSE);
popMatrix();
}

もしくは下記の数式?でも構いません

r (€) = a [1 + % cos (8 6)[1+ cos (24 0)] [%99cos (200 0) (1 + sin 0)

どなたか解説していただけると幸いです

0

No Answers yet.

Your answer might help someone💌