line(0, l / 2, l, l / 2);
line(l / 2, 0, l / 2, l); // 在窗口中心画垂直的十字线,类似于X,Y轴,交叉点是 p0
float r = 200 * sin(theta / 13 * 4);
PVector p = PVector.add(p0, new PVector(r * cos(theta), - r * sin(theta))); // 从十字线交点p0,加上一个新的向量,长度为r,角度-theta
line(l / 2, l / 2, p.x, p.y); // (l/2, l/2)就是p0, 是十字线交叉点,即从p0到p划线
theta *= (1 + 5 / (500 + abs(r * theta))); // theta每次循环变一变
![](http://imgsrc.baidu.com/forum/w%3D580/sign=fd7cfc004cc2d562f208d0e5d71090f3/f4f2f5628535e5dda355f7bf75c6a7efce1b6201.jpg)