In Processing, drawing shapes is key to the program. Otherwise, nothing would appear on the screen. This section will tell you how basic shapes are drawn.

- line(float x1, float y1, float x2, float y2)
- line(float x1, float y1, float z1, float x2, float y2, float z2)
- ellipse(float x, float y, float w, float h)
- rect(float x, float y, float w, float h)
- triangle(float x1, float y1, float x2, float y2, float x3, float y3)

Parameter | Details |
---|---|

x1 | x-coordinate of the first point |

y1 | y-coordinate of the first point |

z1 | z-coordinate of the first point |

x2 | x-coordinate of the second point |

y2 | y-coordinate of the second point |

z2 | z-coordinate of the second point |

x3 | x-coordinate of the third point |

y3 | y-coordinate of the third point |

x | x-coordinate |

y | y-coordinate |

w | width |

h | height |

You can find a reference on Processing's foundation.