回答編集履歴
1
見直しキャンペーン中
answer
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
描画内でランダム要素があるとフレームごとに描く内容が変わってしまい、ちらつくことになります。
|
1
|
-
```Processing
|
2
|
+
```Processing
|
2
|
-
if (random(0, 4)>3 && strokeWeight<3)return;
|
3
|
+
if (random(0, 4) > 3 && strokeWeight < 3) return;
|
3
|
-
```
|
4
|
+
```
|
4
|
-
|
5
|
+
|
5
|
-
そこで、一見規則性はなさそうに見えて、でも毎回同じ値に決定できるものに変えます。
|
6
|
+
そこで、一見規則性はなさそうに見えて、でも毎回同じ値に決定できるものに変えます。
|
6
|
-
```Processing
|
7
|
+
```Processing
|
7
|
-
if (x%5>3 && strokeWeight<3)return;
|
8
|
+
if (x % 5 > 3 && strokeWeight < 3) return;
|
8
|
-
```
|
9
|
+
```
|
10
|
+
|
9
11
|
適当なんでほかの数値や計算でもいいです。
|