Modified internal rate of return

From formulasearchengine
Revision as of 12:39, 13 December 2013 by 39.36.249.104 (talk) (→‎Example)
Jump to navigation Jump to search

The Gosper curve, also known as Peano-Gosper Curve,[1] named after Bill Gosper, also known as the flowsnake (a spoonerism of snowflake), is a space-filling curve. It is a fractal object similar in its construction to the dragon curve and the Hilbert curve.

A fourth-stage Gosper curve The line from the red to the green point shows a single step of the Gosper curve construction.

Algorithm

Lindenmayer System

The Gosper curve can be represented using an L-System with rules as follows:

In this case both A and B mean to move forward, + means to turn left 60 degrees and - means to turn right 60 degrees - using a "turtle"-style program such as Logo.

A Logo program to draw the Gosper curve using turtle graphics (online version):

to rg :st :ln
make "st :st - 1
make "ln :ln / 2.6457
if :st > 0 [rg :st :ln rt 60 gl :st :ln  rt 120 gl :st :ln lt 60 rg :st :ln lt 120 rg :st :ln rg :st :ln lt 60 gl :st :ln rt 60]
if :st = 0 [fd :ln rt 60 fd :ln rt 120 fd :ln lt 60 fd :ln lt 120 fd :ln fd :ln lt 60 fd :ln rt 60]
end

to gl :st :ln
make "st :st - 1
make "ln :ln / 2.6457
if :st > 0 [lt 60 rg :st :ln rt 60 gl :st :ln gl :st :ln rt 120 gl :st :ln rt 60 rg :st :ln lt 120 rg :st :ln lt 60 gl :st :ln]
if :st = 0 [lt 60 fd :ln rt 60 fd :ln fd :ln rt 120 fd :ln rt 60 fd :ln lt 120 fd :ln lt 60 fd :ln]
end

The program can be invoked, for example, with rg 4 300, or alternatively gl 4 300.

The constant 2.6457 in the program code is an approximation of √7.

Properties

The space filled by the curve is called the Gosper island. The first few iterations of it are shown below:

The Gosper Island can tile the plane. In fact, seven copies of the Gosper island can be joined together to form a shape that is similar, but scaled up by a factor of √7 in all dimensions. As can be seen from the diagram below, performing this operation with an intermediate iteration of the island leads to a scaled-up version of the next iteration. Repeating this process indefinitely produces a tessellation of the plane. The curve itself can likewise be extended to an infinite curve filling the whole plane.

See also

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

External links