Triangle Metric

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

Triangle Metric Properties Page

The 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 built-in 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

Fractal Science Kit - 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 built-in 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:

  • x^2 + y^2
  • x^2
  • y^2
  • Min( x^2, y^2 )
  • Max( x^2, y^2 )
  • Min( |x|, |y| )
  • Max( |x|, |y| )
  • ( |x| + |y| )^2
  • ( |x| - |y| )^2
  • | |x| + |y| |
  • | |x| - |y| |
  • | |x^3| + |y^3| |
  • | |x^3| - |y^3| |
  • | x^2 - y^2 |
  • | x * y |

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

Fractal Science Kit - Triangle Metric

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 built-in 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.Q-v.P).

The following float triangle metrics are supported:

  • Triangle Perimeter
  • Triangle Area
  • CircumRadius
  • 9 Point Radius
  • InRadius
  • Circle Power
  • Apollonius Circle Radius
  • ExRadius A
  • ExRadius B
  • ExRadius C
  • Tangent AB
  • Tangent BC
  • Tangent CA
  • Mollweide A
  • Mollweide B
  • Mollweide C
  • Newton A
  • Newton B
  • Newton C
  • Angle A
  • Angle B
  • Angle C

The following vector triangle metrics are supported:

  • Side A
  • Side B
  • Side C
  • Median A
  • Median B
  • Median C
  • Perpendicular Bisector A
  • Perpendicular Bisector B
  • Perpendicular Bisector C
  • Angle Bisector A
  • Angle Bisector B
  • Angle Bisector C
  • Symmedian A
  • Symmedian B
  • Symmedian C
  • Altitude A
  • Altitude B
  • Altitude C
  • Pedal A
  • Pedal B
  • Pedal C

The following point triangle metrics are supported:

  • Vertex A
  • Vertex B
  • Vertex C
  • Centroid
  • Median A Foot
  • Median B Foot
  • Median C Foot
  • CircumCenter
  • 9 Point Center
  • InCenter
  • Angle Bisector A Foot
  • Angle Bisector B Foot
  • Angle Bisector C Foot
  • ExCenter A
  • ExCenter B
  • ExCenter C
  • Mittenpunkt
  • Symmedian Point
  • Symmedian A Foot
  • Symmedian B Foot
  • Symmedian C Foot
  • Spieker Center
  • Gergonne Point
  • OrthoCenter
  • Altitude A Foot
  • Altitude B Foot
  • Altitude C Foot
  • Pedal A Foot
  • Pedal B Foot
  • Pedal C Foot
  • Nagel Point
  • 1st Isogonic Center
  • 2nd Isogonic Center
  • 1st Napoleon Point
  • 2nd Napoleon Point

Many of these are available as Triangle Functions.

For a wealth of information about triangles see:

Eric W. Weisstein. "Triangles."

From MathWorld--A 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-1)    - previous orbit point
O(n-2)    - 2nd previous orbit point
O(n-3)    - 3rd previous orbit point
O(3)      - 3rd orbit point
O(2)      - 2nd orbit point
O(1)      - 1st orbit point
Origin    - Complex(0,0)

O(n), O(n-1), O(n-2), and O(n-3), 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 4th 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(n-1), O(n-2)).

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:

  • <None>
  • Centroid
  • CircumCenter
  • InCenter
  • ExCenters
  • Symmedian Point
  • Gergonne Point
  • OrthoCenter
  • Pedal

Each Partition Type has a different set of partition points. For example, Gergonne Point has the following set of points:

  • Vertex A
  • Vertex B
  • Vertex C
  • InCircle Tangent on Side A
  • InCircle Tangent on Side B
  • InCircle Tangent on Side C
  • Gergonne Point
  • InCenter

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>:
  Vertex A
  Vertex B
  Vertex C

Centroid:
  Vertex A
  Vertex B
  Vertex C
  Median A Foot
  Median B Foot
  Median C Foot
  Centroid

CircumCenter:
  Vertex A
  Vertex B
  Vertex C
  Median A Foot
  Median B Foot
  Median C Foot
  CircumCenter
  Centroid

InCenter:
  Vertex A
  Vertex B
  Vertex C
  Angle Bisector A Foot
  Angle Bisector B Foot
  Angle Bisector C Foot
  InCenter

ExCenters:
  Vertex A
  Vertex B
  Vertex C
  ExCenter A
  ExCenter B
  ExCenter C
  InCenter

Symmedian Point:
  Vertex A
  Vertex B
  Vertex C
  Symmedian A Foot
  Symmedian B Foot
  Symmedian C Foot
  Symmedian Point

Gergonne Point:
  Vertex A
  Vertex B
  Vertex C
  InCircle Tangent on Side A
  InCircle Tangent on Side B
  InCircle Tangent on Side C
  Gergonne Point
  InCenter

OrthoCenter:
  Vertex A
  Vertex B
  Vertex C
  Altitude A Foot
  Altitude B Foot
  Altitude C Foot
  OrthoCenter
  Centroid

Pedal:
  Vertex A
  Vertex B
  Vertex C
  Pedal Projection on Side A
  Pedal Projection on Side B
  Pedal Projection on Side C
  Pedal
  Centroid

 

Copyright © 2004-2014 Hilbert, LLC
All rights reserved