File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Draws a Triplexity
4+ . DESCRIPTION
5+ Draws a Triplexity Fractal, using an L-System.
6+
7+ Each generation of the triplexity will create an equilateral triangle with a spoke and an incomplete total rotation.
8+
9+ Multiple generations of this seem to alternate between even numbered triangle shapes and odd numbered "lines" of triangles.
10+ . EXAMPLE
11+ turtle Triplexity 42 1
12+ . EXAMPLE
13+ turtle Triplexity 42 2
14+ . EXAMPLE
15+ turtle Triplexity 42 3
16+ . EXAMPLE
17+ turtle Triplexity 42 4
18+ #>
19+ param (
20+ # The size of each segment
21+ [double ]$Size = 42 ,
22+ # The order of magnitude (the number of expansions)
23+ [int ]$Order = 4 ,
24+ # The default angle.
25+ [double ]$Angle = 60
26+ )
27+ return $this.LSystem (' F++F++F' , [Ordered ]@ {
28+ F = ' F++F++FFF'
29+ }, $Order , [Ordered ]@ {
30+ ' \+' = { $this.Rotate ($Angle ) }
31+ ' -' = { $this.Rotate ($Angle * -1 )}
32+ ' F' = { $this.Forward ($Size ) }
33+ })
You can’t perform that action at this time.
0 commit comments