Re: 3d coordiante geometry question



On Jun 9, 1:50 pm, pereges <Brol...@xxxxxxxxx> wrote:
On Jun 9, 10:32 pm, Chip Eastham <hardm...@xxxxxxxxx> wrote:



Hi, pereges:

I'm a little confused as to what is meant by "the square plane".
Certainly we can convert the "center" (origin) of this plane to
Cartesian coordinates from spherical coordinates (r, theta, phi),
and a normal vector at that point determines the plane.

But what can it mean for the "length of the square plane" to be
known, or to want "a way to calculate the coordinates of the 4
corners" of it? A plane is infinite in extent and has no corners.
So it sounds as if you want four corners of a square lying in the
plane, with the requisite side lengths.

But the information given does not uniquely determine a square
centered at the given point, because any such square can rotate
within the plane about that center without changing the length
of a side.

The complete family of all such squares can be described, if
that is your aim.

Well, actually I need to do it simulate a plane wave at any random
theta, phi. Theta and phi basically describe the direction of the
plane wave. The square that I was speaking of represents the
wavefront of that plane wave and the normal represents the direction.
The wave is being simulated by a dense grid of parallel rays(so
obviously each ray will have the same direction using the formula I
posted earlier). I want to focus these rays on a 3D object. I need to
create a grid in the square to find out the starting point or the
origin for every ray. The dimensions of the square should be such that
the rays can cover the object in that direction. Hence, I chose the
dimensions of this square as L which equals to maximum dimension of
the object. The problem is to divide the square into a uniform square
grid, I need to find out the max(xmax, ymax, zmax) and min(xmin, ymin,
zmin) points. The only thing I have is center of the square and the
length.


If I've understood your purpose, the orientation of the
square is unimportant, so long as the center is at
(r,theta,phi) and the normal there is vector N.

For simplicity we can think in terms of constructing a
square of side length L centered at the origin, and
having normal vector N there, then translating the
corner coordinates by the Cartesian equivalent of
(r,theta,phi):

x := r cos(theta) cos(phi)
y := r sin(theta) cos(phi)
z := r sin(phi)

If N = (N_x,N_y,N_z) is the normal vector, we can
construct a pair of unit vectors, mutually orthogonal
as well as perpendicular to N, in many ways. Some
consideration of cases is unavoidable.

If N_x = N_y = 0, use:

U = (1,0,0) and V = (0,1,0)

Otherwise, if N_z = 0, use:

U = 1/c (N_y,-N_x,0) and V = (0,0,1)

where c = sqrt(N_x^2 + N_y^2).

Otherwise use:

U = 1/c (N_y,-N_x,0) and V = 1/d (N_z,0,-N_x)

where c is as above, d = sqrt(N_x^2 + N_z^2).

The four corners of a square centered at the
origin normal to N and having side length L
are then:

(L/2)*( U - V ) (L/2)*( U + V )
(L/2)*(-U - V ) (L/2)*(-U + V )

where * denotes scalar multiplication.


regards, chip
.



Relevant Pages

  • Re: $1k Burning Hold in Wannabe Neanders Pocket
    ... For the try square and combination squares, you want to make sure they're accurate. ... -jack plane ... -eggbeater drill ... Cutting groove/dado/rabbet: ...
    (rec.woodworking)
  • Re: 3d coordiante geometry question
    ... I have a center of the square plane and it is given in spherical ... Cartesian coordinates from spherical coordinates (r, theta, phi), ... and a normal vector at that point determines the plane. ...
    (sci.math)
  • Re: Plane Parts?
    ... of the plane did not appear to be square. ... designs, even Stanley used more than one frog and bed design over the ... years for their Bailey planes, plus the Bedrocks are totally different ...
    (rec.woodworking)
  • Re: 3d coordiante geometry question
    ... I'm a little confused as to what is meant by "the square plane". ... actually I need to do it simulate a plane wave at any random ... origin for every ray. ...
    (sci.math)
  • Re: Planes for smoothing
    ... straight edge on a board or a surface that is narrower than ... the plane blade and is already straight and square. ... We had to true up the 10 inch edges with a plane until the ... they were to be the bases of our napkin holders. ...
    (rec.woodworking)