Skip to content

Commit 3ff962d

Browse files
committed
Varried size branches
1 parent cd4d193 commit 3ff962d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FractalTrees/Tree.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ let size = 1000
88
let drawTree file =
99
let rnd = new Random()
1010
let img = new Bitmap(size, size)
11-
let pen = new Pen(Color.Black, 1.f)
1211
use g = Graphics.FromImage(img)
1312
g.SmoothingMode <- SmoothingMode.HighQuality;
1413
g.FillRectangle(new SolidBrush(Color.White), 0, 0, size, size)
@@ -19,6 +18,7 @@ let drawTree file =
1918
let x = length * Math.Sin(direction)
2019
let y = length * Math.Cos(direction)
2120
let nextX, nextY = startX + x, startY + y
21+
let pen = new Pen(Color.Black, float32 length / 15.f)
2222
g.DrawLine(pen, int startX, int startY, int nextX, int nextY)
2323
(nextX, nextY)
2424

0 commit comments

Comments
 (0)