# Three lines to get twenty triangles

Shown below are five squares.

Starting at any point, draw three straight lines without lifting the pen, and create exactly twenty (20) triangles. It is understood that this will create some other shapes also.

Bonus question: What is the maximum number of triangles you can get with the 3 continuous lines (as stated above)? Hint: it is more than 26

As long as the triangles are allowed to overlap, I think I can just Zorro through like this:

Counting:

• Triangles with all 3 sides made of grid lines: 0
• Triangles with 2 sides made of grid lines: 12 (4 per each drawn line)
• Triangles with 1 side made of grid lines: 8 (4 for each intersecting red line pair)
• Triangles with 0 sides made of grid lines: 0

As for the bonus, here's the best I've found so far (no idea if it's optimal; more than 26 though)

28 triangles

Again counting:

• Triangles with all 3 sides made of grid lines: 0
• Triangles with 2 sides made of grid lines: 17 (6+5+6)
• Triangles with 1 side made of grid lines: 10 (3+4+3)
• Triangles with 0 sides made of grid lines: 1