is an option to Plot3D and similar functions that specifies a function that computes texture coordinates.
TextureCoordinateFunction
is an option to Plot3D and similar functions that specifies a function that computes texture coordinates.
Details
- With TextureCoordinateFunction->func, the arguments supplied to the function are as follows:
-
ParametricPlot x, y, u, v RegionPlot x, y ContourPlot3D, ListContourPlot3D x, y, z, f Plot3D,ListPlot3D,ListSurfacePlot3D x, y, z ParametricPlot3D x, y, z, u or x, y, z, u, v RegionPlot3D x, y, z RevolutionPlot3D x, y, z, t, θ, r SphericalPlot3D x, y, z, θ, ϕ, r - With the usual default setting TextureCoordinateScaling->True, all arguments supplied to func are scaled to lie in the range 0 to 1.
- With TextureCoordinateScaling->False, original unscaled values are used.
Examples
Basic Examples (4)
Texture coordinates align with parameter values for parametric surfaces and regions:
ParametricPlot[{r t Cos[t], r t Sin[t]}, {t, 0, 2Pi}, {r, 0, 1}, PlotRange -> All, Mesh -> False, Axes -> False, PlotStyle -> {Opacity[1], Texture[ExampleData[{"ColorTexture", "Roof"}]]}]Align the texture coordinates to the
and
coordinates:
ParametricPlot[{r t Cos[t], r t Sin[t]}, {t, 0, 2Pi}, {r, 0, 1}, PlotRange -> All, Mesh -> False, Axes -> False, PlotStyle -> {Opacity[1], Texture[ExampleData[{"ColorTexture", "Roof"}]]}, TextureCoordinateFunction -> ({#1, #2}&)]Texture coordinates align with the
and
coordinates for non-parametric surfaces and regions:
ContourPlot3D[Norm[{x, y, z}, 1] == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Mesh -> None, Lighting -> "Neutral", ContourStyle -> Texture[ExampleData[{"ColorTexture", "Metal2"}]]]Align the texture coordinates along level sets for
and
:
ContourPlot3D[Norm[{x, y, z}, 1] == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Mesh -> None, Lighting -> "Neutral", ContourStyle -> Texture[ExampleData[{"ColorTexture", "Metal2"}]],
TextureCoordinateFunction -> ({#1 - #2, #1 + #2}&)]Related Guides
History
Text
Wolfram Research (2010), TextureCoordinateFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/TextureCoordinateFunction.html.
CMS
Wolfram Language. 2010. "TextureCoordinateFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TextureCoordinateFunction.html.
APA
Wolfram Language. (2010). TextureCoordinateFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TextureCoordinateFunction.html
BibTeX
@misc{reference.wolfram_2026_texturecoordinatefunction, author="Wolfram Research", title="{TextureCoordinateFunction}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/TextureCoordinateFunction.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_texturecoordinatefunction, organization={Wolfram Research}, title={TextureCoordinateFunction}, year={2010}, url={https://reference.wolfram.com/language/ref/TextureCoordinateFunction.html}, note=[Accessed: 13-June-2026]}