Texture Functions

Home • Gallery • Tutorials • Download • Purchase • Site Map
 

Texture Functions Support

The Fractal Science Kit fractal generator Texture functions are supported in the following programs:

Each of these programs has an associated array of Textures defined by the Texture List Control on the color controller's properties page.

The following functions provide access to these textures:

Complex Texture.Count()
Complex Texture.Size(index)
Color Texture.Color(index, z)

Texture.Count returns the number of textures in the array of textures. Texture.Size returns the size of the texture in the x and y components of the complex value. Texture.Color returns the color at the point z in the texture item given by index.

The index argument in each function is an index into the array of textures. The texture items in the array correspond to index values 0 to Texture.Count()-1. If index is outside this range, the value is wrapped around at each extreme into the valid range. For example, an index value of Texture.Count() would become 0 when wrapped, and an index value of -1 would become Texture.Count()-1. index is truncated to an integer before use.

The argument z, in the Texture.Color function, represents a position within the texture. Values in z.x and z.y that range from 0 to 1 cover the entire texture. If z.x or z.y is outside this range, the value is wrapped around at each extreme. The complex value 0+0i maps to the uppder-left corner of the texture image and positive y values move down the image. Bilinear interpolation is used to resolve colors between the texture's pixels.

 

Copyright © 2004-2016 Hilbert, LLC
All rights reserved