Orbital Master Controllers

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

Orbital Master Controllers Overview

Orbital Master Controllers are programs (called master controllers hereafter) used by the Fractal Science Kit fractal generator to map sample data collected during the fractal iteration, to colors for display. The master controller has access to the list of controllers that have been added to the parent Controllers properties page.

As the sample points are processed by the Fractal Science Kit fractal generator, each sample is passed to the (single) master controller who calls 0 or more controllers to process the sample. If multiple controllers are called, the master controller combines the resulting set of colors as appropriate. Some master controllers use each color's alpha value (opacity) to combine the colors. Others algorithmically blend the set of colors using user specified options. A different strategy is to use information in the sample to determine which controller from the list should be used to process the sample resulting in strikingly different regions within the fractal display.

See also:

Each program is composed of a set of properties and instructions.

Comments

Always remember to click the Toggle Code View toolbar button at the top of the Program Editor and read the comments given in the comment section of the program's instructions. The comment section contains usage instructions, hints, notes, documentation, and other important information that will help you understand how best to use the program. Once you are done reading the comments, click the Toggle Code View toolbar button again to view the program's properties.

Properties

Fractal Science Kit - Orbital Master Controllers Properties

The following properties are supported:

  • Add Trans Array is a checkbox 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.

  • Force Execution is a checkbox that can be checked to force execution of the instructions. If Force Execution is unchecked, the instructions will execute only if required based on what changes were made to the fractal's properties since the last time the instructions ran. This is rarely checked.

Instructions

The remainder of this page can be ignored if you are not a programmer.

At the bottom of the window is an editor pane named Instructions. The editor pane is a simple text editor to view/edit your Program Instructions. See Editing Text for details.

The instructions are divided into sections. Within each section are statements that conform to the Programming Language syntax.

In addition to the Standard Sections, Orbital Master Controllers support 1 other section:

color:

This section is responsible for setting the color for the current sample point. The color is returned in the built-in variable color.

Built-in Variables

Several built-in variables are available to your instructions:

  • Color color
  • pixel

Master controllers can access the above built-in variables. color is used to return the color computed by the program.

pixel is the location in the complex plane of the current sample point and is read-only.

color is a Color object defined as:

Object Color {
  R|Red  |H|Hue
  G|Green|S|Saturation
  B|Blue |L|Lightness |V|Value
  A|Alpha
}

Each of the fields should be a floating point value between 0 and 1, inclusive. See the Color Functions for details.

The Color object supports the RGB, HSL, and HSV color models but the Fractal Science Kit expects color to conform to the RGB color model. If your program generates a color using the HSL or HSV color model, you must convert the color to the RGB color model prior to returning.

The color's Alpha value is used to set the color's opacity. A value of 0 makes the color totally transparent and a value of 1 makes the color totally opaque. Values between 0 and 1 can be used to define colors that are translucent.

Example:

comment:
 
  Return color computed by 1st controller.
 
color:
 
  color = Controller.Color(0)

This is the Pass Thru master controller. It simply calls controller 0 to map the sample to a color (using the Controller Function Controller.Color) and returns the result. You can use the Pass Thru master controller when you simply want to use a single controller to process every sample. Even if the list has more than 1 controller, Pass Thru only uses controller 0 (the 1st controller in the list). Pass Thru is the default master controller.

Constants

The following constants are available to your instructions:

  • ViewportMagnification

ViewportMagnification is the current fractal's magnification. The magnification can be viewed by executing the Resize command on the View menu of the Fractal Window.

Accessing Sample Data

The data associated with the sample being processed is accessed by the master controller using the Sample object. The Sample object is a read-only object that contains all the collected data for the sample point. Many of the fields have been normalized based on normalization settings for the associated field, and the value is between 0 and 1. In some cases both the raw value and the normalized value are available. The fields associated with the Sample object for Orbital Master Controllers are the same as for Orbital Controllers.

 

Copyright © 2004-2019 Ross Hilbert
All rights reserved