Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tractrix formula?

64 views
Skip to first unread message

Hendrik Skarpeid

unread,
Nov 28, 2001, 7:39:11 AM11/28/01
to
Hi.

I'd like to write a small program that will help in the practical
realization of rectangular tractrix horns using compression drivers.
The freeware that is available does not do what I am interessted in, so
being a programmer, I would like to contribute with my own for at leat this
specific application.

But....
I need a formula that can be used in a c-program to calculate expansion
curve.
Can anyone here help me with that?

Regards
Hendrik


Greg Berchin

unread,
Nov 28, 2001, 9:44:45 AM11/28/01
to
"Hendrik Skarpeid" <hendrik....@netcom.no> wrote:

>>I'd like to write a small program that will help in the practical
>>realization of rectangular tractrix horns using compression drivers.

<snip>


>>I need a formula that can be used in a c-program to calculate expansion
>>curve.
>>Can anyone here help me with that?

"Speaker Builder" magazine, 2/1981.

Do you want to calculate the radius as a function of the length,
or the length as a function of the radius?

In the formulae that I've seen for the Tractrix, you enter the
radius and it returns the length at which that radius is achieved.
This is exactly the opposite of what most people want. Rather
than trying to invert the function, I found it easier to iterate.

GB

Randy Yates

unread,
Nov 28, 2001, 10:07:40 AM11/28/01
to

According to Weisstein ("CRC Concise Encyclopedia of Mathematics"),
a parameterized version of the tractrix curve is

x(t) = a*(t - tanh(t))
y(t) = a*sech(t).
--
Randy Yates
DSP Engineer, Sony Ericsson Mobile Communications
Research Triangle Park, NC, USA
randy...@ericsson.com, 919-472-1124

Mark Parker

unread,
Dec 4, 2001, 9:01:15 PM12/4/01
to
When you get the program done, how about posting it for us all to use?

--
Mark Parker
Triton #516, "All Ways"

Greg Berchin

unread,
Dec 5, 2001, 9:39:02 AM12/5/01
to
Mark Parker <mpa...@mtp.mv.com> wrote:

>>When you get the program done, how about posting it for us all to use?

Here is a subroutine that computes the tractrix equation. To use
it, you must provide "a" (the mouth radius) and "r" (the desired
horn radius). It will return "x" (the distance into the horn,
starting at the mouth, at which "r" is obtained), "slope" (the
slope of the tangent line at that point), and "theta" (the angle
corresponding to that slope). As I mentioned in my earlier post,
it works backwards: most people want to enter "x" and have the
equation compute "r"; this does it the other way around, so you'll
have to iterate on "r" until it matches your desired "x".

The mouth radius "a" can be computed from:

a = c/(2PI*f),

where "c" is the speed of sound and "f" is the cutoff frequency of
the horn in Hz. Watch your units; if "c" is in feet per second,
then "a" will be in feet. If "c" is in inches per second, then
"a" will be in inches.


#include <math.h>

int tractrix(double a, double r, double *x, double *slope, double
*theta) {

/* a, r, and x defined as in Fig. 9 on */
/* page 15 of Speaker Builder, 2/81 */

/* a and r must be in the same units; x */
/* will be in the same units as a and r */

double temp;

if ((r <= (double)0.0) || (a <= (double)0.0) || (a < r))
return(-1);

temp = sqrt(a*a - r*r);

*x = a*(log((a+temp)/r)) - temp;

*slope = -r/temp;

*theta = atan2(r,-temp);

return(0);

}

0 new messages