実例 移動

移動

translate() 関数は、座標系の原点を指定された位置に移動します。

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!