koch

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 Magnify

func Magnify(seg maf.LineSeg) [4]maf.LineSeg

Magnify a section of a Koch curve.

func MagnifyAntiSnowflake

func MagnifyAntiSnowflake(seg maf.LineSeg) [4]maf.LineSeg

MagnifyAntiSnowflake curve section.

func SnowflakeVertices

func SnowflakeVertices(spec SnowflakePlotSpec) []maf.Vec

SnowflakeVertices of a Koch snowflake curve.

func Vertices

func Vertices(spec PlotSpec) []maf.Vec

Vertices of a Koch curve.

Types

type PlotSpec

type PlotSpec struct {
	// Order of the Koch curve.
	Order int
	// Seg is the line segment to which the iterative division process is
	// applied.
	Seg maf.LineSeg
}

PlotSpec specifies the properties of a Koch curve.

type SnowflakePlotSpec

type SnowflakePlotSpec struct {
	// AntiSnowflake is true to obtain a Koch anti-snowflake curve.
	AntiSnowflake bool
	// Order of the Koch snowflake curve.
	Order int
	// Equilateral is the equilateral triangle whose edges are the subject of
	// the iterative division process.
	Equilateral maf.Triangle
}

SnowflakePlotSpec specifies the properties of a Koch snowflake curve.

Jump to

Keyboard shortcuts

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