|
![](/i/fill.gif) |
"honnza" <jan### [at] centrum cz> wrote:
> Is there an easy way to join two points by two circular arcs given their
> tangents?
> Input:
> A,B - endpoints
> a,b - their tangents (oriented parallel to the arcs)
> where A+at and B+bs are skew lines (it's easy to handle the planar case)
> Output:
> C,D - arc centers
> arc normals and radii can be calculated easily from these
> E - intersection point of both points
> together with the arcs' common tangent vector it will be used to cut the
> tori.
>
> I think (after some analysing) it has an infinite number of solutions,
> parametrised by a real number.
I will ignore all degenerate cases in the following.
It suffices to know E. From there it is just getting an arc from the
endpoints and a tangent at one endpoint in a plane (two times of course).
To any given point E there are of course unique arcs from A and B with
tangents a and b. In general, though, the other tangents at E will not
meet. So given A,a, and E, what is the tangent at E of the joining arc? It
is the tangent a, mirrored at the plane perpendicular to the line AE. That
is a-2*<a,E-A>/<E-A,E-A>*(E-A) where <v,w> is the dot product. So we are
looking for E such that
a-2*<a,E-A>/<E-A,E-A>*(E-A) and
b-2*<b,E-B>/<E-B,E-B>*(E-B)
are colinear. We can assume without loss of generality that a and b have
unit length. Then the mirrored vectors also have unit length and we can
replace colinearity with equality (up to different sign). Hence we want
to solve to vector equation
a+b = 2*<a,E-A>/<E-A,E-A>*(E-A)+2*<b,E-B>/<E-B,E-B>*(E-B)
In the coordinates x,y,z of E, this is a system of three equations.
Multiplying be the common denominator <E-A,E-A>*<E-B,E-B> all three
equations become polynomials of degree 4.
To me it seems that those are rather general systems of equations, so I
doubt that you have an infinitude of solutions.
For solving this system of equations I would recommend numerical methods.
Of course, degree-4 polynomials can be solved exactly using radicals. So
you can solve one equation, obtaining a solution for one variable in terms
of the other two. Plugging this solution into the other equations just
might give you some simplification. But I would not bet in your favor.
If you are still sure that you have a continuum of solutions, then you can
eliminate one degree by forcing <E-A,E-A>=<E-B,E-B>. Geometrically this
means that the point E has the same distance from A and B, which is maybe
not an esthetically bad way to choose among the possibilities. It adds one
more equation, this time a polynomial of degree 2. It has the benefit that
for turning the other equations into polynomials it suffices to multiply
by <E-A,E-A>, yielding polynomials of degree just 2.
Hope this helps,
Mark Weyer
Post a reply to this message
|
![](/i/fill.gif) |