Mailinglist Archives:
Infrared
Panorama
Photo-3D
Tech-3D
Sell-3D
MF3D
|
|
Notice |
This mailinglist archive is frozen since May 2001, i.e. it will stay online but will not be updated.
|
|
P3D Phantogram Phormula (Part 2) "Making the Phantogram"
- From: Bruce Springsteen <bsspringsteen@xxxxxxxxx>
- Subject: P3D Phantogram Phormula (Part 2) "Making the Phantogram"
- Date: Sat, 20 Feb 1999 12:52:32 -0800 (PST)
Fasten your seat belts, we've almost arrived:
In Part 1 we described a wire frame cube with the following points:
A = (-2.5, 5, 2.5)
B = ( 2.5, 5, 2.5)
C = ( 2.5, 5, -2.5)
D = (-2.5, 5, -2.5)
E = (-2.5, 0, 2.5)
F = ( 2.5, 0, 2.5)
G = ( 2.5, 0, -2.5)
H = (-2.5, 0, -2.5)
We picked a position (relative to origin O) from which we would view
the scene thus:
h = 32 cm (ie: how high above the origin are you?)
d = 32 cm (ie: how far from the origin are you?)
b = 6.5 cm (ie: how far apart are your eyes?)
How do we make a phantogram, duplicating this view in a stereo anaglyph?
Here's an inconvenient way:
Imagine as you look down at the scene that your left eye suddenly
becomes a flashlight, projecting a cone of light into space which hits
the wire cube and casts a shadow on the paper where the cube sits.
The shadow would be a network of lines that looked like a cube that
was run over by a rolling pin. If you traced that shadow with a blue
pen, you would have a "projection" of the cube on the paper. Each
corner of the real cube would have a corresponding "shadow point" on
the page that could now be located relative to our origin with just 2
coordinates (x, z). (Since all the points of this shadow are on the
page, all projected y values are zero.) This shadow you have traced
on the paper is the exact left-eye part of our phantogram. Each of
the eight (x,y,z) points in our actual cube is now represented by a
point on the page. If your right eye gave off a light and cast a
shadow to trace with a red pen, that tracing would be the right eye
half of the phantogram. Each point in that shadow could also be
described by its location (x, z) on the page. Any points where the
real cube touched the paper stay right where they are in the shadow
projections, both in the left and right drawings. In fact, the four
ground-level points E-H keep *exactly* the same coordinates as they
had in the real cube. The projected points A-E from the "high" part
of our cube are spread out across the page in two general directions,
one away from the left eye, one away from the right. A projected
point will always have the same z value in its right shadow view as in
its left shadow view, only the x values will differ between left and
right shadows.
Fortunately, there is an easier way to make the phantogram than
turning your eyes into flashlights. A set of equations will let us
convert the real object (x,y,z) coordinates into flat (x,z) phantogram
coordinates, one set for the left eye and one set for the right. Then
we can mark those points on the page at their appropriate distances
from an origin point, connect the dots for the left view with a blue
pen, connect the right view dots with red, and view our phantogram
from the position we have chosen in advance. We will see a wire frame
cube in the same size and position as the real one. To keep things
straight, instead of (x,z) each point in the left eye view will have
projected coordinates called (lx, pz), each point in the right eye
view will be defined by (rx, pz). The value of pz (projected z) is
exactly the same in both the left and right projections of a given
point, only the x value may vary. The way I get from (x,y,z) to
(lx,pz),(rx,pz) is:
lx = y(x + b/2)/(h - y) + x
rx = y(x - b/2)/(h - y) + x
and
pz = y(z + d)/(h - y) + z
where h is your chosen viewing height, d is your chosen viewing
distance, and b is your chosen stereo base. Remember all figures must
be in the same units: centimeters, inches, navy beans, or whatever.
Don't mix units.
You can do this by hand, with a calculator and paper, with a computer
spreadsheet, or with (I presume) a 3D graphics software, as your
resources and inclinations dictate.
I use an analysis pad (with blank rows and columns), a #2 pencil, and
my 16-year-old 3.5K RAM VIC20 computer. In the example we are using,
each row on my pad is for a point A-H of the original cube. Each
point has its real object coordinates marked in columns labelled x, y,
and z. My BASIC computer program prompts me to enter the values for
h, d, and b. Then it asks for (x,y,z) coordinates for each point (up
to 30 points at a time) and gives me back values for each point for
lx, rx, and pz. I note those in columns on my pad. Next, I plot each
new phanto-point on metric grid paper, first a left view using (lx,
pz), then a right view using (rx, pz). I connect the dots with
appropriately colored pens for each eye, either directly on the grid
paper or tracing onto a blank sheet. Then I view the drawing with
anaglyphic glasses from the correct height and distance and behold! A
5 cm phanto-cube stands on the page before me.
It is a good test of your calculations and viewing position to make a
real 5 cm cube from paper and place it just beside the "Phanto"
version. Any distortion or inaccuracy will be clearly visible by
comparison. Of course more complex objects are possible, with
interesting viewing variables thrown in. (Phantograms are actually a
special, limited case of regular perspective projection and anaglyphic
drawing - one where objects are generally in front of the "window" or
"picture plane" rather than behind as usual - though not necessarily -
and where the line of sight is at an angle to the picture plane,
rather than perpendicular - but again not necessarily!)
There are many more details and issues to discuss, but this is enough
for P3D - at least all I dare to post. You will discover many of the
facts on your own. I invite you all to calculate and draw the 5 cm
cube in our example, using the parameters I have given, then mail your
results to me, autographed. I will put my collection of 5 cm cubes in
a notebook, to share at future stereo gatherings, if the idea catches
on. I welcome corrections, requests for clarification, flames, etc,
by e- or other mail. My address is:
Bruce Springsteen
3301 N Cramer St
Milwaukee, WI 53211-3009
USA
Best of luck.
Bruce
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
------------------------------
|