Hi there,
I have two meshes and I merged them into one mesh3d plot. It works however I also want to shift one mesh a certain distance along any axis. What I don’t understand is when I shift too much, both surfaces will be folded. Here is the code,
p <- plot_ly(
x = c(surfL$vertices[, 1], surfR$vertices[, 1]),
y = c(surfL$vertices[, 2],
surfR$vertices[, 2]),
z = c(surfL$vertices[, 3] + dist, surfR$vertices[, 3]),
i = c(surfL$faces[, 1], dim(surfL$vertices)[1] +
surfR$faces[, 1]),
j = c(surfL$faces[, 2], dim(surfL$vertices)[1] +
surfR$faces[, 2]),
k = c(surfL$faces[, 3], dim(surfL$vertices)[1] +
surfR$faces[, 3]),
type = "mesh3d",
vertexcolor = col
)
When I set dist small enough, it plots what I want, for instance, dist = 100 plots like this,
Then dist = 200 plots like this,
However, when dis = 300, I got folded meshes
I also tried on x and y axis, it seems as long as the range of one coordinate is larger than 500, it will wrap the surface. Could you please help to figure out why? Thanks a lot.