week 14 教學軟體筆記 呂郁欣
1.實作:畫愛心
Processing heart curve
Part 1
void setup() {
size(500, 500);
}
void draw() {
for (float theta=0; theta<frameCount/100.0; theta+=0.01) {//PI*2 is better
float r=1-sin(theta), r2=1-sin(theta+0.01);
float x=r*cos(theta), y=r*sin(theta);
float x2=r2*cos(theta), y2=r2*sin(theta);
line(250+100*x, 250-100*y, 250+100*x2, 250-100*y2);
}
}
Part 2
void setup() {
size(400, 400);
noStroke();
}
void draw () {
for (float x=-2; x<=2; x+=0.01) {
for (float y=-2; y<=2; y+=0.01) {
if ((x*x+y*y-1)*(x*x+y*y-1)*(x*x+y*y-1)-x*x*y*y*y<0)
fill(255, 0, 0);
else
fill(255);
rect(200+x*100, 200-y*100, 10, 10);
}
}
}
Part 3
void setup() {
size(400, 400);
noStroke();
}
void draw () {
for (float x=-2; x<=2; x+=0.01) {
for (float y=-2; y<=2; y+=0.01) {
if ((x*x+y*y-1)*(x*x+y*y-1)*(x*x+y*y-1)-x*x*y*y*y>0)
fill(255, 0, 0);
else
fill(255);
rect(200+x*100, 200-y*100, 10, 10);
}
}
}
sin & cos
void setup(){
size(400,400);
}
void draw(){
float angle= -radians(frameCount)/3;
rect(0,0,200,200);
stroke(0,0,255);
ellipse(100,100,100,100);
line(100,100,100+cos(angle)*50,100+sin(angle)*50);
//rect(200,0,200,200);
ellipse(200+abs(angle)*30,100+sin(angle)*50,10,10);
ellipse(100+cos(angle)*50,200+abs(angle)*30,10,10);
}
2.Processing fellowship
https://processingfoundation.org/fellowships
2016 年得獎者
Allison Parrish
http://www.decontextualize.com/projects/
2016 年得獎者
Allison Parrish
http://www.decontextualize.com/projects/
Claire Kearney-Volpe
The Digital Citizens Lab
Rayark Inc.
Tango Project
VR graffiti
Kingspray graffiti
VR Spray 與阿若老師合作
沒有留言:
張貼留言