scale() 函数可以按照指定的因子缩放当前坐标系。
push() 和 pop() 函数分别用于保存和恢复坐标系。
在这个例子中,我们在原点处绘制了一个边长为 200 的正方形,并展示了三种不同的缩放因子。
缩放: Revised by Darren Kessner. Edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: 2023 code, pre-2023 code. You can suggest improvements by contributing to the current website!