plotHLine: Plot a "homogeneous" line to a plot.

View source: R/plotHLine.R

addLineR Documentation

Plot a "homogeneous" line to a plot.

Description

Add a homogeneous line to a plot. The line parameters must be in homogeneous coordinates, e.g. (a,b,c).

Usage

addLine(l, ...)

plotHLine(l, ...)

Arguments

l

A 3 \times 1 vector of the homogeneous representation of a line.

...

graphical parameters such as col, lty and lwd.

Examples

# two points in homogeneous coordinates
p1 <- c(3,1,1)
p2 <- c(0,2,1)

# homogeneous line joining p1 and p2
l_12 <- join(p1,p2)
l_12

# plot
plot(0,0,type="n", xlim=c(-2,5),ylim=c(-2,5),asp=1)
points(t(p1))
points(t(p2))
addLine(l_12,col="red",lwd=2)

RConics documentation built on March 18, 2022, 5:33 p.m.