Bill,
Thanks a lot for the info. I did a slight variation of your suggestion and it
seems to work.
I start by transforming all points as you mentioned. I also transform a base
point for each data point which would be the data point projected on the bottom
of the universe. I test point A against any point B in front of and above it by
determining if a line from B to any adjacent neighbor C will hide point A. To
satisfy the point where you may be looking directly down on the graph or up from
above I also make sure the point A falls between point B and the base point for
B. In other words, if point B and the projection of B on the bottom of the
universe are both either above or below point A then B can't block A.
I'm not sure if the explanation makes sense, but your suggestion was a great
help.
Thanks again,
Raymond J. Zeigler
Systems Programmer
Integrated Support Systems
Clemson, SC
raymond@xxxxxxxxxxx
(864)654-1284
"From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx>" <billh on 08/13/2001 05:34:09
PM
To: Raymond Zeigler/ISS@ISS
cc: visad-list@xxxxxxxxxxxxx
Subject: Re: determining visible points
Hi Raymond,
Determining visibility of points in a terrain plot is a bit
tricky, and I don't think picking logic will help much.
You could use the Java3D Transform to transform the data
coordinates of your points into 3-D (x, y, z) screen
coordiantes, then for each point see if there is a point
at the same approximate x with smaller z (i.e., closer)
and larger y (i.e., higher and thus obscuring). The x test
has to be approximate since your points won't fall on neat
rows and columns once transformed into 3-D screen coords.
Note that a point might also be technically visible (from
underneath the terrain surface) if all the points in front
of it in z have larger y.
Good luck,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html