看不懂的生日快樂歌曲
Coding Comic is a tool that emphasized the logic behind coding instead of actual coding languages.
看起來似乎是一種新的漫畫用程式語言
雷亞遊戲:
台灣新創公司 https://www.rayark.com
VR Spray:
阿諾老師合作
Processing:
愛心1
void setup(){
size(500,500);
}
void draw(){
for(float theta=0; theta<frameCount/100.0; theta+=0.01){
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+0.01), y2 = r2*sin(theta+0.01);
line(250+100*x, 250-100*y, 250+100*x2, 250-100*y2);
}
}
愛心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);
}
}
}
自變數、應變數
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);
}
沒有留言:
張貼留言