シンタックス
point( X座標, Y座標 )
line( 始点のX, 始点のY, 終点のX, 終点のY )
サンプル
コード
void setup(){
size( 600, 400 );
}
void draw(){
background( color( 20, 0, 60 ) );
stroke( color( 255, 255, 0 ) );
point( 180, 110);
point( 230, 60);
point( 290, 120);
point( 260, 160);
point( 300, 200);
point( 340, 240);
point( 400, 270);
stroke( 255 );
strokeWeight( 3 );
line( 0, 360, 600, 360 );
}
補足
点や線の色は stroke 関数で操作します。線の太さは strokeWeight 関数で操作します。
コメント