実例 回転

回転

rotate() 関数は、現在の原点を中心に現在の座標系を回転させます。

デフォルトでは、原点はキャンバスの左上隅です。キャンバスの中心を回転させるためには、まず座標系を移動させ、その後新しい原点を中心に回転させる必要があります。

push()pop() 関数は、それぞれ座標系を保存および復元します。

Creative Commons BY-NC-SA license badge

回転: 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!