Transformation Functions

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

Transformation Functions Support

Every program has a property named Add Trans Array that can be checked to add a Transformation Array editor as one of the program's properties pages. Users can add 1 or more Transformations to the editor and your program can access the transformations using the Transformation functions.

The following Fractal Science Kit fractal generator functions provide access to these transformation:

Complex Transformation.Count()
Complex Transformation.Apply(index, z)
Complex Transformation.ApplyAll(z)

Transformation.Count returns the number of transformations in the array of transformations.

Transformation.Apply applies the transformation given by index to the complex value z and returns the resulting transformed value. The index argument is an index into the array of transformations. The transformations in the array correspond to index values 0 to Transformation.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 Transformation.Count() would become 0 when wrapped, and an index value of -1 would become Transformation.Count()-1.

Transformation.ApplyAll applies each of the transformations in the array to the complex value z, and returns the resulting transformed value. The transformations are applied in series; i.e., the input point is transformed by the 1st transformation in the list and the resulting point is passed to the 2nd transformation, and so on. The result of an in series application of the transformations is a single point. In essence, the in series application treats the array of transformations as a single composite transformation.

Example:

z = Transformation.Apply(0, z)

This example uses transformation 0 (the 1st transformation in the array) to transform the point z.

 

Copyright © 2004-2019 Ross Hilbert
All rights reserved