Skip to content
Back to formatted view

Raw Message

Message-ID: <D39CE363-B7E4-4616-9363-C74BC794847B@soc.soton.ac.uk>
Date: 2005-09-19T14:15:07Z
From: robin hankin
Subject: distance to eye in persp()
In-Reply-To: <432EA9CA.3000508@stats.uwo.ca>

Duncan


> You can probably just do what trans3d does, but keep the
> z-coordinate, to get a reasonable measure of depth.  i.e.
>
> depth3d <- function(x,y,z, pmat) {
>    tr <- cbind(x, y, z, 1) %*% pmat
>    return(tr[,3]/tr[,4])
> }
>


fantastic!  This is exactly what I was looking for.


> This is sufficient for doing fog calculations.  For perspective
> shrinkage, you'll need to say where the user's eye is in these
> coordinates (or just use depths as distances).
>


I was going to use hsv(h=1, v=1, s=exp(d/d0) )

(some people believe that red light [ie hsv(h=1, ....)] penetrates  
further
through mist than other colours.  I can now test this !-)

The other idea I had was to plot points with less than the  median
depth with big symbols  and the others  with small symbols.
That would seem to be a nice nonparametric way to do it.
Any other ideas?


very best wishes to everyone

Robin


>

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743