diff -Nru misc3d-0.8-4/debian/changelog misc3d-0.9-0/debian/changelog --- misc3d-0.8-4/debian/changelog 2020-05-16 02:13:10.000000000 +0000 +++ misc3d-0.9-0/debian/changelog 2020-09-06 14:16:28.000000000 +0000 @@ -1,3 +1,14 @@ +misc3d (0.9-0-1) unstable; urgency=medium + + * New upstream release + + * debian/control: Set (Build-)Depends: to current R version + * debian/control: Set Standards-Version: to current version + * debian/control: Switch to virtual debhelper-compat (= 10) + * debian/compat: Removed + + -- Dirk Eddelbuettel Sun, 06 Sep 2020 09:16:28 -0500 + misc3d (0.8-4-5) unstable; urgency=medium * Rebuilt for r-4.0 transition diff -Nru misc3d-0.8-4/debian/compat misc3d-0.9-0/debian/compat --- misc3d-0.8-4/debian/compat 2018-06-02 14:55:36.000000000 +0000 +++ misc3d-0.9-0/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -9 diff -Nru misc3d-0.8-4/debian/control misc3d-0.9-0/debian/control --- misc3d-0.8-4/debian/control 2020-05-16 02:13:10.000000000 +0000 +++ misc3d-0.9-0/debian/control 2020-09-06 14:16:28.000000000 +0000 @@ -2,7 +2,7 @@ Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel -Build-Depends: debhelper (>= 10), r-base-dev (>= 4.0.0), dh-r +Build-Depends: debhelper-compat (= 10), r-base-dev (>= 4.0.2), dh-r Standards-Version: 4.5.0 Vcs-Browser: https://salsa.debian.org/edd/r-cran-misc3d Vcs-Git: https://salsa.debian.org/edd/r-cran-misc3d.git diff -Nru misc3d-0.8-4/demo/lighting.R misc3d-0.9-0/demo/lighting.R --- misc3d-0.8-4/demo/lighting.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/demo/lighting.R 2020-09-05 21:41:04.000000000 +0000 @@ -1,7 +1,7 @@ library(misc3d) local({ - haveRGL <- suppressWarnings(require(rgl,quietly=TRUE)) + haveRGL <- suppressWarnings(requireNamespace(rgl,quietly=TRUE)) ## Example 1: Bivariate quadratic zz<-surfaceTriangles(seq(-1,1,len=30), seq(-1,1,len=30), diff -Nru misc3d-0.8-4/demo/teapot.R misc3d-0.9-0/demo/teapot.R --- misc3d-0.8-4/demo/teapot.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/demo/teapot.R 2020-09-05 21:41:04.000000000 +0000 @@ -3,7 +3,7 @@ local({ data(teapot) - haveRGL <- suppressWarnings(require(rgl,quietly=TRUE)) + haveRGL <- suppressWarnings(requireNamespace(rgl,quietly=TRUE)) ttri <- makeTriangles(teapot$vertices, teapot$edges, color = "red", color2 = "green") diff -Nru misc3d-0.8-4/DESCRIPTION misc3d-0.9-0/DESCRIPTION --- misc3d-0.8-4/DESCRIPTION 2013-01-25 14:57:56.000000000 +0000 +++ misc3d-0.9-0/DESCRIPTION 2020-09-06 04:50:06.000000000 +0000 @@ -1,12 +1,14 @@ Package: misc3d Title: Miscellaneous 3D Plots -Version: 0.8-4 +Version: 0.9-0 Author: Dai Feng and Luke Tierney Maintainer: Luke Tierney Suggests: rgl, tkrplot, MASS +Imports: grDevices, graphics, stats, tcltk Description: A collection of miscellaneous 3d plots, including - isosurfaces. + isosurfaces. License: GPL -Packaged: 2013-01-25 14:23:34 UTC; luke +NeedsCompilation: no +Packaged: 2020-09-05 22:23:07 UTC; luke Repository: CRAN -Date/Publication: 2013-01-25 15:57:56 +Date/Publication: 2020-09-06 04:50:06 UTC diff -Nru misc3d-0.8-4/inst/CITATION misc3d-0.9-0/inst/CITATION --- misc3d-0.8-4/inst/CITATION 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/inst/CITATION 2020-09-05 22:23:01.000000000 +0000 @@ -8,12 +8,12 @@ year = "2008", volume = "28", number = "1", - url = "http://www.jstatsoft.org/v28/i01/", + url = "https://www.jstatsoft.org/v28/i01/", textVersion = paste("Dai Feng, Luke Tierney (2008).", "Computing and Displaying Isosurfaces in R.", "Journal of Statistical Software 28(1).", - "URL http://www.jstatsoft.org/v28/i01/.") + "URL https://www.jstatsoft.org/v28/i01/.") ) diff -Nru misc3d-0.8-4/man/contour3d.Rd misc3d-0.9-0/man/contour3d.Rd --- misc3d-0.8-4/man/contour3d.Rd 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/man/contour3d.Rd 2020-09-05 21:41:04.000000000 +0000 @@ -139,7 +139,7 @@ al <- seq(alo, ahi, len = length(th)) x <- seq(-2, 2, len=n) contour3d(f,th,x,x,x,color=col,alpha=al) - bg3d(col="white") + rgl::bg3d(col="white") } g(40,5) gs <- function(n = 40, k = 5, cmap = heat.colors, ...) { @@ -149,7 +149,7 @@ m <- function(x,y,z) x > .25 | y < -.3 contour3d(f,th,x,x,x,color=col, mask = m, engine = "standard", scale = FALSE, ...) - bg3d(col="white") + rgl::bg3d(col="white") } gs(40, 5, screen=list(z = 130, x = -80), color2 = "lightgray", cmap=rainbow) diff -Nru misc3d-0.8-4/man/exportScene.Rd misc3d-0.9-0/man/exportScene.Rd --- misc3d-0.8-4/man/exportScene.Rd 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/man/exportScene.Rd 2020-09-05 21:41:04.000000000 +0000 @@ -23,7 +23,7 @@ \code{exportScene} writes out scenes to textual files, which can be used for other purposes, for example the generation of U3d and PRC files for interactive 3D visualization in - a PDF. + a PDF. } \examples{ nmix3 <- function(x, y, z, m, s) { @@ -45,7 +45,8 @@ conts <- gs1(40, 5, screen=list(z = 130, x = -80), color2 = "lightgray", cmap=rainbow) - exportScene(conts, "nmix", "OFF") + filename <- file.path(tempdir(), "nmix") + exportScene(conts, filename, "OFF") } \keyword{hplot} diff -Nru misc3d-0.8-4/man/teapot.Rd misc3d-0.9-0/man/teapot.Rd --- misc3d-0.8-4/man/teapot.Rd 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/man/teapot.Rd 2020-09-05 21:41:04.000000000 +0000 @@ -6,14 +6,16 @@ The Utah teapot is a classic computer graphics example. This data set contains a representation in terms of triangles. } -\usage{volcano} +\usage{ +data(teapot) +} \format{ A list with components \code{vertices} and \code{edges}. \code{vertices} is a 3 by 1976 numeric matrix of the coordinates of the vertices. \code{edges} is a 3 by 3751 integer matrix of the indices of the triangles.} \source{ - Converted from the netCDF file made available by Dave Forrest at - \url{http://www.maplepark.com/~drf5n/extras/teapot.nc}. + Converted from the netCDF file that was at one time made available by Dave Forrest at + \verb{http://www.maplepark.com/~drf5n/extras/teapot.nc}. } \keyword{datasets} diff -Nru misc3d-0.8-4/MD5 misc3d-0.9-0/MD5 --- misc3d-0.8-4/MD5 2013-01-25 14:57:56.000000000 +0000 +++ misc3d-0.9-0/MD5 2020-09-06 04:50:06.000000000 +0000 @@ -1,25 +1,25 @@ -3c1c53ad9d3bf729fd775951bf73ddb9 *DESCRIPTION -0a55142749e9a3bbd1ec9f6f2295dc21 *NAMESPACE -073be2cddf71d95c5964ba6a396ae3d1 *R/contour3d.R -3ed6767686362c789bb697958751576a *R/export.R -5f0852a47b29cf8517f47cb50c618b67 *R/image3d.R +fd578548ca8f55bfc3bda93510528108 *DESCRIPTION +b30c7a8977ecf2ab8770d71a58302b40 *NAMESPACE +264525a42b87a1c6db272446a84e839d *R/contour3d.R +3d17f30bf2d9c85d1951dbabb750f9d3 *R/export.R +b77353b4b60aea23aa11d6d88a7e46e5 *R/image3d.R 5f751598d3f305c4c37c70069e213de9 *R/kde3d.R 2dd124db892f3187e051fe86dab3e97c *R/lighting.R -b2e532d31ee92bf06c1c4773ecb3e044 *R/loadRGL.R +8c5beabd06582bfa54c38913127c3adf *R/loadRGL.R e6765c4f2cf664694a7b0f93a0d24cea *R/parametric3d.R -25d91393cb0ed8fd3bc832cba12be53e *R/render.R -6553b403317159b8ebc0b7037dd574c6 *R/slices3d.R -e0707e209b974f6bd8fee9a9801416e1 *R/triangles.R +f587ac58d0d5244d32b456e47b4f07ad *R/render.R +8f7f691f96b400dcb03ff1bb3ebf7d64 *R/slices3d.R +6c0efcfc2a140fd4b37c9b70f1c8c916 *R/triangles.R f9d4d32e8723451f399d0ebd007b55d1 *README ff1931aa94ed3dbcf867671d32ea06b6 *data/teapot.rda fcfe87523fa087e3102a01dcefe51e10 *demo/00Index -bb8ce39ffc3c13f4e8e4b2c4515e2072 *demo/lighting.R -346861c529d2908f9f5936eb7dcbb22e *demo/teapot.R -6922f75ac93334278ca2076371edf406 *inst/CITATION +a982ffe9f0a510480f437cd51e730d93 *demo/lighting.R +e4287a50c4e2fef25853dab7d3093fc2 *demo/teapot.R +467f972b28bb0a587aede069014a6807 *inst/CITATION 0c144caaee4fe1ad9568b5cc9d9e4080 *man/computeContour3d.Rd -54366f550d51bf5e56128d25aa76c885 *man/contour3d.Rd +0b0ff37bddfe40a5a88770974f685227 *man/contour3d.Rd 88d5b17cc124e9ae889947abf2fa013d *man/drawScene.Rd -1158d7150f8210c86195057ab3cc613b *man/exportScene.Rd +aae8db2c76b16bde624e83426a4e923b *man/exportScene.Rd e8a0e9f1357edac205726ad2fb78db31 *man/image3d.Rd 96aa1e191ad2a23ed9d8df81405096e3 *man/kde3d.Rd 458e9e5ca1fb63a75d80ce4f09d91ea9 *man/lighting.Rd @@ -28,5 +28,5 @@ 94e1eb4d61ce0a7a515af2a455c8f0b0 *man/pointsTetrahedra.Rd ba521a7e8ecd7c24e243059cefcf26d4 *man/slices3d.Rd 7df1762a92f8900affaa66fcd193fbed *man/surfaceTriangles.Rd -21e31cda6dea54affef59c03c38b6f81 *man/teapot.Rd +b0c6c946fcb0b254d02217f529efe028 *man/teapot.Rd 6d4f7f29e1230d8f8ef7c746b46e84b9 *man/triangles.Rd diff -Nru misc3d-0.8-4/NAMESPACE misc3d-0.9-0/NAMESPACE --- misc3d-0.8-4/NAMESPACE 2013-01-25 14:20:48.000000000 +0000 +++ misc3d-0.9-0/NAMESPACE 2020-09-05 21:41:04.000000000 +0000 @@ -1,5 +1,3 @@ -# Should import rgl once it has a name space - export(contour3d,computeContour3d) export(image3d) export(parametric3d) @@ -13,3 +11,11 @@ export(kde3d) export(pointsTetrahedra) export(linesTetrahedra) + +importFrom("grDevices", "col2rgb", "gray.colors", "heat.colors", "rgb") +importFrom("graphics", "image", "lines", "par", "polygon") +importFrom("stats", "dnorm", "quantile", "runif") +importFrom("tcltk", "tclvalue", "tclVar", "tclvalue<-", + "tkconfigure", "tkbind", "tkframe", + "tkgrid", "tklabel", "tkscale", "tktitle<-", + "tktoplevel", "tkwinfo") \ No newline at end of file diff -Nru misc3d-0.8-4/R/contour3d.R misc3d-0.9-0/R/contour3d.R --- misc3d-0.8-4/R/contour3d.R 2013-01-25 14:20:48.000000000 +0000 +++ misc3d-0.9-0/R/contour3d.R 2020-09-04 22:19:58.000000000 +0000 @@ -705,9 +705,13 @@ } else { scene <- colorScene(scene) - if (engine == "rgl") - drawScene.rgl(scene, add = add, ...) - else if (engine %in% c("standard", "grid")) + if (engine == "rgl") { + result <- drawScene.rgl(scene, add = add, ...) + if (add) + rgl::lowlevel(result) + else + rgl::highlevel(result) + } else if (engine %in% c("standard", "grid")) drawScene(scene, add = add, engine = engine, ...) else stop(paste("unknown rendering engine:", engine)) } diff -Nru misc3d-0.8-4/R/export.R misc3d-0.9-0/R/export.R --- misc3d-0.8-4/R/export.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/R/export.R 2020-09-05 21:41:04.000000000 +0000 @@ -3,11 +3,11 @@ ## The format supports adding three or four rgb values to each face ## line, but MeshLab seems to ignore these. saveTrianglesAsOFF <- function(scene, filename = "scene.OFF") { - scene <- misc3d:::colorScene(scene) - triangles <- misc3d:::canonicalizeAndMergeScene(scene, "color", "color2", + scene <- colorScene(scene) + triangles <- canonicalizeAndMergeScene(scene, "color", "color2", "alpha", "col.mesh", "fill", "smooth") - ve <- misc3d:::t2ve(triangles) + ve <- t2ve(triangles) f <- file(filename, open = "w") on.exit(close(f)) write("OFF", f) @@ -22,12 +22,12 @@ ## and material properties are not currently supported. The loops ## could be vectorized but seem adequate for now. saveTrianglesAsASY <- function(scene, filename = "scene.asy") { - scene <- misc3d:::colorScene(scene) - triangles <- misc3d:::canonicalizeAndMergeScene(scene, "color", + scene <- colorScene(scene) + triangles <- canonicalizeAndMergeScene(scene, "color", "color2", "alpha", "col.mesh", "fill", "smooth") - ve <- misc3d:::t2ve(triangles) + ve <- t2ve(triangles) f <- file(filename, open = "w") on.exit(close(f)) diff -Nru misc3d-0.8-4/R/image3d.R misc3d-0.9-0/R/image3d.R --- misc3d-0.8-4/R/image3d.R 2013-01-23 12:56:08.000000000 +0000 +++ misc3d-0.9-0/R/image3d.R 2020-09-05 21:41:04.000000000 +0000 @@ -49,7 +49,7 @@ vi <- .bincode(v, breaks, TRUE, TRUE) - 1 } if (!add) - clear3d() + rgl::next3d() i <- which(is.finite(vi)) xi <- x[as.integer((i - 1) %% nx + 1)] yi <- y[as.integer(((i - 1) %/% nx) %% ny + 1)] @@ -63,9 +63,9 @@ } if (sprites) { texture <- system.file("textures/particle.png", package="rgl") - sprites3d(xi, yi, zi, color = col[vi], alpha = alpha[vi], + rgl::sprites3d(xi, yi, zi, color = col[vi], alpha = alpha[vi], lit=FALSE, radius = radius, textype="alpha", texture = texture, ...) } - else points3d(xi, yi, zi, color = col[vi], alpha = alpha[vi], ...) + else rgl::points3d(xi, yi, zi, color = col[vi], alpha = alpha[vi], ...) } diff -Nru misc3d-0.8-4/R/loadRGL.R misc3d-0.9-0/R/loadRGL.R --- misc3d-0.8-4/R/loadRGL.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/R/loadRGL.R 2020-09-05 21:41:04.000000000 +0000 @@ -1,5 +1,5 @@ loadRGL <- function() { - if (! suppressWarnings(require(rgl,quietly=TRUE))) + if (! suppressWarnings(requireNamespace("rgl",quietly=TRUE))) stop("rgl is mot available") } diff -Nru misc3d-0.8-4/R/render.R misc3d-0.9-0/R/render.R --- misc3d-0.8-4/R/render.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/R/render.R 2020-09-05 21:41:04.000000000 +0000 @@ -1,9 +1,9 @@ drawScene.rgl <- function(scene, add = FALSE, ...) { loadRGL() - if (! rgl.cur()) - open3d() + if (! rgl::rgl.cur()) + rgl::open3d() if (!add) - clear3d() + rgl::next3d() scene <- colorScene(scene) triangles <- canonicalizeAndMergeScene(scene, "color", "color2", "alpha", @@ -48,16 +48,16 @@ if (nrow(data) > 0) # to avoid a segfault in rgl { if (! use.col2) - triangles3d(data[,1], data[,2], data[,3], + rgl::triangles3d(data[,1], data[,2], data[,3], col = col, alpha = alpha, normals = normals, front = front, back = back, ...) else { - triangles3d(data[,1], data[,2], data[,3], + c(rgl::triangles3d(data[,1], data[,2], data[,3], col = col, alpha = alpha, normals = normals, - front = front, back = "cull", ...) - triangles3d(data[,1], data[,2], data[,3], + front = front, back = "cull", ...), + rgl::triangles3d(data[,1], data[,2], data[,3], col = col2, alpha = alpha, normals = normals, - front = "cull", back = back, ...) + front = "cull", back = back, ...)) } } diff -Nru misc3d-0.8-4/R/slices3d.R misc3d-0.9-0/R/slices3d.R --- misc3d-0.8-4/R/slices3d.R 2012-02-02 19:43:06.000000000 +0000 +++ misc3d-0.9-0/R/slices3d.R 2020-09-05 21:41:04.000000000 +0000 @@ -41,7 +41,7 @@ lines(rep(bb[j]/d[j],100), seq(0,1,len=100)) lines(seq(0,1,len=100), rep(bb[k]/d[k],100)) } - tkrplot(tt, f, hscale = 0.8, vscale = 0.8) + tkrplot::tkrplot(tt, f, hscale = 0.8, vscale = 0.8) } mkscale <- function(i) { f <- function(...) { @@ -49,8 +49,8 @@ if (b != bb[i]) { bb[i] <<- b if (cross || i == 4) - for (j in 1:3) tkrreplot(img[[j]]) - else tkrreplot(img[[i]]) + for (j in 1:3) tkrplot::tkrreplot(img[[j]]) + else tkrplot::tkrreplot(img[[i]]) tkconfigure(l2, text=bb[i]) } } @@ -86,7 +86,7 @@ for (j in 1:3){ - tkrreplot(img[[j]]) + tkrplot::tkrreplot(img[[j]]) tclvalue(bbv[[j]]) <<- as.character(round(bb[j])) } }) @@ -109,7 +109,7 @@ array(rgb(col, maxColorValue=255), dim=dim(vol1)) } - if (! require(tkrplot)) stop("tkrplot is required."); + if (! requireNamespace("tkrplot")) stop("tkrplot is required."); if(missing(rlim1)) rlim1 <- range(vol1,na.rm = TRUE) diff -Nru misc3d-0.8-4/R/triangles.R misc3d-0.9-0/R/triangles.R --- misc3d-0.8-4/R/triangles.R 2013-01-24 13:35:26.000000000 +0000 +++ misc3d-0.9-0/R/triangles.R 2020-09-05 21:41:04.000000000 +0000 @@ -345,7 +345,7 @@ N <- triangleNormals(v) ve <- t2ve(v) vt <- vertexTriangles(ve) - VN <- misc3d:::vertexNormals(vt, N) + VN <- vertexNormals(vt, N) list(v1 = VN[ve$ib[1,],], v2 = VN[ve$ib[2,],], v3 = VN[ve$ib[3,],]) } @@ -614,8 +614,8 @@ ## Compute for each triangle the indices of triangles that share an ## edge with it. This could be done more efficiently. triangleNeighbors <- function(tris) { - ve <- misc3d:::t2ve(tris) - vt <- misc3d:::vertexTriangles(ve) + ve <- t2ve(tris) + vt <- vertexTriangles(ve) ib <- ve$ib n.tri <- ncol(ib) tn <- vector("list", n.tri) @@ -634,8 +634,8 @@ ## 'unique' in unique(vt[[ib[1, i]]]) seems to be unnecessary ## unless a triangle has essentially two vertices or one vertex triangleNeighbors <- function(tris) { - ve <- misc3d:::t2ve(tris) - vt <- misc3d:::vertexTriangles(ve) + ve <- t2ve(tris) + vt <- vertexTriangles(ve) ib <- ve$ib n.tri <- ncol(ib) tn <- vector("list", n.tri)