Skip to content

Commit

Permalink
最左の三角を並べた
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu09 committed Dec 10, 2023
1 parent 39a8d4b commit 2e6864c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion programs/tree.rb
Expand Up @@ -11,12 +11,18 @@ def draw
noStroke

fill("green")

xIndex = 4.5
yIndex = 0

for i in [0...1]
for i in [1..$split]
triangle(
$xSlide * xIndex, $ySlide * yIndex,
$xSlide * (xIndex - 0.5), $ySlide * (yIndex + 1),
$xSlide * (xIndex + 0.5), $ySlide * (yIndex + 1)
)

xIndex -= 0.5
yIndex += 1
end
end

0 comments on commit 2e6864c

Please sign in to comment.