heighway

package
v0.0.0-...-1a87af9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: CC0-1.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FudgeflakeVertices

func FudgeflakeVertices(spec FudgeflakePlotSpec) []maf.Vec

FudgeflakeVertices are the vertices of a Heighway fudgeflake curve.

func GoldenVertices

func GoldenVertices(spec TerdragonPlotSpec) []maf.Vec

GoldenVertices are the vertices of a Heighway golden dragon curve.

func Magnify

func Magnify(seg maf.LineSeg, anti bool) [2]maf.LineSeg

func MagnifyGolden

func MagnifyGolden(seg maf.LineSeg, anti bool) [2]maf.LineSeg

func MagnifyTerdragon

func MagnifyTerdragon(seg maf.LineSeg) [3]maf.LineSeg

func TerdragonVertices

func TerdragonVertices(spec TerdragonPlotSpec) []maf.Vec

TerdragonVertices are the vertices of a Terdragon curve.

func Vertices

func Vertices(spec PlotSpec) []maf.Vec

Vertices of a Heighway Dragon curve.

Types

type FudgeflakePlotSpec

type FudgeflakePlotSpec struct {
	// Iterations of the algorithm.
	Iterations int
	// Equilateral is the equilateral triangle whose edges are the subject of
	// the iterative division process.
	//
	// The triangle shall be parallel to the Z=0 XY-plane.
	Equilateral maf.Triangle
}

FudgeflakePlotSpec specifies the properties of a Heighway fudgeflake curve.

type PlotSpec

type PlotSpec struct {
	// Iterations of the algorithm.
	Iterations int
	// Reflect the points along the given axis.
	ReflectX, ReflectY bool
	// Seg is the line segment to which the iterative division process is
	// applied.
	//
	// Seg shall be parallel to the Z=0 XY-plane.
	Seg maf.LineSeg
}

PlotSpec specifies the properties of a Heighway Dragon curve.

type TerdragonPlotSpec

type TerdragonPlotSpec struct {
	// Iterations of the algorithm.
	Iterations int
	// Seg is the line segment to which the iterative division process is
	// applied.
	//
	// Seg shall be parallel to the Z=0 XY-plane.
	Seg maf.LineSeg
}

TerdragonPlotSpec specifies the properties of a Terdragon curve.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL