If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Course: Unlisted resources area > Unit 2

Lesson 1: ProcessingJS documentation

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

Draws a triangle.
Parameters:
NameDescription
x1the x-coordinate of the first vertex
y1the y-coordinate of the first vertex
x2the x-coordinate of the second vertex
y2the y-coordinate of the second vertex
x3the x-coordinate of the third vertex
y3the y-coordinate of the third vertex
If you're having trouble drawing your triangle, check out these additional resources:

Want to join the conversation?

No posts yet.