2024年9月9日 星期一

芒果汁 week01 入門介紹

TODO:

1.標題:你的品牌 系列 簡介

2.檢籤:學號_姓名,week01

3.內容:貼上你的文字筆記,貼上你有意義的程式及註解,貼上你的成果圖


 size(500,500);

background(255,255,0);

size(500,500);
background(255,255,0);

void setup(){
  size(500,500);
}

void draw(){
  if(mousePressed) background(255,0,0);
  else background(0,255,0);
}

void setup(){
  size(500,500);
}

void draw(){
  if(mousePressed) background(255,0,0);
  else background(0,255,0);
}



void setup(){
  size (500,500);
}
void draw(){
  if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY);
}




快速鍵:

ctrl-c, ctrl-v

ctrl-Z 還原

ctrl-T 自動排版

ctrl-N 新文件NEW

ctrl-S 存檔Save

ctrl-A 全選ALL




void setup(){ size (500,500); } void draw(){ if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY); } void keyPressed(){ if(key=='1') strokeWeight(1); if(key=='2') strokeWeight(5); if(key=='3') strokeWeight(10); }
void setup(){
  size (500,500);
}
void draw(){
  if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY);
}

void keyPressed(){
  if(key=='1') strokeWeight(1);
  if(key=='2') strokeWeight(5);
  if(key=='3') strokeWeight(10);
}

void setup(){ size (500,500); } void draw(){ if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY); } void keyPressed(){ if(key=='1') strokeWeight(1); if(key=='2') strokeWeight(5); if(key=='3') strokeWeight(10); if(key=='4') stroke(255,0,0); if(key=='5') stroke(255,255,0); if(key=='6') stroke(0,255,0); if(key=='7') stroke(0,0,255); if(key=='8') stroke(255,0,255); }

void setup(){
  size (500,500);
}
void draw(){
  if(mousePressed) line(mouseX,mouseY,pmouseX,pmouseY);
}

void keyPressed(){
  if(key=='1') strokeWeight(1);
  if(key=='2') strokeWeight(5);
  if(key=='3') strokeWeight(10);
  if(key=='4') stroke(255,0,0);
  if(key=='5') stroke(255,255,0);
  if(key=='6') stroke(0,255,0);
  if(key=='7') stroke(0,0,255);
  if(key=='8') stroke(255,0,255);
}




size(600,400); background(#FFFFA2); rect(100,100,400,200); fill(#FFFFA2); ellipse(300,200,100,100);

size(600,400);
background(#FFFFA2);
rect(100,100,400,200);
fill(#FFFFA2);
ellipse(300,200,100,100);


size(400,400); fill(#FFDC0F); noStroke(); //ellipse(50,50,100,100); arc(50,50,100,100,0 + 1,PI*2 - 1);


size(400,400);
fill(#FFDC0F);
noStroke();
//ellipse(50,50,100,100);
arc(50,50,100,100,0 + 1,PI*2 - 1);


size(400,400); fill(#FFDC0F); for(int x=0; x<400; x+=100){ for(int y=0; y<400; y+=100){ arc(x+50,y+50,100,100,0 + 0.5,PI*2 - 0.5,PIE); } } noStroke(); //ellipse(50,50,100,100);
size(400,400);
fill(#FFDC0F);
for(int x=0; x<400; x+=100){
  for(int y=0; y<400; y+=100){
    arc(x+50,y+50,100,100,0 + 0.5,PI*2 - 0.5,PIE);
  }
}
noStroke();
//ellipse(50,50,100,100);















































沒有留言:

張貼留言