\begin{Schunk}
\begin{Sinput}
 s3d <- scatterplot3d(dat, type="p", color="blue", angle=55,pch=16, main="scatterplot3d")
 s3d$plane3d(m1, lty= "dotted", lwd=0.7)
 obser2d <- s3d$xyz.convert(dat$x1, dat$x2, dat$y)
 pred2d <- s3d$xyz.convert(dat$x1, dat$x2, fitted(m1))
 segments(obser2d$x, obser2d$y, pred2d$x, pred2d$y, lty=4)
\end{Sinput}
\end{Schunk}
