Triangle Metric 

Triangle Metric Properties PageThe Fractal Science Kit fractal generator Triangle Metric page is found under the General page and defines a single point (complex value) based on a triangle metric expression. See also: During the fractal orbit, the Triangle Metric definition is used to generate a special point called the Triangle Metric Point. On several pages throughout the application, this point is available as an alternative to the orbit point. For example, Orbital fractals support a Point to Track property which can be set to Orbit Point, Orbit Transformation Point, or Triangle Metric Point. Other examples include the Point to Trap property for orbit traps, the Value property associated with several of the builtin Alternate Mapping types (e.g., Exponential Smoothing, Log Smoothing, Minimum Value, Average Value) and more. The Triangle Metric page is divided into 4 sections: the Triangle Metric section that defines several properties and a triangle metric expression, and 3 additional sections (p1, p2, p3) that define 3 orbit point triangles, each with an associated triangle metric. Triangle Metric
The Triangle Metric section of the page defines several properties and a triangle metric expression. The expression is given in the form of an assignment statement to the builtin variable metric as shown below: metric = p1 The expression can reference 1 or more of the 3 variables p1, p2, and p3 (defined below). The assignment shown here is the default assignment. It simply uses the triangle metric defined by p1 as is. This is the most efficient setting since p2 and p3 need not be computed. In fact, the most common use of this page is to let all the properties retain their default value except for p1's Triangle Metric property. Example: metric = (p1+p2+p3)/3 This example, computes all 3 triangle metrics defined by p1, p2, and p3, and then returns the average of the 3 points. In addition to the triangle metric point given by metric, it is sometimes useful to calculate a magnitude value for the associated metric and the Magnitude distance metric is used for that purpose. The Magnitude distance metric is set to one of the following values:
The Magnitude distance metric defines how to compute the magnitude from the metric point. For example, x^2 + y^2 sums the squares of the x and y coordinates. x^2 simply uses the x coordinate squared and ignores the y coordinate altogether. The Points Required property sets the minimum number of orbit points required to produce a value. If there are less than the Points Required points in the orbit, the On Fewer Return value is returned. The On Fewer Return property is set to Orbit Point, Infinity, or Zero. Orbit Point returns the current orbit point, while Infinity or Zero return the named value. Points Required must be 3 or greater. Pedal related metrics require 4 points, all others only require 3. However, you frequently need to increase Points Required to avoid visibility problems along the lines x=1 and y=0. These problems are the result of errors (collinear points) in the early dwells for a few points. The problem points are related to the fractal equation so it is not possible to fix this in general and you will need to adjust Points Required if lines that appear to be speckled with pixels of the wrong color appear in the image. I have found that setting Points Required to 4 or 5 points is usually sufficient. The On Error Return property determines what to return when an error occurs. Errors can occur when the 3 triangle vertices are collinear, for example. The On Error Return property is set to Orbit Point, Infinity, or Zero. Orbit Point returns the current orbit point on an error, while Infinity or Zero return the named value. Triangle Metrics p1, p2, and p3
Each of the 3 remaining sections p1, p2, and p3, defines a Triangle Metric for a given triangle. The Triangle Metric property sets the type. Each triangle metric is calculated and placed in the associated builtin variable (p1, p2, and p3). Some of the triangle metrics are floats, some are vectors, and some are points. Since the values we require are points, we convert the floats and vectors into points. To convert a float metric F into a point, we use the point on the vector from the origin to the current orbit point at a distance F from the origin. To convert a vector metric v into a point, we translate the vector v so that v.P is at the origin and use the translated v.Q (i.e., v.Qv.P). The following float triangle metrics are supported:
The following vector triangle metrics are supported:
The following point triangle metrics are supported:
Many of these are available as Triangle Functions. For a wealth of information about triangles see: Eric W. Weisstein. "Triangles." From MathWorldA Wolfram Web Resource. By default, the triangle we use to compute the triangle metric has the 3 vertices given by the Base Triangle which is defined by the 3 associated controls that contain the following items: O(n)  current orbit point O(n), O(n1), O(n2), and O(n3), are relative to the current orbit point. O(1), O(2), and O(3), are relative to the beginning of the orbit buffer. For Mandelbrot fractals, the orbit buffer contains the entire orbit. However, for Orbital fractals, the orbit buffer contains only the last Orbit Buffer Size points, where Orbit Buffer Size is defined on the Orbital / IFS / Strange Attractor page. See Orbit Functions for additional details. A 4^{th} point called Pedal Point is defined for those metrics that require a pedal point. The defaults for the Base Triangle vertices are the last 3 points in the orbit (O(n), O(n1), O(n2)). If you want to mix things up, you can partition the Base Triangle into a set of alternate triangles based on a Partition Type and then use the associated points to define the vertices for the triangle used for the triangle metric calculation. The different partitions are:
Each Partition Type has a different set of partition points. For example, Gergonne Point has the following set of points:
The Gergonne Point is the point of intersection of the lines formed from each vertex, to the point on the opposite side, tangent to the incircle. Each of the properties Vertex A, Vertex B, and Vertex C, can be set to one of the partition points to define the vertices for the triangle used for the triangle metric calculation. For example, if Partition Type is Gergonne Point, you could set Vertex A, Vertex B, and Vertex C, to Gergonne Point, InCircle Tangent on Side B, and InCircle Tangent on Side C, respectively, and the triangle formed from these 3 points would be used for the triangle metric calculation. The following table lists the partition points for each Partition Type. <None>: 
Copyright © 20042014 Hilbert, LLC 