point

def setup
  background(220)
  strokeWeight(5)
  point(30, 20)
  point(85, 20)
  point(85, 75)
  point(30, 75)
end
def setup
  background(220)
  strokeWeight(5)
  point(30, 20)
  point(85, 20)
  stroke('purple')
  strokeWeight(10)
  point(85, 75)
  point(30, 75)
end
def setup
  background(220)
  strokeWeight(5)
  a = createVector(10, 10)
  point(a)
  b = createVector(10, 20)
  point(b)
  point(createVector(20, 10))
  point(createVector(20, 20))
end

p5.jsリファレンス(参考情報)

[p5.js] point

概要

点を描画します。

書式

point(x, y [, z])
point(coordinate_vector)

引数

p5.Vectorオブジェクト
引数名内容備考オプションデフォルト値
x点の x座標
y点の y座標
z点の z座標WEBGLモードのキャンバスでのみ有効
coordinate_vector点の座標を示すベクトル

戻値

なし

備考

関連

stroke
strokeWeight