非常に変な質問ですが、これ以上に見やすくてわかりやすいプログラムの構造を作ることができるかどうかの質問をしたいです。宜しくお願い致します。
もし質も内容に不明がございましたら、お手数ですがコメントをお願いします。
import ddf.minim.*; Minim minim; AudioPlayer player; float ran =150+random(106); int xx=0, yy= 0, fux=1, fuy=1; void setup() { minim = new Minim(this); player = minim.loadFile("- Lt. Eva Quotes.mp3"); player.play(); size(1900, 800); background(#00FF00); strokeWeight(1); noFill(); rectMode(CENTER); } void draw() { noStroke(); xx++; yy++; float x = width / 2 - cos(radians(frameCount*1.5)) * 300 ; float y = height / 2 - sin(radians(frameCount*1.5)) * 300 ; if (xx > width/3) { xx = 0; fux *= -1; } if (yy > height/2) { yy = 0; fuy*= -1; } pushMatrix(); pushStyle(); fill(#00FF00, 7); strokeWeight(10); rectMode(CENTER); rect(width/2, height/2, width, height); stroke(ran, ran, ran); popMatrix(); popStyle(); pushMatrix(); pushStyle(); fill(random(150)+101, 100, 100); rect(x, y, 20, 20); // red cercle rect(x, yy*2, 10, 100); ellipse(xx*3, y, 80, 10 ); rect(x, frameCount, 10, 10); ellipse(1536-frameCount, y, 10, 10 ); popMatrix(); popStyle(); pushMatrix(); pushStyle(); rectMode(CENTER); blendMode(DIFFERENCE); translate(width / 2, height / 2);// 中心の謎の四角形(棒) rotate(radians(-frameCount)); stroke(0); rect(0, 0, 700, 50); rotate(radians(frameCount*2)); stroke(random(255), random(255), random(255)); rect(0, 0, 100, 100);//中心の周りの枠 line(0, 0, 200, 0);//つなぐ線 translate(200, 0);// 周りで回るうすい四角形 rotate(radians(frameCount)); stroke(random(255), 100, 100); rect(0, 0, 50, 50); rotate(radians(-frameCount*5)); // 周りで回る四角枠 stroke(100, random(255), 100); rect(0, 0, 100, 100); translate(100, 150); fill(random(50)+150, random(50)+150, random(50)+150); ellipse(0, 0, 75, 75); popStyle(); popMatrix(); }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/30 11:04
2019/01/30 11:08