【Processing】copy()を使ってみる(5)

 

懲りずにまたcopy()
シンメトリーにペーストした。
ペーストするときにーを使うと裏返して貼り付けできるよ。

 

PImage aa;//写真のオブジェクト
aa = loadImage("data/c.jpg");//画像をロードする

size(800, 800);//キャンパスサイズ
image(aa, 0, 0, width/random(0.5,1.5), height/random(0.5,1.5));//画像を画面いっぱいに表紙

//地平線にシンメトリー
copy(0, 0, width, height/2, 
  0, height, width, -height/2);

//垂直線にシンメトリー
copy(0, 0, width/2, height, 
  width, height, -width/2, -height);