Message-ID: <00EF8E24-1DE9-4790-9CDA-68968F091965@soc.soton.ac.uk>
Date: 2005-09-19T08:08:33Z
From: robin hankin
Subject: distance to eye in persp()
Hi
the manpage for persp() has a wonderful section where a the trans3d
() function
is used with points() and lines() to add red dots and a green sinusoid
to the Mexican hat surface.
Does anyone have a way to tell what distance a point is from the eye/
camera?
Take the following line:
lines (trans3d(x, y=10, z= 6 + sin(x), pm = res), col = 3)
Is there a function like trans3d() that returns a vector of distances
from
the x,y,z point to the camera? I want this so I can plot clouds of
points
with the further ones in smaller plotsizes, and perhaps even fading
to white
(as though viewed through fog).
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743