The magazine of the Melbourne PC User Group

Build a Bezier boat, Part 2: 
Designing a smooth yacht hull

Ken Holmes
kholmes@melbpc.org.au

In Part 1, we indicated that this would cover designing a yacht hull shape using two 4-point Beziers and a 3-point Bezier along (each of) the gunwale, bilge, bottom and centreline (keel). This allows for smooth gunwale and bilge lines but kinks at front and rear of the keel. Cross-sections are defined by 4-point Beziers down the side, permitting an S-shape down to the keel as well as the normal bow and stern shapes.


Figure 1.

Figure 1 shows the working screen, not a pretty sight but not meant to be, as it contains as much information as is desirable to allow control and visualisation of the shape and as will confirm that the program is producing sensible results. It certainly didn't at times during development as the code is quite tricky and it was essential to be able to print lots of data such as point co-ordinates on top.

As each cross-section was calculated, its points could be tabulated on screen as they were simultaneously stored in an array in memory. This array could be printed on screen at the end, interweaved with the first set; it helped to ensure that sensible results were being calculated and, equally importantly, being correctly stored.

Also, it could be paused as each cross-section was plotted, which clearly showed the sequence of events as the longitudinal Beziers went through their lower levels, plotted in red, and their final level, in black. The fore and aft 4-point Beziers go to level 3 (8 x-sections) and the middle 3-point Bezier goes to level 1 (2 x-sections). This gives 20 x-sections if we include the bow and transom. The side 4-point Beziers go to level 4 (16 points), meaning 18 points with gunwale and keel included.

Using a vertical mirror between the two front views gives a stereoscopic view with clear indications of the positions of everything. Any of the numbered handles may be selected (they will flash) and moved beamwise or vertically, but they can't be moved lengthwise as this distorts the cross-section planes. The bow is point 0 and, along the gunwale, points 0 to 3 (4-point Bezier), points 3 to 5 (3-point) and points 5 to 8 (4-point) provide a smooth gunwale. The bow (point 0) is fixed and points 3 and 5 cannot be moved directly as they are always adjusted onto the line between their respective adjacent handles to avoid a kink.

The other points, including the transom, may be moved. The bilge line of handles (produced from points 0 and 9 through 16--and plotted here) is similarly kept unkinked by adjusting points 11 and 13. We need a kink at the front and rear of the keel so the central line of anchors and the bottom line of handles are not so constrained, as you may see on the diagram.

The bottom control points, 19 to 21, are on the centreline and even higher than the corresponding bilge controls (11 to 13) in order to thin down the upper keel. If an even thinner keel were desired, it would be necessary to go to 5-point Beziers with an extra control point in this area. Note that the original control points are not on the final cross sections and, in particular, this causes the fore and aft sharp corners of the keel tip to be smoothed off--best seen on the raytracing.

The program can write a file to store the array information once you are happy with the shape. We have chosen to write several files strictly in the format required by POV-Ray to produce Figure 3.


Figure 3.

Figure 4.

First: there are 629 triangles to define the white hull surface. Second: there are about 650 thin green cylinders for the mesh of the near side. Third: there are 36 larger red spheres for the initial control points and about 70 smaller red spheres for the 4 lines of Beziers, joined by 76 thin red cylinders.

This presentation is purely to illustrate the surface generation procedure but could be readily directed to other purposes such as a starting point for depicting internal bulkheads, compartments and furnishings. The array could be printed out for use in setting out frames for construction or used in an extension of this program for calculations of buoyancy distribution, waterline for different displacements or righting moments for different roll and pitch angles.

In Part 1, I mentioned that a trimaran could be similarly defined, so Figure 2 is part of the working screen and Figure 4 is a raytracing of such. Each half uses four 3-point Beziers from the bow to the start of the side keels or sponsons, smoothly blended to four 4-point Beziers through the tunnel to the transom. The side uses three 4-point Beziers.


Figure 2.

Although they may be less attractive in terms of ease of construction and strength/weight ratio, trimarans offer more scope to improve bow spray containment, directional and roll stabilities and planing performance. These things must ultimately be assessed on the water, but if a boat were designed by a program such as this, it would be relatively simple to modify the design in a direction to improve specific aspects of performance.

There is, of course, much more to designing a boat than plotting a smooth surface but mechanisation of such tasks frees the designer to consider the more subtle aspects of his craft. The program is on the BBS as BEZYACHT.LZH.

Reprinted from the May 1999 issue of PC Update, the magazine of Melbourne PC User Group, Australia

 

[About Melbourne PC User Group]