1

In the paper Real-time Reflection using Ray Tracing with Geometry Field , it mentions this:

A ray is represented by its two intersection points (in,out) with the bounding box of the surface. Hence, the geometry field is a 4 dimensional function.

Having two $3D$ points gives 6 values: $A=(A_x,A_y,A_z), B = (B_x, B_y, B_z)$.

How is it that those 6 values, which are on the surface of a unit cube, can be represented with only 4 numbers?

Edit: the best I can think of is to convert each point to spherical coordinates and throw away the length, effectively converting these points to points on a unit sphere. That way involves some trig operations though. Is there a better way that uses less computation?

Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
  • UV-mapping the surface? – Nathan Reed Jan 14 '17 at 02:57
  • Hrm yeah I guess that's true if you have a unique range of u and v per face! – Alan Wolfe Jan 14 '17 at 03:13
  • 2 time 2 angle pairs? See the third rotation about the own axis is not needed to represent a arrow in any direction. – joojaa Jan 14 '17 at 11:00
  • That's what I was thinking too with the spherical coordinates. You don't need roll! But getting the angles takes some trig. However, this lets you do a ray intersection against a generic object as a table lookup so maybe the trig ops aren't a bad trade off. Nathan Reed's idea doesn't have that though which is interesting. – Alan Wolfe Jan 14 '17 at 14:30

1 Answers1

4

3D object surface is 2D domain and can thus be parametrized with a 2D function. In case of a unit cube you could parametrize the surface for example by mapping each 6 faces to a 2D image strip. So if you know two points of the ray that intersects the cube, you can define it with 4D function using the parametrization

JarkkoL
  • 3,636
  • 13
  • 14