is an option for graphics primitives that specifies the texture coordinates to assign to vertices.
VertexTextureCoordinates
is an option for graphics primitives that specifies the texture coordinates to assign to vertices.
Details
- VertexTextureCoordinates can be used with various primitives that defined filled shapes, including Polygon, FilledCurve, and GraphicsComplex.
- VertexTextureCoordinates->{t1,t2,…} specifies that coordinate ti should be assigned to vertex i.
- The texture coordinates ti for each vertex can have the following forms:
-
{u} 1D coordinates {u,v} 2D coordinates {u,v,w} 3D coordinates - The texture coordinates u, v, and w are assumed to range from 0 to 1.
- Coordinates outside the range 0 to 1 are taken be periodic and equivalent to Mod[u,1] etc.
- VertexTextureCoordinates->{{t1,t2,…},{u1,u2,…},…} specifies lists of coordinates that should be mapped to the corresponding shapes of a multi-shape specification.
- VertexTextureCoordinatesAutomatic textures a 2D primitive relative to its axis-aligned bounding box.
- Textures are taken to be arrays of colors.
- Texture coordinates follow the same convention as position numbers.
- For a particular dimension the texture coordinate 0 corresponds to the smallest position and texture coordinate 1 corresponds to the largest position.
- For a 1D texture, coordinates correspond to:
-
{0} position 1, first element {1} position -1, last element - For a 2D texture, coordinates correspond to:
-
{0,0} position {1,1}, first row and column {1,1} position {-1,-1}, last row and column - For a 3D texture, coordinates correspond to:
-
{0,0,0} position {1,1,1}, first row, column, and tube {1,1,1} position {-1,-1,-1}, last row, column, and tube - The texture coordinates in the interior of the polygon effectively correspond to interpolating between the texture coordinates specified by VertexTextureCoordinates.
- The texture color corresponding to a texture coordinate is computed by interpolating between neighboring colors in the texture.
Examples
open all close allBasic Examples (3)
Specify vertex coordinates for a 1D texture:
Graphics[{Texture[Table[{c, 0, 1 - c}, {c, 0, 1, 1 / 100}]], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{0}, {0}, {1}, {1}}]}]Specify vertex coordinates for a 2D texture:
Graphics[{Texture[[image]], EdgeForm[StandardBrown], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}]Specify vertex coordinates for a 3D texture:
data = Table[{r, g, b}, {r, 0, 1, 1 / 20}, {g, 0, 1, 1 / 20}, {b, 0, 1, 1 / 20}];Graphics3D[{Texture[data], EdgeForm[], Table[With[{pts = RotateRight[#, k]& /@ {{1 / 2, 0, 0}, {1 / 2, 1, 0}, {1 / 2, 1, 1}, {1 / 2, 0, 1}}}, Polygon[pts, VertexTextureCoordinates -> pts]], {k, 3}]}, Lighting -> "Neutral"]Scope (5)
The 1D texture coordinates are assumed to range from {0} to {1}:
data = Table[{c, 0, 1 - c}, {c, 0, 1, 1 / 100}];Graphics[{Texture[data], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{0}, {0}, {1}, {1}}]}]Specify a portion of 1D texture by using coordinates between {0} and {1}:
Graphics[{Texture[data], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{1 / 3}, {1 / 3}, {2 / 3}, {2 / 3}}]}]Repeat 1D texture by using coordinate values outside of {0} and {1}:
Graphics[{Texture[data], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{-1}, {-1}, {2}, {2}}]}]The 2D texture coordinates are assumed to range from {0,0} to {1,1}:
image = [image];Graphics[{Texture[image], EdgeForm[StandardBrown], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}]Specify a portion of 2D texture by using coordinates within the range of {0,0} and {1,1}:
Graphics[{Texture[image], EdgeForm[StandardBrown], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{1 / 3, 1 / 3}, {2 / 3, 1 / 3}, {2 / 3, 2 / 3}, {1 / 3, 2 / 3}}]}]Repeat 2D texture by using coordinate values outside of {0,0} and {1,1}:
Graphics[{Texture[image], EdgeForm[StandardBrown], Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, VertexTextureCoordinates -> {{0, 0}, {4, 0}, {4, 4}, {0, 4}}]}]The 3D texture coordinates are assumed to range from {0,0,0} to {1,1,1}:
data = Table[{r, g, b}, {r, 0, 1, 1 / 20}, {g, 0, 1, 1 / 20}, {b, 0, 1, 1 / 20}];Graphics3D[{Texture[data], EdgeForm[], Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 1}, {0, 1, 1}}, VertexTextureCoordinates -> {{0, 0, 0}, {1, 0, 0}, {1, 1, 1}, {0, 1, 1}}] }, Lighting -> "Neutral"]Multi-polygons are mapped to sublists of texture coordinates:
Graphics[{Texture[ExampleData[{"Texture", "Wood"}]], Polygon[{{{0, 0}, {0, 1}, {1, 0}}, {{2, 0}, {2, 1}, {1, 0}}}, VertexTextureCoordinates -> {{{0, 0}, {0, 1}, {1, 0}}, {{0, 0}, {1, 0}, {0, 1}}}]}]Components of filled curves are mapped to sublists of texture coordinates:
a = {{-1, 0}, {0, 1}, {1, 0}}; b = {{0, -2 / 3}, {-1, 0}};Graphics[{Texture[[image]],
FilledCurve[{{BezierCurve[2a], Line[2b]}, {BezierCurve[a], Line[b]}},
VertexTextureCoordinates -> {{{0, 1 / 2}, {1 / 2, 1}, {1, 1 / 2}, {1 / 2, 1 / 12}, {0, 1 / 2}}, {{1 / 4, 1 / 2}, {1 / 2, 3 / 4}, {3 / 4, 1 / 2}, {1 / 2, 7 / 24},
{1 / 4, 1 / 2}}}]}]Properties & Relations (1)
Texture coordinates of plot functions can be specified by TextureCoordinateFunction:
ParametricPlot3D[{1.16 ^ v Cos[v](1 + Cos[u]), -1.16 ^ v Sin[v](1 + Cos[u]), -2 1.16 ^ v(1 + Sin[u])}, {u, 0, 2Pi}, {v, -15, 6}, PlotStyle -> Directive[Specularity[White, 30], Texture[ExampleData[{"ColorTexture", "WhiteMarble"}]]], TextureCoordinateFunction -> ({#4, 2#5}&), Lighting -> "Neutral", Mesh -> None, PlotRange -> All]Text
Wolfram Research (2010), VertexTextureCoordinates, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexTextureCoordinates.html (updated 2018).
CMS
Wolfram Language. 2010. "VertexTextureCoordinates." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/VertexTextureCoordinates.html.
APA
Wolfram Language. (2010). VertexTextureCoordinates. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexTextureCoordinates.html
BibTeX
@misc{reference.wolfram_2026_vertextexturecoordinates, author="Wolfram Research", title="{VertexTextureCoordinates}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/VertexTextureCoordinates.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_vertextexturecoordinates, organization={Wolfram Research}, title={VertexTextureCoordinates}, year={2018}, url={https://reference.wolfram.com/language/ref/VertexTextureCoordinates.html}, note=[Accessed: 13-June-2026]}