a
, b
, and c
An object of class "Planes"
.
Returns the equation and p
and parallel to the plane spanned
by three distinct 3D points a
, b
, and c
with x
and y
,
respectively.
paraplane(p, a, b, c, x, y)
A list
with the elements
Description of the plane passing through point p
and parallel to plane spanned by points
a
, b
and c
The input points a
, b
, c
, and p
. Plane is parallel to the plane spanned by a
, b
, and c
and passes through point p
(stacked row-wise, i.e., row 1 is point a
, row 2 is point b
,
row 3 is point c
, and row 4 is point p
).
The input vectors which constitutes the x
and y
can be scalars or vectors of scalars.
The output vector
which constitutes the x
and y
are scalars, z
will be a scalar and
if x
and y
are vectors of scalars, then z
needs to be a matrix
of scalars,
containing the x
and y
values.
Coefficients of the plane (in the
Equation of the plane in long form
Equation of the plane in short form, to be inserted on the plot
A 3D point which the plane parallel to the plane spanned by
three distinct 3D points a
, b
, and c
crosses.
3D points that determine the plane to which the plane crossing point p
is parallel to.
A scalar or a vector
of scalars representing the a
, b
, and c
and passing through point p
.
Elvan Ceyhan
Plane
# \donttest{
A<-c(1,10,3); B<-c(1,1,3); C<-c(3,9,12); P<-c(1,1,0)
Plane(A,B,C,.1,.2)
pts<-rbind(A,B,C,P)
paraplane(P,A,B,C,.1,.2)
paraplane(P,A,B,C,0,0)
xr<-range(pts[,1]); yr<-range(pts[,2])
xf<-(xr[2]-xr[1])*.25 #how far to go at the lower and upper ends in the x-coordinate
yf<-(yr[2]-yr[1])*.25 #how far to go at the lower and upper ends in the y-coordinate
x<-seq(xr[1]-xf,xr[2]+xf,l=20) #try also l=100
y<-seq(yr[1]-yf,yr[2]+yf,l=20) #try also l=100
plP2ABC<-paraplane(P,A,B,C,x,y)
plP2ABC
summary(plP2ABC)
plot(plP2ABC)
paraplane(P,A,B,A+B,.1,.2)
z.grid<-plP2ABC$z
plABC<-Plane(A,B,C,x,y)
plABC
pl.grid<-plABC$z
zr<-max(z.grid)-min(z.grid)
Pts<-rbind(A,B,C,P)+rbind(c(0,0,zr*.1),c(0,0,zr*.1),c(0,0,zr*.1),c(0,0,zr*.1))
Mn.pts<-apply(Pts[1:3,],2,mean)
plot3D::persp3D(z = pl.grid, x = x, y = y, theta =225, phi = 30, ticktype = "detailed")
#plane spanned by points A, B, C
plot3D::persp3D(z = z.grid, x = x, y = y,add=TRUE)
#plane parallel to the original plane and passing thru point \code{P}
plot3D::persp3D(z = z.grid, x = x, y = y, theta =225, phi = 30, ticktype = "detailed")
#plane spanned by points A, B, C
#add the defining points
plot3D::points3D(Pts[,1],Pts[,2],Pts[,3], add=TRUE)
plot3D::text3D(Pts[,1],Pts[,2],Pts[,3], c("A","B","C","P"),add=TRUE)
plot3D::text3D(Mn.pts[1],Mn.pts[2],Mn.pts[3],plP2ABC$equation,add=TRUE)
plot3D::polygon3D(Pts[1:3,1],Pts[1:3,2],Pts[1:3,3], add=TRUE)
P<-c(1,1,1)
paraplane(P,A,B,C,.1,.2)
# }
Run the code above in your browser using DataLab