Re: Simple (?) Problem



lucas <kingpin@xxxxxxxxxxx> writes:

Hi,

i have the following problem: given a point q in R^3 and a circle in
R^3 (the intersection of a plane and a sphere), find the nearest point
to q that is on the circle.

I need an explicit solution to this problem.

The first thing i was trying to do was to define the points that are
on the circle. Starting from a sphere with radius 1 centered at the
origin, let n=(n1,n2,n3) be the normal vector of the plane (the origin
is on the plane). The points (x,y,z) on the plane are such that:

x*n1 + y*n1 + z*n1 = 0

The parametric equations of the points on the sphere are:

x = x0 + r*a
y = y0 + r*b
z = z0 + r*c

where a = sin(theta)cos(phi), b=sen(theta)sen(phi), c=cos(theta).
Since x0=y0=z0=0 and r = 1 and x*n1 = a, y*n2=b, z*n3=c, we have

(1) a+b+c = 0.

So, for every theta,phi such that a+b+c = 0, the points

x = (a/n1, b/n2, c/n3) are on the circle (on the intersection between
the sphere and the plane).

The first problem here is equation (1). An explicit range of values
for theta and phi would be very useful (even an "approximation" would
be useful).

We write p(theta,phi) to indicate that points.

Now, we need to find theta, phi such that a+b+c=0 and the quantiy

F = || p(theta,phi) - q ||

is minimized (|| -- || is the 2-norm for vectors).

I was thinking to take the gradient of F and solve the equation
grad(F) = 0. The gradient is given by

grad(F) = (partial_derivative_theta F, partial_derivative_phi F)

Is this line of reasoning correct??

After all the calculation i end up with a trascendetal equation and i
am not able to calculate an explicit solution. Maybe there is another
way to do it...

If u and v are two unit vectors forming an orthonormal set with n,
and p = [x0,y0,z0] the centre of the circle, then a parametric
representation of the circle is
R = [x,y,z] = p + r u cos(t) + r v sin(t).
Now expand ||R - q||^2, and you should end up with something of the form
A + B cos(t) + C sin(t), which is easy to minimize.
--
Robert Israel israel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.



Relevant Pages

  • Geometric problem
    ... R^3 (the intersection of a plane and a sphere), ... to q that is on the circle. ... I need an explicit solution to this problem. ... Starting from a sphere with radius 1 centered at the ...
    (comp.graphics.algorithms)
  • Re: two rotations make a sphere
    ... take only one-half rotation of a circle to produce a sphere ... and only one complete rotation ... since there is no ebb and flow in this third plane. ...
    (sci.physics)
  • Re: [Embedded troll] Easy Questions
    ... and travels due north for one kilometer, ... which assumes you are working on a flat plane. ... the surface of a sphere is a closed ... On a circle, if you keep ...
    (comp.arch.embedded)
  • Re: circle through 3 points in 3-space
    ... What I need is the Center point to the according circle ... Rotate the plane of the points into ... that plane and the normal vector to ... surface of the sphere. ...
    (comp.soft-sys.matlab)
  • Re: circle through 3 points in 3-space
    ... What I need is the Center point to the according circle ... Rotate the plane of the points into ... that plane and the normal vector to ... surface of the sphere. ...
    (comp.soft-sys.matlab)

Loading