Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

draw_ray

Draw a Ray


Description

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

Usage

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

Examples

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

Cursor and Terminal Manipulation

v0.1.0
MIT + file LICENSE
Authors
Chris Mann
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.