2024年9月9日 星期一

基隆地主合約一號


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

















2.
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+R RUN
CTRL+S SAVE

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);
}












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





size(400,400);
fill(#E7EA42);
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);
  }
}

沒有留言:

張貼留言