powered by
Calculate the path of a ray extending and print to screen.
draw_ray(start, end, lim = c(64, 128), n = 200, text = "x", ...)
start (row, col) coordinate of the ray
(row, col)
either an ending coording, an angle in radians, or a character direction (u, d, l, r, ul, ur, dl, dr)
bounding box dimensions used to calculate ray
number of points along curve to calculate
character value drawn at coordinate
parameters that are passed to style(), including the foreground color fg, background color bg, and attribute attr
style()
fg
bg
attr
NULL
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()
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()
# NOT RUN { 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)) # }
Run the code above in your browser using DataLab