WolframLang: Graphics Primitives
Graphics Primitive
- Graphics Primitive is a expression that represents a graphical element, such as line, circle, polygon, text, sphere, tube.
- You use graphics primitive to create graphics, programatically.
- All Plot functions or visualization functions that show graphics, are internally creating a list of graphics primitives, and return it as output.
some graphics primitives are 2D (e.g. Circle, Disk, Rectangle), some are 3D (e.g. Sphere, Cuboid, Tube), some both (e.g. Point, Line, Polygon).
2D Graphics Primitives
Point[{45,41}]
Line[{{331,754}, {557,550}, {888,272}}]
Polygon[args]
Text[args]
Disk[args]
Circle[args]
Rectangle[args]
and more
3D Graphics Primitives
Point[{44,90,48}]
Line[{{92,402,927}, {183,643,101}, {229,39,925}}]
Polygon[args]
Sphere[args]
Cuboid[args]
Tube[args]
Complete list at SymbolicGraphicsLanguage
Graphics primitives are symbolic. By themselves they do nothing.
Line[{{0, 0}, {2, 1}}]
Graphics primitive usually are bundled together in a list. e.g.
{Line[arg], Line[arg], Polygon[arg], etc}
Displaying Graphics Primitives
To display graphics primitives,
put them inside the functions
Graphics
or
Graphics3D
.
Graphics[Line[{{0, 0}, {2, 1}}]]
Graphics3D[Cuboid[{0, 0, 0}, {1, 2, 1}], Axes -> True]
Graphics3D[Table[Cuboid[{x, x, x}, {x, x, x} + 1], {x, 0, 5}], Axes -> True]
WolframLang, Graphics Programing
- WolframLang: Plot and Visualization
- WolframLang: Graphics Primitives
- WolframLang: Graphics Directives
- WolframLang: Extract Graphics from Plot
- WolframLang: Geometric Transformation Functions
- WolframLang: Compose Transformations
- WolframLang: Apply Transform to Graphics
- WolframLang: Translate Copy Graphics
- WolframLang: Transformation Matrix
- WolframLang: GraphicsComplex
- WolframLang: Mesh Region
- WolframLang: Graphics Misc
- WolframLang: Animation