Texture Functions |
|
|
Texture Functions SupportThe 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() 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 lower-left corner of the texture image. Bilinear interpolation is used to resolve colors between the texture's pixels. Example: color = Texture.Color(0, pixel * Sample.TrapDwellRaw) This example maps the trapped point to a color in the texture using the pixel value, scaled by the trapped point's dwell. The scaling causes the texture to reduce in size for traps with larger dwell values. |
|
Copyright © 2004-2011 Hilbert, LLC |