JuliaGen

Synopsis

Generates the julia set.


module JuliaGen <build_dir="iac_proj/julia",
    src_file="julia.cxx",
    out_hdr_file="gen.h",
    out_src_file="gen.cxx",
    libdeps="FLD",
    cxx_hdr_files="fld/Xfld.h">{
    JuliaParams &JuliaParams <NEportLevels={2,0}>;
    double mandelx => JuliaParams.mandelx;
    double mandely => JuliaParams.mandely;
    double leftx => JuliaParams.leftx;
    double rightx => JuliaParams.rightx;
    double topy => JuliaParams.topy;
    double bottomy => JuliaParams.bottomy;
    double max_value => JuliaParams.max_value;
    int max_iter => JuliaParams.max_iter;
    int resx => JuliaParams.resx;
    int resy => JuliaParams.resy;
    Mesh_Unif+Node_Data+Xform out <NEportLevels={0,2},NEcolor2=16776960> {
      ndim = 2;
      dims => {<-.resx,<-.resy};
      nspace => ndim;
      nnode_data = 1;
      node_data {
         values+byte;
         null_value+byte;
         min+byte;
         max+byte;
         min_vec+byte;
         max_vec+byte;
      } = {{veclen=1,,,,,,,,}};
      points => {{<-.leftx,<-.bottomy},{<-.rightx,<-.topy}};
    };
    cxxmethod+notify_inst+req update (
      .mandelx+read+notify+req,
      .mandely+read+notify+req,
      .leftx+read+notify+req,
      .rightx+read+notify+req,
      .topy+read+notify+req,
      .bottomy+read+notify+req,
      .max_value+read+notify+req,
      .max_iter+read+notify+req,
      .resx+read+notify+req,
      .resy+read+notify+req,
      .out+write );
  };

Description

JuliaGen generates mesh and node data that represents a view of the julia set. The location of a rectangular portion of the julia set, the coordinates of the mandelbrot set it is based upon and the limits of the algorithm can be specified through either a JuliaParams object or by explicitly setting the parameters within the object. The number of iterations is output as a single byte of node data. The node data is mapped onto a uniform mesh that is generated from the input parameters.

Inputs

&JuliaParams

Reference to the parameter block, which contains real instances of the parameters for the julia function.

mandelx

Horizontal coordinate of the mandelbrot set that the julia set is based upon. The value is of type double. This is the real part of the constant C used within the iteration equation ( i.e. Z(n+1) = Z(n)^2 + C ). Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

mandely

Vertical coordinate of the mandelbrot set that the julia set is based upon. The value is of type double. This is the imaginary part of the constant C used within the iteration equation ( i.e. Z(n+1) = Z(n)^2 + C ). Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

leftx

Position of the left edge of the julia set. The value is of type double. This is the minimum real number that the julia function iterates over. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

rightx

Position of the right edge of the julia set. The value is of type double. This is the maximum real number that the julia function iterates over. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

topy

Position of the top edge of the julia set. The value is of type double. This is the maximum imaginary number that the julia function iterates over. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

bottomy

Position of the bottom edge of the julia set. The value is of type double. This is the minimum imaginary number that the julia function iterates over. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

max_value

The "bailout value" for the mandelbrot set. The value is of type double. The iteration at a point is stopped when the magnitude of the complex number Z(n) exceeds this value ( i.e. |Z(n)| = x^2 + y^2 > max_value ). Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

max_iter

The maximum number of iterations that are performed at a point. The value is of type int. If the magnitude of Z at a point is less then the "bailout value" after this number of iterations then the point is assumed to have reached a steady state and therefore no more iterations need to be performed. The maximum number of iterations possible is 255, and values above this level are ignored. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

resx

The horizontal resolution of the generated data. The value is of type int. This is the number of lines that are plotted in each horizontal row of the mesh. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

resy

The vertical resolution of the generated data. The value is of type int. This is the number of lines that are plotted in each vertical column of the mesh. Normally the value of this parameter is found by referring to the parameter block, which is referenced by the &JuliaParams input.

Outputs

out

The output field containing Mesh_Unif and Node_Data. The uniform mesh is generated from the horizontal and vertical resolutions input to the module. The node data uses a single byte to store the number of iterations at each point, therefore the maximum number of iterations that can be represented is 255.

Utility Macros

The low-level JuliaGen module is used in the User Macro julia. Additionally, this macro also uses the JuliaParams parameter block group object, as does the JuliaUI UI Macro.

Example

An example application JuliaEg is provided, which generates a large scale portion of the Julia Set and displays it using the Uviewer2D standard data viewer.

Files

iac_proj/julia/jul_mods.v contains the JuliaParams group and the JuliaGen module V definitions.

Other Notes

The low-level JuliaMods library containing the module JuliaGen does not specify a process. By default the express process will be used.

Authors

Paul G. Lever
Andrew Dodd

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also