Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

vertex()

Examples
example pic
beginShape(POINTS);
vertex(30, 20);
vertex(85, 20);
vertex(85, 75);
vertex(30, 75);
endShape();
example pic
// Drawing vertices in 3D requires P3D
// or OPENGL as a parameter to size()
size(100, 100, P3D);
beginShape(POINTS);
vertex(30, 20, -50);
vertex(85, 20, -50);
vertex(85, 75, -50);
vertex(30, 75, -50);
endShape();
example pic
noStroke();
PImage a = loadImage("arch.jpg");
beginShape();
texture(a);
// "arch.jpg" is 100x100 pixels in size so
// the values 0 and 100 are used for the
// parameters "u" and "v" to map it directly
// to the vertex points
vertex(10, 20, 0, 0);
vertex(80, 5, 100, 0);
vertex(95, 90, 100, 100);
vertex(40, 95, 0, 100);
endShape();
Description 全ての図形は複数の頂点を接続することによって構築されます。 vertex() は、点、線、三角形、四角形、そして多角形の頂点の座標を指定する際に使われます。 通常は beginShape() から endShape() までの範囲内で使用します。

z パラメタを使用する3次元の図形の場合、size() に P3D または OPENGL パラメタを指定します。

また、この関数はジオメトリの上にテクスチャをマッピングする際にも使用します。 texture() はジオメトリに適用するテクスチャを宣言します。 そして u 座標と v 座標を指定することは、そのジオメトリの形状に対し、テクスチャをマッピングすることを示します。 デフォルトでは uv の座標はピクセル中のイメージサイズと関連して指定されます。 しかし、この関係は textureMode() で変更することができます。

/* Note:2 */
Syntax
vertex(x, y); 
vertex(x, y, z); 
vertex(x, y, u, v); 
vertex(x, y, z, u, v);
Parameters
x int or float: x-coordinate of the vertex
y int or float: y-coordinate of the vertex
z int or float: z-coordinate of the vertex
u int or float: horizontal coordinate for the texture mapping
v int or float: vertical coordinate for the texture mapping
Usage Application & Web
Related beginShape()
endShape()
bezierVertex()
curveVertex()
texture()
Updated on September 23, 2006 05:40:16pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org