arc: Draw an Arc

Description Usage Arguments See Also Examples

Description

Draw an Arc

Usage

1
2
arc(sketch, a = NULL, b = NULL, c = NULL, d = NULL, start = NULL,
  stop = NULL, mode = NULL)

Arguments

sketch

A p5 sketch.

a

The x coordinate of the arc's ellipse.

b

The y coordinate of the arc's ellipse.

c

The width of the arc's ellipse.

d

The height of the arc's ellipse.

start

The angle to start the arc in radians.

stop

The angle to stop the arc in radians.

mode

Determines the style by which the arc is drawn.

See Also

Other Shape 2D Primitives: ellipse, line, rect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 

p5() %>%
  createCanvas(100, 100) %>%
  background("#DCDCDC") %>%
  arc(50, 55, 50, 50, 0, ~HALF_PI) %>%
  noFill() %>%
  arc(50, 55, 60, 60, ~HALF_PI, ~PI) %>%
  arc(50, 55, 70, 70, ~PI, ~PI+QUARTER_PI) %>%
  arc(50, 55, 80, 80, ~PI+QUARTER_PI, ~TWO_PI)

p5() %>%
  background("#DCDCDC") %>%
  arc(50, 50, 80, 80, 0, ~PI+QUARTER_PI, ~OPEN)

p5() %>%
  background("#DCDCDC") %>%
  arc(50, 50, 80, 80, 0, ~PI+QUARTER_PI, ~CHORD)

p5() %>%
  background("#DCDCDC") %>%
  arc(50, 50, 80, 80, 0, ~PI+QUARTER_PI, ~PIE)


## End(Not run)

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