我整理了一份学习笔记,如下
https://zhuanlan.zhihu.com/p/79623053
https://zhuanlan.zhihu.com/p/78756118
https://pan.baidu.com/s/1QNKI-n3Qc0YnmwNfS2NWNA?pwd=proc%E2%80%8B
密码:processing?
size(大小)
rect(x,y,高度,宽度)? ? //矩形
ellipse(x,y,高度,宽度) //圆形
line(x,y,x,y)? ? ? ? ? ? ? ? ? //线
background(背景色)? ? //背景
fill(填充颜色)
mouseX mouseY ? ? ? ?//变量,鼠标坐标
def draw()? ? ? ? ? ? ? ? ? //循环执行的代码
def setup()? ? ? ? ? ? ? ? ??//?执行一次的代码
key? ? ? ? ? ? ? ? ? ? ? ? ? ? ?//变量,存储最近按下的键
text()? ? ? ? ? ? ? ? ? ? ? ? ? //打字
代码,粉丝懂得
def setup():
size(800,800)
def draw():
if mouseX>400:
background(0)
stroke(255)
fill(0)
arc(600,200,200,150,0,PI)
arc(200,200,200,150,0,PI)
fill(0)
ellipse(400,500,100,100)
fill(255)
textSize(30)
text('Z',350,450)
textSize(40)
text('Z',300,400)
textSize(50)
text('Z',250,350)
else:
background(255)
strokeWeight(5)
arc(600,220,200,150,PI,TWO_PI)
arc(200,220,200,150,PI,TWO_PI)
arc(400,450,400,350,0,PI)
stroke(0)
效果图