Cantor set.
More...
Cantor set.
Definition at line 61 of file CantorSet.cs.
◆ CantorSet()
Fractals.CantorSet.CantorSet |
( |
Vector2 |
start, |
|
|
Vector2 |
end, |
|
|
int |
generations, |
|
|
float |
separation |
|
) |
| |
|
inline |
Create new cantor set.
- Parameters
-
start | Starting point. |
end | Ending point. |
generations | Generation count. |
separation | Separation. |
Definition at line 74 of file CantorSet.cs.
76 _generations = generations;
77 _separation = separation;
79 _lines.Add(
new List<CantorLine>() {
◆ Draw()
void Fractals.CantorSet.Draw |
( |
CanvasItem |
canvas | ) |
|
|
inline |
Draw set using canvas.
- Parameters
-
Definition at line 129 of file CantorSet.cs.
131 foreach (var lineArray
in _lines)
133 foreach (var line
in lineArray)
◆ GenerateAll()
void Fractals.CantorSet.GenerateAll |
( |
| ) |
|
|
inline |
Generate all needed generations.
Definition at line 119 of file CantorSet.cs.
121 for (var i = 0; i < _generations; ++i)
void GenerateOne()
Generate one generation.
◆ GenerateOne()
void Fractals.CantorSet.GenerateOne |
( |
| ) |
|
|
inline |
Generate one generation.
Definition at line 90 of file CantorSet.cs.
92 var next =
new List<CantorLine>();
94 foreach (var line
in _lines[^1])
96 var a = line.PointA() +
new Vector2(0, _separation);
97 var b = line.PointB() +
new Vector2(0, _separation);
98 var c = line.PointC() +
new Vector2(0, _separation);
99 var d = line.PointD() +
new Vector2(0, _separation);
101 next.Add(
new CantorLine()
106 next.Add(
new CantorLine()
The documentation for this class was generated from the following file: