SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: plot3d and planes3d some strange results [ Reply ]
By: Duncan Murdoch on 2020-01-28 13:35
[forum:47344]
I have fixed some minor problems on the help pages (some links to other packages were incorrect), but the main build failure seems to be an R-forge issue, not something I can fix. Unfortunately, this means to use the unreleased rgl you'll need to build from source, which requires a number of tools and libraries on the build system. I think it should be possible to use r-hub (https://github.com/r-hub/rhub) to build for a particular system, but I haven't worked out the details.

RE: plot3d and planes3d some strange results [ Reply ]
By: Duncan Murdoch on 2020-01-27 13:45
[forum:47343]
I've been away; I'll look into these errors today.

RE: plot3d and planes3d some strange results [ Reply ]
By: Lars Relund on 2020-01-21 12:56
[forum:47342]
Thanks; however, using install.packages("rgl", repos="http://R-Forge.R-project.org") only seems to install version 0.100.31 (the build seems to fail for v0.100.36 at https://r-forge.r-project.org/R/?group_id=234)

RE: plot3d and planes3d some strange results [ Reply ]
By: Duncan Murdoch on 2020-01-17 19:54
[forum:47323]
The bugs should now be fixed in 0.100.36. There were two issues:

In Ex4, sphere sizing was being based on the data in the call to plot3d(), not the existing data as it should have been in the case of add = TRUE. It also ignored xlim, ylim and zlim when add=FALSE, which shouldn't have happened.

The Ex6 plane disappeared because it exactly intersected the vertices of the bounding box, and the code treated those as being outside. It now includes the vertices as being inside, so it should be okay.

RE: plot3d and planes3d some strange results [ Reply ]
By: Lars Relund on 2020-01-17 17:16
[forum:47322]
Thanks. Indeed the bug in ex4 have troubled me in the implementation of gMOIP.

RE: plot3d and planes3d some strange results [ Reply ]
By: Duncan Murdoch on 2020-01-17 13:54
[forum:47320]
This isn't a bug, it's just that planes only show up where they intersect the bounding box. In Ex1 you haven't plotted anything that affects the bounding box, so it doesn't exist, and the plane can't be shown.

In Ex2 and Ex3 the bounding box exists but has equal upper and lower limits. This could be fixed the way base graphics fixes it (by acting as though the box is bigger than it is forced to be), but rgl lets the user specify the limits in such a weird case rather than guessing. I'll think about whether to implement some form of guessing.

In Ex4 the last sphere ends up with a radius of zero. That looks like a bug.

In Ex6 the plane should show up; that looks like a bug too.

I'll look into fixing Ex4 and Ex6 soon; maybe the bad bbox examples at some point.

plot3d and planes3d some strange results [ Reply ]
By: Lars Relund on 2020-01-17 13:24
[forum:47318]
plot3d and planes3d seems to produce no output in some cases. Is this a bug or should a warning be issued? A few examples:

## Ex1 (don't work)
open3d()
a <- b <- c <- 1
d <- -0.5
planes3d(a, b, c, d)
## Ex2 (output not good)
open3d()
x <- y <- z <- 1
plot3d(x, y, z)
## Ex3 (output not good)
open3d()
x <- y <- z <- 1
plot3d(x, y, z, type="s")
## Ex4 (last line don't work)
open3d()
x <- y <- z <- c(0,4)
plot3d(x, y ,z)
planes3d(a, b, c, d)
x <- y <- z <- 1
plot3d(x, y, z, add = T)
x <- y <- z <- 2
plot3d(x, y, z, type = "s", add = T, radius = 0.25)
x <- y <- z <- 3
plot3d(x, y, z, type = "s", add = T)
## Ex5 (work)
open3d()
x <- y <- z <- c(0,1,4)
plot3d(x, y ,z, size = 10)
d <- -3
planes3d(a, b, c, d)
## Ex6 (don't work)
open3d()
x <- y <- z <- c(0,1,3)
plot3d(x, y ,z, size = 10)
d <- -3
planes3d(a, b, c, d)

Thanks to:
Vienna University of Economics and Business Powered By FusionForge