Dear all,

I have tried to plot a triangular matrix with the function persp3d(rgl).

for example

z=rbind(c(1,NA,NA,NA),c(5,3,NA,NA),c(4,2,9,NA),c(8,6,5,11))
x=1:4
y=1:4
persp3d(x,y,z,color="gray")

The two extreme points are not plotted (value=1 and value=10). It seems
because the half of the matrix have 'NA'  and perp3d need planar
quadrilateral face. So I decided to use the function triangle3d to
integrate these points into the scene.

So, for the first point I did :

triangles3d(x=c(1,2,2),y=c(1,1,2),z=c(1,5,3)) and it worked

But a problem remains because the light movment on this triangle looks
independant and I did not find how to solve this issue.

How can I prefectly integrate this triangle into the scene?

Thank for help

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to