rotate() 函数可以围绕当前原点旋转当前坐标系。
请注意,默认的原点是画布的左上角。为了围绕画布的中心旋转,我们必须首先平移坐标系,然后再围绕新的原点进行旋转。
旋转: 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!