SCM

[#1103] rgl.postscript 100% cpu, never finishes

View Trackers | Bugs | Download .csv | Monitor

Date:
2010-09-27 10:11
Priority:
3
State:
Open
Submitted by:
Manuel López-Ibáñez (mlopezibanez)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
Works For Me
 
URL:
Summary:
rgl.postscript 100% cpu, never finishes

Detailed description
The following script causes 100% CPU and does not seem to finish in a reasonable time.

##########################################
data <- read.table("data");
library(rgl)
open3d()
rgl.bg(color="white")
plot3d(att, col="green", type="s", size=0.8)

binplot.3d<-function(x,y,z,alpha=1,topcol="#ff0000",sidecol="#aaaaaa")
{
top <- 10
x1<-c(rep(c(x[1],x[2],x[2],x[1]),3),rep(x[1],4),rep(x[2],4))
z1<-c(rep(top,4),rep(c(top,top,z,z),4))
y1<-c(y[1],y[1],y[2],y[2],rep(y[1],4),rep(y[2],4),rep(c(y[1],y[2],y[2],y[1]),2))
x2<-c(rep(c(x[1],x[1],x[2],x[2]),2),rep(c(x[1],x[2],rep(x[1],3),rep(x[2],3)),2))
z2<-c(rep(c(top,z),4),rep(top,8),rep(z,8) )
y2<-c(rep(y[1],4),rep(y[2],4),rep(c(rep(y[1],3),rep(y[2],3),y[1],y[2]),2) )
quads3d(x1,z1,y1,col=rep(sidecol,each=4))
quads3d(c(x[1],x[2],x[2],x[1]),rep(z,4),c(y[1],y[1],y[2],y[2]),
col=rep(topcol,each=4))
}

for (i in 1:nrow(data)) {
p <- data[i,]
binplot.3d(c(p[1],10), c(p[3],10), p[2],alpha=1)
}
rgl.postscript("persp3da.eps","eps",drawText=TRUE)
#############################################

data is:
----------------------------------start here ---------------------------------------------------------------------
9.579301384819974 5.792432363411047 0.8053321005905349
8.440251145602728 6.678219699307396 0.8172385236404924
6.830412903586499 9.231469826582231 0.9287020455996275
8.918113357333493 3.389803640367417 0.9293221522074475
8.34008115019884 5.70698918769066 1.211603441941925
6.828978930106149 5.770930022029423 0.9644883471342007
5.845185637729053 6.091909643831176 1.211468250016092
5.490272289337653 7.197279188094493 1.23306741620951
1.448063245811048 9.671189869200155 0.3946700516028026
9.943327133705218 1.501865033770879 0.7434825701623877
8.747545403381238 1.715758619635775 1.033957674001333
7.994669587594613 2.811225370890746 1.390773348962136
1.222343944984568 5.689503107508529 3.127385979443179
0.792935737907638 6.466054136449483 3.00490516953983
0.5317308719460216 9.732448290214514 2.151198443607706
4.925997256924397 2.704925186572346 2.465146637711475
6.431355372602436 1.001535692380632 5.697775896323792
6.323241427627681 1.281409892307456 7.246005321502687
4.965258371973237 1.943533051641083 4.284620594148203
3.409765122029875 2.113623102792451 6.487632603533015
2.353096803092187 0.790551723688969 7.297223710722109
2.127002885257127 2.43114173891515 6.997555157157489
1.545072570116043 2.718147247812745 8.006052032731485
1.39139563842709 2.847946027479587 1.301135560858793
0.6223027131455723 3.569453241191677 4.206323126879596
6.784984926701287 0.5638079644445808 8.061786891662466
0.1747055597195173 8.890663430988944 8.922358124720017
0.2081643131929827 4.622754690859642 5.207141132875611
0.2299736698577117 1.117722050488861 8.981893105113855
0.587994749876203 0.7389118125403558 8.675789804506532
1.545062550179442 0.3830312233262294 9.946630068541651
8.579118682450876 0.3516975239156039 1.449373176763619
----------------------------------stop here ---------------------------------------------------------------------

MATLAB handles the same plot fine using "patch".

Followup

Message
Date: 2010-09-27 10:58
Sender: Manuel López-Ibáñez

It fails for me with rrgl_0.91.787, R version 2.10.1. So it must be a problem with R somewhere. Could it be a problem in another tool used by rgl.postscript?

I cannot install a new R version, so I will try to find another 3D package or a work-around.

Good to know that is fixed anyway. Sorry for the noise.


Date: 2010-09-27 10:44
Sender: Duncan Murdoch

It works fine for me in rgl 0.91.1 in R 2.12.0 (alpha).

Attached Files:

Attachments:
persp3da.eps

Changes:

Field Old Value Date By
ResolutionNone2010-09-27 10:44murdoch
File Added68: persp3da.eps2010-09-27 10:44murdoch
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge