help-octave
[Top][All Lists]

## Re: Solving a complicated moving geometry problem ?

 From: Emil M. Oanta Subject: Re: Solving a complicated moving geometry problem ? Date: Fri, 3 Jan 2020 06:23:23 +0000 (UTC)

The 'equation of the cylinder' seems to be the equation of an ellipsoid/sphere.
When I was a student I developed applications which solved intersections between geometric entities. Please verify:  Ellipsoid

On Friday, January 3, 2020, 5:34:09 AM GMT+2, linux guy <address@hidden> wrote:

I think I just figured it out... if I calculate the tangent line along the surface of the cylinder, then I just have an increasing radius arc intersecting a line.  I think I know how to calculate the tangent points that make up the line.

On Thu, Jan 2, 2020 at 8:29 PM linux guy <address@hidden> wrote:

The problem (in my mind) is that I don't know the trajectory of the ball such that it will strike the surface tangentially.   The string is increasing in length with time.  As it increases in length the contact point moves and the flight time increases.  So I don't have a point on the cylinder from which to calculate a trajectory.

Maybe I just need to sleep on it.  Or solve an easier case first, ie not tangential, and I'll see the solution.

It's just math, after all.

On Thu, Jan 2, 2020 at 8:13 PM Juan Pablo Carbajal <address@hidden> wrote:
So it seems the ball is following a trajectory that does not depend on
the cylinder.
Hence just turn around the question: given the trajectory of the ball
(that you can solve using an ODE) where can I place a cylinder (with
your constraints) such that its surface is tangential to the
trajectory?
Another easy approach is to conde the crossing of the cylinder surface
by the ball, and the tangential condition as event functions, and add
that to your ODE solver, then search the initial conditions that
trigger the events.
Check https://octave.org/doc/interpreter/Matlab_002dcompatible-solvers.html#Matlab_002dcompatible-solvers
to learn how to use events.