Skip to main content

triangle

Description

Draws a triangle to the screen. A triangle is a plane created by connecting three points. The first two arguments specify the first point, the middle two arguments specify the second point, and the last two arguments specify the third point.

Syntax

triangle(x1, y1, x2, y2, x3, y3)

Parameters

ParameterDescription
x1x-coordinate of the first point
y1y-coordinate of the first point
x2x-coordinate of the second point
y2y-coordinate of the second point
x3x-coordinate of the third point
y3y-coordinate of the third point