Texture¶

In Steno3D, textures are data that exist in space and are mapped to their corresponding resources. Unlike data, they do not need to correspond to mesh nodes or cell centers. This image shows how textures are mapped to a surface. Their position is defined by an origin, O, and axis vectors, U and V, then they are mapped laterally to the resource position.

Like data, multiple textures can be applied to a resource. Simply provide a list of textures.

>> ...
>> my_surface = steno3d.Surface(...)
>> ...
>> my_tex_1 = steno3d.Texture2DImage(
O=[0.0, 0.0, 0.0],
U=[1.0, 0.0, 0.0],
V=[0.0, 1.0, 0.0],
image='image1.png'
)
>> my_tex_2 = steno3d.Texture2DImage(
O=[0.0, 0.0, 0.0],
U=[1.0, 0.0, 0.0],
V=[0.0, 0.0, 1.0],
image='image2.png'
)
>> my_surface.textures = [
my_tex_1,
my_tex_2
]

class steno3d.texture.Texture2DImage(**metadata)[source]

Contains an image that can be mapped to a 2D surface

Required Properties:

• O (Vector3): Origin of the texture, a 3D Vector of <type ‘float’> with shape (3)
• U (Vector3): U axis of the texture, a 3D Vector of <type ‘float’> with shape (3)
• V (Vector3): V axis of the texture, a 3D Vector of <type ‘float’> with shape (3)
• image (ImagePNG): Image file, a PNG image file, valid modes include (u’ab+’, u’rb+’, u’wb+’, u’rb’)

Optional Properties: