line: Draw a Line

Description Usage Arguments See Also Examples

Description

Draw a Line

Usage

1
line(sketch, x1 = NULL, y1 = NULL, x2 = NULL, y2 = NULL)

Arguments

sketch

A p5 sketch.

x1

The x coordinate for the first point.

y1

The y coordinate for the first point.

x2

The x coordinate for the second point.

y2

The y coordinate for the second point.

See Also

Other Shape 2D Primitives: arc, ellipse, rect

Examples

1
2
3
4
5
6
7
## Not run: 

p5() %>%
  line(30, 20, 85, 75)


## End(Not run)

ropenscilabs/realtime documentation built on May 29, 2019, 8:50 a.m.