⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 distance2d.pde

📁 This is processing for java examples.
💻 PDE
字号:
/** * Distance 2D.  *  * Move the mouse across the image to obscure and reveal the matrix.   * Measures the distance from the mouse to each square and sets the * size proportionally.  */ float max_distance;void setup() {  size(200, 200);   smooth();  noStroke();  max_distance = dist(0, 0, width, height);}void draw() {  background(51);  for(int i = 0; i <= width; i += 20) {    for(int j = 0; j <= height; j += 20) {      float size = dist(mouseX, mouseY, i, j);      size = size/max_distance * 66;      ellipse(i, j, size, size);    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -