We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
### 色とスピードが毎回ランダムな円のアニメーション
int count =0; int circle_length= 28; //丸を何個作るか int start_angle = 0; //スタート地点の角度 int [] diameters = new int[circle_length], //円の直径 angles = new int[circle_length], //角度 speeds = new int[circle_length], //速度 hues = new int[circle_length];//色 void settings(){ size(1000,600); } void setup(){ colorMode(HSB, 360, 100, 100); //RGBだと綺麗な色になりにくいらしい? smooth(); frameRate(60);//一秒間に60回再描画をかける background(0); strokeWeight(2); noFill(); for (int i =0; i < circle_length; i++) { hues[i] =floor(random(361)); diameters[i] = 20 * i + 20 ; angles[i] = start_angle; speeds[i] = floor(random(2,8)); } } void draw(){ if (count<=360){ //360を超えた段階でおわり for(int i =0; i < circle_length; i++) { if (angles[i] <= 360){ stroke(hues[i],100,100); float rad = radians(angles[1]); arc(width/2, height/2,diameters[i],diameters[i],0, rad, OPEN); angles[i]+= speeds[i]; if (angles[i] >= 360) { angles[i]= 360; } } } count++; //再描画をかける度にcountをインクリメントする } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
### 色とスピードが毎回ランダムな円のアニメーション
The text was updated successfully, but these errors were encountered: