Plotting a curve for a Tractrix Horn in Adobe Illustrator with Javascript. - diyAudio
Go Back   Home > Forums > Loudspeakers > Multi-Way

Multi-Way Conventional loudspeakers with crossovers

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 22nd September 2009, 09:32 PM   #1
diyAudio Member
 
jpbturbo's Avatar
 
Join Date: Sep 2009
Location: The High Country
Default Plotting a curve for a Tractrix Horn in Adobe Illustrator with Javascript.

Sorry in advance for the long read but,

I figured this out yesterday and I thought that other people might find it helpful/interesting.



If you happen to have Adobe Illustrator CS4 and a little bit of computer knowledge you can run a script to draw the curved sides of a tractrix horn using X and Y coordinates.

Open up a new file in notepad and paste in something like this,

var myDoc = app.activeDocument;
var myLine = myDoc.pathItems.add();
myLine.stroked = true;
myLine.setEntirePath([[0,82.5] , [2.6,84] , [6,88]]);




Then click on File Save As and name it something like tractrix.js

The .js extension tells illustrator that it is a Javascript file so it can know how to handle it.



The numbers in brackets[ in the lastline are the X and Y coordinates for each point on our line.

Obviously you would want more than three points in your line.

What I did is use Erik Forkers spreadsheet at volvotreter.de to calculate my X and Y coordinates.

The X coordinate for each point in our line comes from the Sidewall Stretched [mm] column, the Y coordinate comes from a column I made that takes the values of the height [mm] column and multiplies it times .5 to give me my width(keeping in mind that his spreadsheet is setup to make a horn rotated 90 degrees from most midrange horns).

I cut each of those columns into another spreadsheet and added the the brackets in the adjacent columns.

Then I used the concatanate function to join the cell with the opening bracket [ and the X coordinate into a single cell and I did the same so I had the Y coordinate followed by the closing bracket ] in another cell.

I moved both sets of coordinates so that they were in the A and B columns and clicked File Save As and chose .csv as the file type.



Then I opened the .csv file I had just created with notepad and I saw that I had a number of rows of the following format [number,number]

This is great however we can't just paste this into our .js file just yet as there is still some slight formatting that must be done.

I clicked Ctrl+A to select all.



Go back into Excel and on a new spreadsheet I clicked in the top left cell and right clicked and clicked on paste.

Now I had all my values running down off the screen in a SINGLE column.

I selected all of the cells that had my coordinates in them and right clicked and clicked Cut.

Then I right clicked in a cell in the first row to the right of the cells I had just cut and clicked on Paste Special.

At the bottom of the little Paste Special menu that pops up click Transpose.

Suddenly all of our coordinates are on the same line.

Reselect our new row of coordinates and right click and click copy.



Open up Word and click paste.

Select the blank space between the first and second PAIR of coordinates, the space between the closing and opening brackets ]this space[ and hit Ctrl+C to copy this blank space.

Then hit Ctrl+F to bring up the find menu, click on the second tab which should be the find and replace menu.

in the find field click and hit Ctrl+V to paste in the funny blank space we have between our coordinate pairs.

In the Replace field put a comma and then a space.

Click replace all.

You should now see a comma and a space between all your pairs of coordinates like in the last line of the example up top.

Hit Ctrl+A to select everything and then go over to your .js file and paste it in between the opening and closing brackets ([paste here]);

Make sure that each pair of coordinates is seperated by a comma and then at the end we must have the second closing bracket ] and the closing perenthesis ) and semicolon ; to close out our line of script.



Make Sure the .js file is saved.

Open up a new blank document in Illustrator CS4.

click on File, Scripts, Other Script and then browse to your saved tractrix.js file.

Once you click on your file to select it click on open.

Pretty immediately you should have a nice looking tractrix curve plotted out in your main window.



Now there is one problem.

The the scripting engine doesn't use mm as it's unit of measure.

So you just need to click on View, show Rulers. and then right click on the rulers once they appear and set them to mm.

Then click on the rulers and drag out some guides to the appropriate measurements and then scale your curve accordingly.

If you click on your curve with the selection tool remember to hold down shift while you are scaling to constrain the proportions.



Then you'll have to figure out how to get it printed out to scale.



Anyways,

Perhaps somebody will find this useful.



Peace,
Josh
__________________
...sword and pistol by his side.
  Reply With Quote
Old 24th September 2009, 09:46 PM   #2
diyAudio Member
 
jpbturbo's Avatar
 
Join Date: Sep 2009
Location: The High Country
Sorry for the above post with all the text.
Here are some pictures,

First off, a nice smooth curve for the Tractrix horn as plotted by the Javascript in AI CS4.

Click the image to open in full size.

Some more bad camera phone pictures.



Measuring before I rip the plywood to the desired depth for the horn.
Click the image to open in full size.




After I have ripped the plywood to the correct depth, tracing the curve onto the wood.
Click the image to open in full size.


Getting ready to make the first curved cut. I cut two boards at a time and keep these pieces matched as a top and bottom pair.

Also if I cut more at once I get a little bit of blade deflection when turning the saw and they don't come out as even.
Click the image to open in full size.


The first cut is done.
Click the image to open in full size.


The second cut is done.
Click the image to open in full size.


Here are all four tops and bottoms clamped together to minimize warping. It's been very humid here.
Click the image to open in full size.


Here's the jig we will be using to assemble them. Not finished in this picture, I added crosspieces between the top of the trapazoid members to allow the top and bottom to be clamped to the jig as well as some built on clamps at the bottom to hold the mouth of the tractrix horn in place.
Click the image to open in full size.




-Josh
__________________
...sword and pistol by his side.
  Reply With Quote
Old 17th February 2010, 03:23 AM   #3
diyAudio Member
 
Join Date: Oct 2007
Location: N/A
Default Thanks for the tips, I did this the long way

I did that the long way in Illustrator--I wish I would have seen your post first. I measured and plotted my way to a 320 Hz tractrix curve. You can check it out my progress building round 320 Hz baltic birch tractrix horns at diyfirefly.blogspot.com Feel free to email me for a PDF if you're planning to build 320 Hz tractrix horns--it'll save you a lot of time.

Click the image to open in full size.
  Reply With Quote
Old 17th February 2010, 02:40 PM   #4
soongsc is offline soongsc  Taiwan
diyAudio Member
 
soongsc's Avatar
 
Join Date: Mar 2005
Location: Taiwan
Neat way of doing it.
__________________
Hear the real thing!
  Reply With Quote
Old 17th February 2010, 03:20 PM   #5
diyAudio Member
 
Join Date: Oct 2007
Location: N/A
Default Here's my completed round 320 Hz tractrix horn

Click the image to open in full size.

Here's my result. So far, I only have one finished, and I still need to make the mid-bass horns. But, I tested it with my Korneff 45SE and it sounds great!

I detailed every step of the building process here:

DIY Firefly
  Reply With Quote
Old 28th July 2013, 07:04 PM   #6
Egindin is offline Egindin  United States
diyAudio Member
 
Join Date: Jan 2005
Location: Los Angeles
Quote:
Originally Posted by green heron View Post
I did that the long way in Illustrator--I wish I would have seen your post first. I measured and plotted my way to a 320 Hz tractrix curve. You can check it out my progress building round 320 Hz baltic birch tractrix horns at diyfirefly.blogspot.com Feel free to email me for a PDF if you're planning to build 320 Hz tractrix horns--it'll save you a lot of time.

Click the image to open in full size.
Hi,

Great job! I built a 340 Hz tractrix horn in the past and now would like to build a bigger one - 320. I know there isn't much of a difference, but I enjoy the process. PDF or plotting point would be highly appreciated.

Ed
egindinm@hotmail.com
  Reply With Quote
Old 28th July 2013, 08:01 PM   #7
diyAudio Member
 
Join Date: Oct 2007
Location: N/A
Default PDF sent, good luck!

nt
  Reply With Quote
Old 28th July 2013, 08:12 PM   #8
frugal-phile(tm)
diyAudio Moderator
 
planet10's Avatar
 
Join Date: Oct 2001
Location: Victoria, BC, NA, Sol III
Blog Entries: 5
Just saw this. If you have the numbers already you can just copy & paste them into an Illustrator graph and it will generate the curve.

dave
__________________
community sites t-linespeakers.org, frugal-horn.com, frugal-phile.com ........ commercial site planet10-HiFi
p10-hifi forum here at diyA
  Reply With Quote
Old 29th July 2013, 11:03 AM   #9
jwmbro is offline jwmbro  United States
diyAudio Member
 
jwmbro's Avatar
 
Join Date: Nov 2007
Location: München, Bavaria, Germany
I used a similar method for building my paraline, except I plotted the contour in MATLAB.

Click the image to open in full size.

I did have to use adobe to make sure it prints out to scale though.
__________________
Regards, James
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tractrix horn adapter jzagaja Multi-Way 3 15th May 2012 02:34 PM
B&C 8PE21 on Tractrix horn jpboyt Multi-Way 19 28th November 2008 02:35 AM
Two way Tractrix horn with active sub fivestring Multi-Way 7 11th September 2008 03:07 PM
first MDF tractrix horn finished angeloitacare Multi-Way 4 29th October 2007 12:59 AM
Tractrix horn AuroraB Multi-Way 12 8th September 2003 09:48 AM


New To Site? Need Help?

All times are GMT. The time now is 10:25 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2