Skip to content

Commit d133307

Browse files
Mitsuha MiyakeMitsuha Miyake
authored andcommitted
add and reorder some artworks
1 parent 788747e commit d133307

26 files changed

+377
-241
lines changed

works/20240802/img/image_155.png

-460 KB
Binary file not shown.
File renamed without changes.

works/20240802/img/image_1946.png

-457 KB
Binary file not shown.

works/20240802/img/image_2385.png

-464 KB
Binary file not shown.
File renamed without changes.

works/20240802/js/sketch.js

Lines changed: 145 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ let rSeed;
33

44
let start = 100;
55

6-
let rep = 150;
6+
let rep = 5;
77

88
function setup() {
99
// キャンバスサイズの設定
1010
let canvas = createCanvas(600, 600);
1111

1212
angleMode(DEGREES);
1313

14-
noiseDetail(2, 1);
14+
noiseDetail(2, 0.5);
1515

1616
rSeed = int(random(seed));
1717
console.log(rSeed);
@@ -20,63 +20,152 @@ function setup() {
2020

2121
background(30);
2222

23-
translate(width / 2, height / 2);
24-
25-
let c = floor(random(6));
26-
console.log(c);
27-
28-
let space = 1;
29-
for (let j = 0; j < rep; j++) {
30-
push();
31-
translate(random(-width / 2, width / 2), random(-height / 2, height / 2));
32-
for (let i = 0; i < 10; i++) {
33-
let xoff = map(cos(i) + j, -1, 1, 0, 3);
34-
let yoff = map(sin(i) + j, -1, 1, 0, 3);
35-
36-
let n = noise(xoff + start, yoff + start);
37-
let h = map(n, 0, 1, -100, 100);
38-
39-
let r, g, b;
40-
41-
if (c == 0) {
42-
// blue and purple base
43-
r = map(sin(i), -1, 1, 100, 255);
44-
g = map(h, -100, 100, 0, 150);
45-
b = map(n, 0, 1, 100, 200);
46-
} else if (c == 1) {
47-
// yellow and red base
48-
r = map(sin(i), -1, 1, 100, 255);
49-
b = map(h, -100, 100, 0, 150);
50-
g = map(n, 0, 1, 100, 200);
51-
} else if (c == 2) {
52-
// yellow and red base
53-
g = map(sin(i), -1, 1, 100, 255);
54-
b = map(h, -100, 100, 0, 150);
55-
r = map(n, 0, 1, 100, 200);
56-
} else if (c == 3) {
57-
// yellow and red base
58-
g = map(sin(i), -1, 1, 100, 255);
59-
r = map(h, -100, 100, 0, 150);
60-
b = map(n, 0, 1, 100, 200);
61-
} else if (c == 4) {
62-
// pink and yello base
63-
b = map(sin(i), -1, 1, 100, 255);
64-
g = map(h, -100, 100, 0, 150);
65-
r = map(n, 0, 1, 100, 200);
66-
} else if (c == 5) {
67-
// pink and yello base
68-
b = map(sin(i), -1, 1, 100, 255);
69-
r = map(h, -100, 100, 0, 150);
70-
g = map(n, 0, 1, 100, 200);
23+
let cell_num = 3;
24+
let w = width / cell_num;
25+
let ht = w;
26+
let offset = width / cell_num / 2;
27+
let space = 0.2;
28+
for (let l = 0; l < cell_num; l++) {
29+
for (let k = 0; k < cell_num; k++) {
30+
let c = floor(random(6));
31+
console.log(c);
32+
33+
let cx = l * w + offset;
34+
let cy = k * ht + offset;
35+
push();
36+
translate(cx, cy);
37+
for (let j = 0; j < rep; j++) {
38+
for (let i = 0; i < 360; i += space) {
39+
let xoff = map(cos(i + k * 100) + j, -1, 1, 0, 3);
40+
let yoff = map(sin(i + l * 100) + j, -1, 1, 0, 3);
41+
42+
let n = noise(xoff + start, yoff + start);
43+
let h = map(n, 0, 1, -400, 400);
44+
45+
let r, g, b;
46+
47+
if (c == 0) {
48+
// blue and purple base
49+
r = map(sin(i), -1, 1, 100, 200);
50+
g = map(h, -100, 100, 0, 150);
51+
b = map(n, 0, 1, 100, 200);
52+
} else if (c == 1) {
53+
// yellow and red base
54+
r = map(sin(i), -1, 1, 100, 255);
55+
b = map(h, -100, 100, 0, 150);
56+
g = map(n, 0, 1, 100, 200);
57+
} else if (c == 2) {
58+
// yellow and red base
59+
g = map(sin(i), -1, 1, 100, 255);
60+
b = map(h, -100, 100, 0, 150);
61+
r = map(n, 0, 1, 100, 200);
62+
} else if (c == 3) {
63+
// yellow and red base
64+
g = map(sin(i), -1, 1, 100, 255);
65+
r = map(h, -100, 100, 0, 150);
66+
b = map(n, 0, 1, 100, 200);
67+
} else if (c == 4) {
68+
// pink and yello base
69+
b = map(sin(i), -1, 1, 100, 255);
70+
g = map(h, -100, 100, 0, 150);
71+
r = map(n, 0, 1, 100, 200);
72+
} else if (c == 5) {
73+
// pink and yello base
74+
b = map(sin(i), -1, 1, 100, 255);
75+
r = map(h, -100, 100, 0, 150);
76+
g = map(n, 0, 1, 100, 200);
77+
}
78+
79+
rotate(space);
80+
noStroke();
81+
fill(r, g, b, 30);
82+
rect(0, 0, h, 1);
83+
}
84+
for (let i = 0; i < 360; i += space) {
85+
let xoff = map(cos(i) + j, -1, 1, 0, 3);
86+
let yoff = map(sin(i) + j, -1, 1, 0, 3);
87+
88+
let n = noise(xoff + start + j, yoff + start + j);
89+
let h = map(n, 0, 1, -400, 400);
90+
91+
rotate(space);
92+
stroke(255, 255, 255, 30);
93+
point(h, 0);
94+
}
7195
}
72-
for (let k = 0; k < 360; k += space) {
73-
rotate(space);
74-
noStroke();
75-
fill(r, g, b, 30);
76-
rect(0, 0, h, 1);
96+
pop();
97+
}
98+
}
99+
for (let l = 0; l < cell_num; l++) {
100+
for (let k = 0; k < cell_num; k++) {
101+
let c = floor(random(6));
102+
console.log(c);
103+
104+
let cx = l * w + offset;
105+
let cy = k * ht + offset;
106+
push();
107+
translate(cx, cy);
108+
for (let j = 0; j < rep; j++) {
109+
for (let i = 0; i < 360; i += space) {
110+
let xoff = map(cos(i + k * 100) + j, -1, 1, 0, 3);
111+
let yoff = map(sin(i + l * 100) + j, -1, 1, 0, 3);
112+
113+
let n = noise(xoff + start, yoff + start);
114+
let h = map(n, 0, 1, -400, 400);
115+
116+
let r, g, b;
117+
118+
if (c == 0) {
119+
// blue and purple base
120+
r = map(sin(i), -1, 1, 100, 200);
121+
g = map(h, -100, 100, 0, 150);
122+
b = map(n, 0, 1, 100, 200);
123+
} else if (c == 1) {
124+
// yellow and red base
125+
r = map(sin(i), -1, 1, 100, 255);
126+
b = map(h, -100, 100, 0, 150);
127+
g = map(n, 0, 1, 100, 200);
128+
} else if (c == 2) {
129+
// yellow and red base
130+
g = map(sin(i), -1, 1, 100, 255);
131+
b = map(h, -100, 100, 0, 150);
132+
r = map(n, 0, 1, 100, 200);
133+
} else if (c == 3) {
134+
// yellow and red base
135+
g = map(sin(i), -1, 1, 100, 255);
136+
r = map(h, -100, 100, 0, 150);
137+
b = map(n, 0, 1, 100, 200);
138+
} else if (c == 4) {
139+
// pink and yello base
140+
b = map(sin(i), -1, 1, 100, 255);
141+
g = map(h, -100, 100, 0, 150);
142+
r = map(n, 0, 1, 100, 200);
143+
} else if (c == 5) {
144+
// pink and yello base
145+
b = map(sin(i), -1, 1, 100, 255);
146+
r = map(h, -100, 100, 0, 150);
147+
g = map(n, 0, 1, 100, 200);
148+
}
149+
150+
rotate(space);
151+
noStroke();
152+
fill(r, g, b, 30);
153+
rect(0, 0, h, 1);
154+
}
155+
for (let i = 0; i < 360; i += space) {
156+
let xoff = map(cos(i) + j, -1, 1, 0, 3);
157+
let yoff = map(sin(i) + j, -1, 1, 0, 3);
158+
159+
let n = noise(xoff + start + j, yoff + start + j);
160+
let h = map(n, 0, 1, -400, 400);
161+
162+
rotate(space);
163+
stroke(255, 255, 255, 30);
164+
point(h, 1);
165+
}
77166
}
167+
pop();
78168
}
79-
pop();
80169
}
81170
}
82171

0 commit comments

Comments
 (0)