Bug 202 - persp box occlusion bug
persp box occlusion bug
Status: CLOSED WONTFIX
Product: R
Classification: Unclassified
Component: Graphics
old
All Linux
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 1999-06-02 18:02 UTC by Jitterbug compatibility account
Modified: 2011-04-11 07:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 1999-06-02 18:02:03 UTC
From: wsi@gcal.ac.uk
Full_Name: Bill Simpson
Version: 64.1
OS: linux
Submission from: (NULL) (193.62.250.209)


Bug in persp() bounding box:
If the surface being plotted extends below the lower z-axis boundary, the box
is
drawn with the wrong occlusion. The box is shown as being occluded by the
surface
even though it should be in front of the surface.

The box is correct for surface extending above the box. Problem is only for
surface extending below the box.

This exhibits the bug:

std<-rep(seq(-32,32,8),9)/1000 * 60
cf<-rep(seq(-32,32,8),rep(9,9))/1000 *60 
dp<-(cf-std)/.6
std<-unique(std)
cf<-unique(cf)
dp<-t(matrix(dp,length(cf),length(std)))
persp(std,cf,dp, xlim=c(-2,2), ylim=c(-2,2), zlim=c(0,5),theta=-40,    
phi=45,
box=TRUE,ltheta=-120, lphi=120,
d=1.5, shade=.7)

Comment 1 Jitterbug compatibility account 2000-02-28 23:19:00 UTC
NOTES:
 The persp algorithm does not apply the occlusion rules to the frame, 
which is always plotted first. 
A bug, but not very simple to fix.
Comment 2 Jitterbug compatibility account 2000-02-28 23:20:17 UTC
Audit (from Jitterbug):
Wed Jun 30 19:31:18 1999	pd	moved from incoming to Graphics
Thu Jul 01 18:19:48 1999	pd	changed notes
Sun Feb 20 10:07:11 2000	ripley	changed notes
Mon Feb 28 17:17:51 2000	pd	changed notes
Mon Feb 28 17:18:28 2000	pd	changed notes
Mon Feb 28 17:19:35 2000	pd	changed notes
Mon Feb 28 17:20:17 2000	pd	changed notes
Comment 3 Brian Ripley 2011-04-11 07:40:52 UTC
In fact the box is plotted twice, but edges of faces facing backwards
are plotted first.

The problem is that the *lim were chosen so that the surface was not
entirely within the box.  The help page now warns about that.