draw_ray: Draw a Ray

Description Usage Arguments Value See Also Examples

View source: R/8-Draw.R

Description

Calculate the path of a ray extending and print to screen.

Usage

1
draw_ray(start, end, lim = c(64, 128), n = 200, text = "x", ...)

Arguments

start

start (row, col) coordinate of the ray

end

either an ending coording, an angle in radians, or a character direction (u, d, l, r, ul, ur, dl, dr)

lim

bounding box dimensions used to calculate ray

n

number of points along curve to calculate

text

character value drawn at coordinate

...

parameters that are passed to style(), including the foreground color fg, background color bg, and attribute attr

Value

NULL

See Also

Other drawing functions: box_at(), draw_arc(), draw_bezier(), draw_circle(), draw_ellipse(), draw_fn(), draw_lerp(), draw_path(), draw_rect(), draw_shape(), fill_circle(), fill_ellipse(), fill_rect(), fill_shape(), grid_at(), grid_mat(), hline_at(), hline(), vline_at(), vline()

Examples

1
2
3
draw_ray(start=c(10,10), end=pi/6)
draw_ray(start=c(10,10), end=pi/6, lim=c(15,15))
draw_ray(start=c(10,10), end=c(4,2))

cursr documentation built on Jan. 13, 2021, 7:35 a.m.