-

BoatDesign

Sail Plan Calculator

Note

Direction(+/-1)

Title:


Jib

Main

Mizzen


Tack

x:
y:

x:
y:

x:
y:

location fore/aft
height from baseline

Luff: length


rake

deg from vertical

Gaff:length

zero for 3-sided sail

angle

deg from vertical

Boom:length


angle

deg from horizontal

of for area =

by

Jib

Main

Mizzen

Total

Center of Effort

x:
y:

x:
y:

x:
y:

x:
y:

Area


rigDraw Applet here!

Luff:length


Gaff:length


Leech:length


Boom:length


Tack

x:
y:

x:
y:

x:
y:


Head

x:
y:

x:
y:

x:
y:


Peak

x:
y:

x:
y:

x:
y:


Clew

x:
y:

x:
y:

x:
y:







v3.00(beta)

email author





INSTRUCTIONS

1. Purpose.

The BoatDesign Sail Plan Calculator is a tool for finding dimensions for the sailing rigs of small boats. Based on simple inputs, it computes coordinates of the corners of the sail(s), the lengths of the sides of the sail(s), the sail area(s) and the Center(s) of Effort.

2. Concepts.

The Calculator assumes a plan drawn on a Cartesian plane. Points on the plane are designated by pairs of numbers(x,y), where the x coodinate is the horizontal offset and the y coordinate is the vertical offset from an arbitrary origin. All linear dimensions used by the Calculator are the units of the plane (feet, meters). Areas are in squares of the same unit (square feet, square meters).

For example, if the waterline length of the boat is 10 feet, and the boat is drawn with the bow to the right, the aft end of the waterline might be at (0,0) and the forward end at (10,0).

Angular measures are in degrees.

All sails are presumed to have straight sides without roach or hollow.

3. Direction and Title.

The first input field is the Direction. This determines whether the boom is to the right(+1) or left (-1) of its associated sail luff. In general, if the boat is drawn with the bow to the right, dir = -1. If the bow is to the left, dir = +1. Only the sign of this parameter is important; the magnitude is ignored.

The Title is a free entry field. The purpose is to allow the user to distinguish one sail plan from another. The Title appears on the printed output.

4. Sail Definition Input.

Up to three sails can be defined. The inputs for each sail are in columns labeled Jib, Main, and Mizzen. These labels are suggestive only; the parameters and calculations for each column are independent and identical.

Each sail is determined by eight parameters:

  • Luff: desired length of the leading edge of the sail.
  • Rake: angle between the luff and vertical.
  • Gaff: desired length of the head of the sail. For leg o'mutton (Bermudan, triangular) sails, set this to zero.
  • Gaff Angle: angle between the head of the sail and vertical.
  • Boom: length of the foot of the sail.
  • Boom Angle: angle between the foot of the sail and horizontal.

The calculations will be unpredictable if the entries are not properly formed. Possible types of errors are the entry of letters of the alphabet, numbers with multiple decimal points, + or - signs in the wrong place, etc. The calculator does not make any checks for error of this kind.

5. Calculate.

Clicking on the Calculate Button triggers computation of the coodinates of the requested sail(s). The calculated quantities appear in the blue panels. A sketch of the sail plan appears.

6. Set Luff.

The Set Luff feature automatically changes the luff of a single sail so that it has a desired area. Select the sail to be adjusted and enter the desired area. As the calculator searches for the desired luff length, the sail plan is redrawn. This calculation is somewhat approximate. Obviously, if the boom and gaff lengths are zero, the feature will fail.

7. Increment.

The Increment feature allows changing any single parameter of any sail by a fixed increment with a button click. This allows the user to easily home-in on a desired size or shape. Select the sail, and parameter to be adjusted, and enter the positive or negative increment. Click on increment to change the parameter and recalculate.

8. Printer Output.

Clicking on the Printer Output button causes a new window to appear with the sail plan calculations in a printer-friendly format. Print the page using the browser "Print" function.

9. Save/Recall.

The Calculator can save one set of data on the hard drive of the host computer using browser "cookies." There are four buttons in the second row that implement this feature:

  • Reset - Sets sail definition data to zero.
  • Save - Saves sail definition data.
  • Recall - Reads previously saved sail definition data.
  • Delete - Erases all browser cookies associated with this page.

HELP & TECHNICAL NOTES

Policy vis-a-vis Help

I have verified that this page and applet run on new versions of Explorer and Netscape. Users have reported success on Macintosh and Linux systems. However, it has also been verified that the applet in particular will fail on various older and/or less well-established browsers. My policy is that I will tell people how others got it to run but I am not going to spend a lot of time and effort helping people to get it to run under some other OS or browser. I will accept and incorporate helpful ideas from any tech-minded folks who can make a contribution, but the offer is "as is, where is."

Some of the material in these notes may be considered arcane. Sorry, but a full, technical description is more likely to elicit helpful advice from someone who knows the answer (especially if I have revealed my ignorance). Stop reading at the point that you don't understand.

1. Javascript calculations.

All calculations on the page are done in Javascript. Any browser version less than 5 years old should run the page without trouble. In particular, it conforms to Javascript version 1.4 (October 1998).

All calculated numbers that appear on the form are rounded to 2 decimal places. Due to the peculiarity of computer arithmetic, some numbers appear with a string of decimal zeros and with a final digit in the trillionth place. Sorry. Consider it a reminder that computer arithmetic is not exact.

2. Mathematical methods.

The calculations of sail area are made by defining a central point by averaging the coordinates of the corners. Using this point as a common vertex, the sail is divided into four triangles. The area of each triangle is calculated by Heron's Formula. The center of each triangle is determined by averaging the vertices. Total area and center of area of each sail are determined by summing, and taking the weighted average.

Simple experiments indicate that the calculations are correct for normal sail shapes. However, if a sail is a non-convex shape, e.g. like a boomerang, then the "central" point may fall outside the permeter of the sail, giving rise to error. In addition, due to the peculiarities of computer arithmetic, Heron's Formula may give erroneous answers for very thin triangle shapes, as might arise if the "gaff" side of the sail was made very short to imitate the headboard of a bermudan sail.

3. The applet.

I anticipate that many users will have trouble getting the applet to run and draw the rig shape as desired. Here is a brief summary of possible problems, with comments.

Applet fails to load
  • If the words "rigDraw Applet here!" appear in the third row of the blue panel and not a rectagular drawing area, then the applet has not loaded. Alternately, there may be a blank rectangle and an "Applet not found" message. Either you are not accessing the Calculator from a proper place or the brower is looking in the wrong place for it. I got this error using the Star Office browser with the source on GeoCities; other browsers worked normally.
  • Browser lacks a Java plug-in
  • Execution of an applet requires a programming feature called a "Java plug-in." Most browsers will prompt the user to download one when called for.
  • Applet fails to start
  • If the drawing area appears but remains blank when the page is loaded, then the applet was not successfully started. An error of some kind may be displayed by the browser. For example, a couple of users have reported the error "Wrong version number" when using Netscape 4.7. The only solution to this that I know is to get newer browser software. Upgrading from 4.7 to 6.2 solved the Netscape problems. It is probably only necessary to upgrade the Java plug-in, but I don't know for sure and that may be a tricky thing to do.
  • Applet fails to draw
  • The applet may start and draw the "three square" initial screen, but then fail to draw properly when the "Calculate" button is clicked. The likely reason is that the browser does not support the technology being used.

    The sail shape parameters are passed to the applet by a Javascript call to a public method of the applet. This functionality is non-standard. In Netscape, it is implemented by LiveConnect (tm) technology. In Explorer, it is implemented through ActiveX (tm) technology. Any other-named browser might use one of these, or something else, or not support the functionality at all. The only fix I can offer is to use a new version of Netscape or Explorer.

  • If the applet doesn't run, and the suggestions in these notes don't help, then I am not going to be able to help either without some more information. In particular, look for error messages displayed by the browser (usually in the lower left border), and look in the browser's menus under "Tools", or "Options" for a debugging tool, e.g. Javascript console, Java Console, Javscript debugger, etc. Probably, in the end, the best I am going to be able to do is suggest a fresh install of Netscape or Explorer.

    4. Cookie crumbs.

    The Save/Recall feature is based on cookies. If the browser has cookies disabled, this feature obviously won't work. In addition, use of this feature has the potential for interfering with other cookies, e.g. web site passwords. Netscape, for example, has a fairly low limit (300) of the total number of cookies allowed for all sites. Finally, use of the "Delete" feature may delete cookies other than the ones explicitly targeted. (They would be related to the Calculator page, or the server from which it was read and would probably have been created by the host for some record-keeping purpose of its own.)