Mathematica >

VertexTextureCoordinates

VertexTextureCoordinates
is an option for graphics primitives that specifies the texture coordinates to assign to vertices.
  • The texture coordinates for each vertex can have the following forms:
{u}1D coordinates
{u,v}2D coordinates
{u,v,w}3D coordinates
  • The texture coordinates u, , and w are assumed to range from to .
  • Coordinates outside the range to are taken be periodic and equivalent to Mod etc.
  • Textures are taken to be arrays of colors.
  • Texture coordinates follow the same convention as position numbers.
  • For a particular dimension the texture coordinate corresponds to the smallest position and texture coordinate corresponds to the largest position.
  • For a 1D texture, coordinates correspond to:
{0}position , first element
{1}position , last element
  • For a 2D texture, coordinates correspond to:
{0,0}position , first row and column
{1,1}position , last row and column
  • For a 3D texture, coordinates correspond to:
{0,0,0}position , first row, column, and tube
{1,1,1}position , 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.
Specify vertex coordinates for a 1D texture:
Specify vertex coordinates for a 2D texture:
Specify vertex coordinates for a 3D texture:
Specify vertex coordinates for a 1D texture:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex coordinates for a 2D texture:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex coordinates for a 3D texture:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
The 1D texture coordinates are assumed to range from to :
Specify a portion of 1D texture by using coordinates between and :
Repeat 1D texture by using coordinate values outside of and :
The 2D texture coordinates are assumed to range from to :
Specify a portion of 2D texture by using coordinates within the range of and :
Repeat 2D texture by using coordinate values outside of and :
The 3D texture coordinates are assumed to range from to :
Texture coordinates of plot functions can be specified by TextureCoordinateFunction:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF