Quick viewing(Text Mode)

A Simple Model of Ship Wakes

A Simple Model of Ship Wakes

A Simple Model of Wakes

by

RAZA S. KHAN B.S., Denison University, 1991

A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF

MASTER OF SCIENCE

IN THE FACULTY OF GRADUATE STUDIES DEPARTMENT OF COMPUTER SCIENCE

We accept this thesis as conforming to the required standard

THE UNIVERSITY OF BRITISH COLUMBIA

September, 1994

© Raza S. Khan, 1994 In presenting this thesis in partial fulfillment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission.

(Signature)

\ Department of Computer Science The University of British Columbia Vancouver, Canada Date 94/09/24 Abstract

While ocean waves were among the first natural phenomenon to be modeled satisfactorily in computer graphics, waves from —ship wakes—have been largely ignored. The model presented in this thesis is suitable for animating wakes created by a ship moving along an arbitrary course. Instead of the dynamic solution of a free-surface problem that can be computationally expensive and unstable, the approach presented is kinematic and while ad hoc, is efficient and simple to implement.

The model superimposes circular waves emanating from points along the ship's path to determine the wake profile. In doing so, characteristics of the ship's hull are ignored. The approach is similar to the mathematical treatment of Kelvin's method of stationary phase, where curves of constant phase are obtained by integrating point impulses over the ship's course. Accuracy in obtaining an exact profile for the surface, as determined by the stationary phase method for closed-form solutions, is sacrificed for the ability to specify an arbitrary path.

The problem then becomes one of generating circles with a height field associated with them. This is done by adopting two different methods; one that uses a midpoint circle algorithm based on Bresenham's incremental circle generator and another that efficiently determines a profile for the circles.

The path of the ship is represented by parametric piecewise-cubic curves and the water surface by a height field. An animation is obtained by generating the height field for successive positions of the ship along the curve.

11 Contents

Abstract ii Table of Contents iii List of Figures v Dedication vi Acknowledgement vii

1 Introduction 1 1.1 Motivation 1 1.2 Objective 3 1.3 Previous Work in Modeling Waves 6 1.4 Overview 8

2 Mathematical Background 9 2.1 Determination of Region of Disturbance 10 2.1.1 Solution for disturbance created by a point impulse 10 2.2 Obtaining Curves of Constant Phase 13 2.2.1 Curves of constant phase for a circular course 13 2.2.2 Curves of constant phase for a straight course 15 2.3 Wake Geometry for a Straight Path 16 2.4 Estimating the Profile for a Circular Wave 19

iii 3 Graphical Model of Ship Wakes 21 3.1 Introduction 22 3.2 Ship Path Specification 22 3.2.1 The Bezier curve 23 3.2.2 Arc-length parameterization 24 3.3 Techniques Used to Generate Circular Waves 24 3.3.1 Calculating radius and amplitude of the circles 25 3.3.2 Midpoint circle scan-conversion algorithm 26 3.3.3 Computing a profile for circles 27

4 Results 29 4.1 Varying the Path 30 4.2 Changing the Number of Circles 34 4.3 Effect of Acceleration and Deceleration on Wake Produced 36

5 Conclusion 39 5.1 Future Work 40

A Algorithms 42 A.l Pseudocode for Arc-Length Parameterization 42

Bibliography 44

IV List of Figures

1.1 Ship wake characteristics 4 1.2 Geometry for Goss's representation of ship wakes 7

2.1 Notation used for the ship wave problem 11 2.2 Points influenced by a moving source 12 2.3 Curves of constant phase for a circular path 14 2.4 Curves of constant phase for a straight path 15 2.5 Wake geometry for a straight path 16 2.6 Wave groups for vessel on a straight path 17 2.7 Plot of ^ 18 X 2.8 Surface profile of Stokes's wave compared to a sinusoidal wave 20

3.1 Effect of arc-length parameterization on curve 25 3.2 Clipped region for circle profile calculation 28

4.1 Images obtained for a straight course before and after filtering 31 4.2 Images obtained for a curved path before and after filtering 32 4.3 Images obtained for a self-intersecting path before and after filtering. . . 33 4.4 Showing effect of number of circles on the wake 35 4.5 Wake produced by a vessel that is decelerating 37 4.6 Wake produced by a vessel that is accelerating 38

v To nana, nani, dada, dadi

VI Acknowledgements

I would like to thank my supervisor, Dr. Alain Fournier and my second reader, Dr. David Forsey for their guidance in the completion of this thesis.

I am grateful to the following, without whom this work would not have reached fruition: Bill, for taking on the role of student reader without even being asked. My thanks to him for countless McD. runs, his counsel to exercise restraint in the use of Forms, and much useful advice over the course of our friendship. Chris R. for his glowing presence in the lab, his sympathetic ear to my many grievances, and for vacating Lucille on numerous occasions during the troublesome coding days (nights); Chris H. for preserving some sanity by taking me on movie runs; Rob, for his late night stories; Sameer, for being the permanent resident on the third floor no matter what the time! and Vishwa, for much encouragement.

I would also like to express my acknowledgments to my brother, Ayaz, a constant source of inspiration for always being there and my parents for their endless support and love.

I remain indebted to the department for providing me with financial support during the course of my studies here.

vn Chapter 1

Introduction

Once more upon the waters! yet once more! And the waves bound beneath me as a steed That knows his rider. -Lord Byron, 1788-1824

A wake is "the track left by a moving body (as a ship) in a fluid (as water)"1. This thesis presents a method for modeling ship wakes suitable for computer graphics.

1.1 Motivation

While substantial research has been directed towards the theory of wake production by mathematicians and hydrodynamists alike [kelv87], [sher56], [stok57], [kost68], [mich69], [newm77], [crap84], it has not spurred similar interest among graphics researchers to model the phenomenon. This comes as more of a surprise when one realizes that waves, albeit ocean waves, were among the first natural phenomenon to be modeled satisfactorily

1 Webster's 7th dictionary.

1 Chapter 1. Introduction 2

in computer graphics [fole90].

Ocean waves themselves, however, were but a link in the chain of evolution that extends not so far back to the days of modeling static geometrical primitives such as lines, circles, and rectangles. Computer graphics has indeed evolved to capture some aspects of the complex motion of fluid flows [gate94], growth of botanical systems [prus93], explosions [reev83], and other phenomenon that are considered natural. It is not only in this context, though, that one sees the importance of modeling ship wakes. Another incentive comes from the interaction between two objects. Animating a boat and applying textures to enhance the image can produce convincing results, but the motion of a boat affects the surface underneath it and this phenomenon needs to be captured as well. It is with this purpose in mind that this model has been developed.

An extension of the problem, modeling the interaction between two types of models, has not been much explored. However, it will gain attention as animation systems become further integrated. The few published examples of this approach include interaction of wind fields with plant models [shin92] and the effect of the environment on plants [prus94].

Goss models ship wakes to provide a motion cue for aircraft pilots in assessing the movement of ships [goss90]. Since the model was intended for flight simulation, a real­ time method was essential. Also, considering that the viewing distance from aircrafts flying overhead is large compared to wave amplitude, a 2-D model was sufficient. The present work is not limited by such considerations and therefore a more general 3-D model is desired.

Animators interested in capturing the motion of vessels over water would benefit from a model that incorporates ship wakes. Such a model could accommodate one or several of the following criteria: shape and size of the ship, speed and path of motion, depth of Chapter 1. Introduction 3

water, and various factors not limited to wind and on the water surface. The model subsequently discussed allows specification of an arbitrary path in generating a wake and is simple to implement.

1.2 Objective

The principle interest here is in modeling realistic shape and motion of the waves gener­ ated as a ship moves through water. Realistic does not imply the waves follow precisely the dynamics of ship waves. Considering that ship waves are influenced by several fac­ tors including but not limited to ship motion, wind, and wave motion [goss90], such a task would be quite difficult. This does not necessarily mean the objective is lost, es­ pecially when one considers that much of the effort directed towards modeling natural phenomenon, is based on ad hoc techniques [fole90].

While a ship wake model for computer graphics need not satisfy physical laws precisely, several parameters that would affect the shape of the wake should be recognized. The model presented in this thesis was conceived to meet but one of these criteria: arbitrary path specification. Nonetheless, others are listed to acknowledge the necessity of further work in the area.

• Wind velocity Waves at sea are generated by wind [kins65] and therefore wind velocity can be considered instrumental in perturbing the ocean surface as well as affecting the motion of the ship and its wake.

• Speed of the vessel For deep water2 the speed at which a ship travels does not affect the angle of the V-

2Water is considered deep if for depth d, j > \ where A is the wavelength of the waves [ts'o87]. Chapter 1. Introduction 4

Figure 1.1: Ship wake characteristics

shaped envelope (see Figure 1.1) or wedge enclosing the wakes [walk88]. However, it can be a factor in two ways. First, if the speed is not kept constant, for a straight course the wake produced would no longer lie within V-shaped lines, but rather within curved lines and would affect their shape as well [stok57]. Second, in the case of transverse waves, as opposed to the more conspicuous diverging waves, wave resistance can be reduced by designing ships that travel at cruising speeds such that crests produced at the bow cancel troughs produced at the stern. This occurs when the ship's length is an integer multiple of wavelength, i.e. / = '—- where I is the length of the ship, k is the wave number, and N is an integer. Based on the derivation by Crapper [crap84], along a straight path of motion k = ^ for ships traveling with velocity v (and g the acceleration due to ) which means disturbance produced by the bow and stern cancel at: v 1

In shallow water, as v above increases, the wedge angle increases reaching its max- Chapter 1. Introduction 5

imum value of 90° when:

Vgd where d is depth of the water. This critical speed \J~gd is the maximum possible for gravity waves. Transverse waves disappear for a ship traveling beyond this critical speed and the wedge angle again reduces [crap84].

• Shape of the vessel The relative size of the wakes depends largely on the shape of the ship. Hydrody- namists have expended significant time in researching effects of the shape of the bow and have shown that resistance to water is significantly reduced by a bulbous bow as opposed to a non-bulbous bow.

• Path of the vessel Intuitively one would expect the shape of the wake to differ as a ship changes direction. Ship wakes are a consequence of a complex interference pattern and as path of motion changes the position of points causing the interference pattern would also change.

• Depth of water The principles governing the shape of a wave in shallow and deep water differ. As noted in the case of ship speed, in shallow water the wake angle increases to a maximum at speed \fgd and then reduces again.

As mentioned earlier in this section, the model discussed here accommodates any path including one that self intersects. This is not necessarily a small matter, given that much of the mathematics dealing with the phenomenon as discussed in [stok57] is limited to waves that follow the ship like a rigid body, i.e., applies to waves that originate for the straight or circular courses. Chapter 1. Introduction 6

As will be made evident in the mathematical treatment of the phenomenon to follow, the ship is reduced to a point source. Thus, there is no provision for a vessel's shape to influence the wake produced. Similarly, wind effects are ignored, though some adjustment of the type in [four86] could be implemented on the wakes to account for them. Changes to wave velocity based on depth of water, and amplitude based on distance, though relevant for refraction on the surface in the case of the former, have not been presently considered but they can be easily integrated.

It should be noted that, while most of the discussion of wake generation undertaken in this thesis focuses on a ship moving with constant velocity, the model does not impose this restriction. In the model presented here, circular waves are superimposed along the ship's path and the speed at which they propagate is constrained. The constraints are based on the ship's velocity and the maximum displacement that would satisfy the wedge angle mentioned above.

1.3 Previous Work in Modeling Waves

Fournier [four86] provides a brief history, to date, of modeling waves in computer graph­ ics. Images of ocean waves have been generated using techniques in [whit80], [scha80], [max81], [nort82], [perl85], [peac86], [four86], [mast87], and [ts'o87]. In [kass90], Kass and Miller presented an efficient and stable method of modeling waves in a fish tank or waves lapping on a beach.

While little effort has been directed towards producing realistic images of ship waves, Goss [goss90] presented a 2-D particle-based approach to display ship wakes in real­ time. Each wake is represented by a line segment whose endpoints constitute an aft particle and a fore, or bow, particle. The basis of the approach is shown in Figure 1.2. Chapter 1. Introduction 7

Path of Aft Particle osition of Ship

Fore Particle

Wake Line Initial Position of Ship

Figure 1.2: Geometry for Goss's representation of ship wakes

While the aft particle moves away from the ship with velocity vector V(c) = (|, f-v/f) based on a ship speed of c, the bow particle proceeds along the path of the ship for a predetermined time period AT called the spawn period. After this time it is released with a magnitude slightly less than that of the aft particle to give rise to the serrated appearance characteristic of ship wakes. A new wake is then generated using the same technique. Changes in the ship's heading are reflected in an absolute velocity vector, which is obtained by rotating V(c) through the appropriate angle. Since the model is two-dimensional, changes in amplitude are indicated by interpolating the color of the line segment from blue-gray to blue, where blue represents the ocean color. The velocity vector employed for aft and subsequently fore particles to give the semblance of a wake is based on the approach used in [walk88] which is discussed in detail in Section 2.3. Chapter 1. Introduction 8

1.4 Overview

Chapter 2 provides a mathematical description of waves generated by a moving pressure point in deep water, from which the model proposed in this thesis is partly derived. The chapter also discusses the wake geometry for a straight path as mentioned in Section 1.3 and includes a description of Stokes's wave—an approximate solution of non-linear par­ tial differential equations describing wave motion. The techniques used to design and implement the model are described in Chapter 3. Issues pertaining to the two methods adopted to generate circular waves are raised here. In Chapter 4 the results obtained are presented and analyzed and Chapter 5 concludes with directions for future work. Chapter 2

Mathematical Background

Let no one enter who does not know geometry [mathematics]. -Anonymous1

This chapter discusses the mathematical treatment of ship wakes. The solution for the problem as described by Stoker [stok57] is based on the cumulative effect of point impulses delivered along a ship's path. While the mathematics yields curves that bear a striking resemblance, at least qualitatively, to actual wave patterns, they are limited to closed-form solutions of straight and circular courses. In any case, Stoker's solution is provided to show how the concept of this present work originated, as is made evident in Chapter 3.

Stoker's solution involves the method of stationary phase introduced by Kelvin in 1887 [kelv87]. Kelvin invented the method of stationary phase as a means of approximating wave patterns created by moving ships. Newman [newm77] gives an alternate "heuristic argument" based on a concept of to describe the phenomenon. Crap- per [crap84] draws on the Doppler relation for a uniform current flowing pass a fixed

Purportedly the inscription on Plato's door at the Academy at Athens.

9 Chapter 2. Mathematical Background 10

disturbance to arrive at a similar solution.

The assumption throughout is of a fluid that is incompressible2, inviscid3, and irrotational4. Furthermore, the discussion is limited to waves produced in deep water by a point source moving with constant speed.

In the following section an envelope of points containing the region of disturbance pro­ duced by a point impulse is determined. Next, the character of the wave pattern is deduced. This is followed by a section describing the wake geometry for a ship travel­ ing in a straight path. Finally, to complete the chapter on mathematical background, Stokes's wave approximation, used to compute a profile for circular waves, is presented.

2.1 Determination of Region of Disturbance

Stoker [stok57] provides a method of describing the region of disturbance for a pressure point moving with constant speed. This region is found for both circular and straight courses.

It is, of course, not accurate to state that the disturbance is restricted to a particular region. However, the order of disturbance outside the envelope is quite small in relation to the disturbance within the envelope [stok57] and comparison to observations of actual ships moving in water attests to this fact.

2.1.1 Solution for disturbance created by a point impulse

2 Constant density. 3Force on fluid inside a surface due to fluid outside the surface is purely a pressure normal to that surface, with the only other force being the body force due to gravity (i.e., zero ). individual particles of the fluid do not rotate (i.e., zero vorticity). Chapter 2. Mathematical Background 11

Current Position of Point Source

Q(xt,yt)

Final Position P(x,y)

Figure 2.1: Notation used for the ship wave problem.

Consider a point source moving on a circle s, whose center is at C, with constant speed c as shown in Figure 2.1. Let t be the time taken for the source to arrive at the origin

O from a point Q(xt,yt)- The tangent vector t to C at Q(xt,yt) can be expressed as:

,dx dy. t = (— — ^ (2.1) 1 dt' dt' and with t = 0 at the origin, has direction opposite to that of the ship's course. The radius of s is denoted by R and the change in angle from Q(xt,yt) to O by a, where:

ct (2.2) a = R

The point P(x,y) representing a point influenced by Q(xt,yt) is located by means of a vector r where:

T = (x-xt,y-yt) (2.3) Chapter 2. Mathematical Background 12

and: 2 r = (x - xtf + (y- ytf (2.4)

The angle between t and r is 9. Considering the order of approximation for the distur­ bance, the only points P influenced by Q(xt,yt) are obtained by application of Kelvin's method of stationary phase [stok57], [newm77], and are those points that satisfy in polar coordinates (r,0), relative to Q, the relation:

r=-ct cos 6 (2.5) 2 v '

Such points lie on a circle that originates from Q(xt, yt) and has a diameter tangent to s as shown in Figure 2.2.

i • Y

s ' C 3-^^v

Q(x, ,yt jV-^ \l/2 ct ,*'''// \ V— \ J ^ \ V / e \ 7--A'' ^^^^ P(",yK-__ Jv^"' o X

Figure 2.2: Points influenced by a moving source. Chapter 2. Mathematical Background 13

2.2 Obtaining Curves of Constant Phase

2.2.1 Curves of constant phase for a circular course

The stationary phase condition (2.5) can be expressed in a different form to obtain curves of constant phase. Stoker [stok57] introduces the quantity a such that for phase

2 2 2 2c , c t , N a = y^= — (2.6) with 4>(t) = ^- and obtains equivalent expressions of the phase condition:

ct = a cos 9 (2.7) and: r == -acos20 (2.8) 2

Considering Figure 2.1 again, one finds:

xt = i?sina, (2.9) yt = R(l — cos a)

The coordinates of P, influenced by Q(xt,yt) are then:

x = xt — rcos(a + 0), (2.10) V — yt- r sin (a + 9)

Replacing xt and yt using (2.9) and r using (2.8), (2.10) becomes:

x = 7? sin en — | cos2 # cos (a + 9), (2.11) y = R(l — cos a — ~ cos2 9 sin(a + Chapter 2. Mathematical Background 14

To determine a locus of points (x,y) such that the phase

x = jR[sin(x cos #) — |cos2#cos(6> + xcos#)], (2.13) y = R[l — cos(xcos#) — | cos2 ^sin(^ + x'c°s#)]

Figure 2.3: Curves of constant phase for a circular path

Here each fixed value of \ provides one curve of constant phase and is equivalent to fixing the phase 6. Figure 2.3 {x on abscissa; y on ordinate axis) shows a few such curves obtained for a fixed radius R of small value and varying a. Chapter 2. Mathematical Background 15

2.2.2 Curves of constant phase for a straight course

For a straight course, R —> oo and x —* 0 such that i?x ~~* a- In this case (2.13) can be written as: x = Rxcos9 - ^cos26cos(6 + 0), (2.14) y = R-RcosO-^cos29sm(d + 0)

which results in: x = f cos 0(1+ sin2 9), (2.15) y = — £ sin 9 cos2 9

Figure 2.4: Curves of constant phase for a straight path

Figure 2.4 (x on abscissa; y on ordinate axis) shows a few curves obtained for a straight course with radius R set to a large value (approaching oo) with varying a. Chapter 2. Mathematical Background 16

2.3 Wake Geometry for a Straight Path

Goss [goss90] uses the wake geometry to compute a vector for the path followed by aft particles in drawing wake segments. The approach draws on simplified versions of Kelvin's analysis of the phenomenon as introduced in Section 2.2.

Consider the ship initially at point Q having moved to point O as shown in Figure 2.5. According to Kelvin's analysis, wave groups generated with the ship at position Q, lie within a circle of radius | the distance to O on a tangent to the path, s as previously indicated in Figure 2.2. Subsequent circles representing wave groups further along the path are shown in Figure 2.6.

Diverging Wake Transverse Wake (Starboard)

O

V-Shaped Wedge

Figure 2.5: Wake geometry for a straight path.

The character of the wake as determined from (2.15) can be divided into a transverse wake and more apparent diverging wakes on either side of the ship. The V-shaped wedge enclosing diverging wakes always forms an angle r of 19°28' for a straight course traversed Chapter 2. Mathematical Background 17

V-Shaped Wedge

^.Y^> > & O

Location of groups from A

Figure 2.6: Wave groups for vessel on a straight path. at constant speed in deep water:

CP \cAT 1 sin{T) — — — - (2.16) OC jcAT 3 4 1 T = sin-1 - « 19°28' (2.17) 3

The angle is not arrived at by accident. Consider (2.15) again and put in the form of v-:

sin 6 cos 9 V (2.18) x (1 + sin2 9)

Differentiating (2.18) and setting left-hand side to 0 yields:

12(1+sin2 #)(cos2#)-2( sin 9 cos 9) (sin 29) (2.19) °~~~2 (1 + sin2 9) which simplifies to:

2 sin2 9 cos2 9 - [(1 + sin2 9){l - 2 sin2 9)) = 0 (2.20) Chapter 2. Mathematical Background 18

and finally: 3 sin2 0-1 = 0 (2.21)

The maximum value of 6 then, at least for a straight course, is sin Jk, which occurs at tanr [newm77]: - = 2~i ~ tanl9°28' x

A plot of (2.18) for — | < 9 < | is shown in Figure 2.7 (6 on abscissa; ^ on ordinate axis).

1 1 1 r- " 'i i i y/x 35.27,tan!9.46

-35.27,-tan!9. 46

1 L_ _l i t i

Figure 2.7: Plot of *

Having justified the validity of the values assigned to CP and OC in Figure 2.5, it is apparent that, replacing d for cAT one obtains:

QC

\ cos(90-r) CP = f sin(90 - r) Chapter 2. Mathematical Background 19

d(l)

4VV 9' QP = QC + CP

d 3 (2.22) d f& 4V9

This result explains the vectors used by Goss [goss90] as mentioned in Chapter 1.3.

2.4 Estimating the Profile for a Circular Wave

The height of the of a progressive wave can be approximated by a sinusoidal function of the form: z(x,t) = acos(kx — uit) (2.23)

Here a is the amplitude, k = y- the wave number (A representing its wavelength), and u> = 2irf the [crap84], [bald81]. The function oscillates between —a and +a from trough to crest, returning to the same value after a time period T = 2JJ-.

However, the cosine wave approximation is not suitable for water waves with large am­ plitudes that have wide shallow troughs, and narrow steeper crests. Such a profile is provided by Stokes's wave and resembles more closely gravity waves seen on an ocean surface. The solution holds for periodic irrotational waves of finite amplitude in deep water that are symmetric about their crests. Without providing any details regarding the Fourier series from which the solution is approximated, the solution as provided by Crapper [crap84] is as follows:

1 3 z(x, t) = a cos() + -ka2 cos(20) + -k2a3 cos(30) + (2.24) 2 8

Here

Figure 2.8: Surface profile of Stokes's wave compared to a sinusoidal wave. by: -{kx-ut) (2.25)

The difference between Stokes's wave approximation to water wave forms and the sinu­ soidal wave are highlighted in Figure 2.8 ( on abscissa; z(x,t) on ordinate axis).

In the case of circular waves, the profile is applied on straight lines joining the origin to all points on a circle of radius r, with the crests at r. The radius is based on the current phase and the profile is computed along the range r — | to r -f | where A is the wavelength of the wave. Figure 3.2 (a) indicates how this profile is applied to a circle and Section 3.3.3 discusses the approach further. Chapter 3

Graphical Model of Ship Wakes

When we mean to build, We first survey the plot, then draw the model; And when we see the figure of the house, then we must rate the cost of the erection; Which if we find outweighs ability, What do we then but draw anew the model In fewer offices, or at last desist To build at all? -Shakespeare, Henry IV, Part 2

This chapter describes the graphical model used to implement ship wakes. The goal is to produce a realistic-looking wake for a ship moving on an arbitrary course. After introducing the model, a convenient way of specifying the path is presented. This is followed by a description of the two techniques employed to generate circular waves and their effect on the wake profile.

21 Chapter 3. Graphical Model of Ship Wakes 22

3.1 Introduction

In determining the stationary phase condition (2.5), Stoker computes the integrated effect of all point impulses along the path. With rj(x, y) representing the surface elevation at a point P(x, y), this is shown to be:

fT t3 gt2 r)(x,y) = k —sin—dt (3.1) 0 Jo r4 4r

for a constant k0, at time t and at points a distance r from where the impulse was applied at time t = 0 (Figure 2.1).

The model being presented here is based on the above approach: the model superimposes circular waves emanating from points along the ship's path in an effort to determine the wake profile. The expression within the integral (3.1), however, is simplified by assigning a maximum value to the amplitude of a circle with r « 0 and reducing the amplitude for each circle using a decay function as r increases with t.

3.2 Ship Path Specification

The ship's path is conveniently represented by a parametric piecewise cubic curve. While B-splines are the traditional way to represent curves, for the purpose of the ship wake model, a single Bezier curve segment suffices. In any case, they are both equivalent. Unlike its B-spline counterparts, the Bezier has the advantage of having the outer control points lie on the curve itself. This is useful in being able to manipulate initial and final positions of the ship. Apart from specifying the path, a mechanism is needed to specify equally spaced intervals along the path from where circular waves can then be generated. This is accomplished by approximating the arc-length parameterization of the curve. Chapter 3. Graphical Model of Ship Wakes 23

3.2.1 The Bezier curve

The Bezier is one of the family of cubic polynomial curves popular in graphics applica­ tions. A single cubic Bezier curve segment has four control points. The curve interpolates the outer control points and approximates the remaining two.

The familiar representation of a curve segment for a cubic polynomial is the product Q(t) = T • M • G. Here, T is a four-element row vector of the parameter t ranging from degree 0to3,Misa4x4 matrix called a basis matrix and G is a four-element column vector called the geometry vector [fole90]. The expanded product is shown below:

' G ' mn rn12 m^ mu x

mn mn rnn m14 G2 Q(t) = x{t) y(t) z{t) t3 t2 t 1 (3.2) mn rn12 mi3 mu G3

G mn w-12 wii3 mi4 . * . The elements of the basis matrix are constant and in the case of the Bezier are:

-13-3 1 3-630 M = (3.3) -3300 10 0 0

The geometry vector is used to define geometric constraints on the curve. Changes in Gn 1 < n < 4 which are themselves vectors, change the shape of the curve. These vectors, hence represent the control points, and users are allowed to manipulate them to adjust the shape of the path. Q(t) is therefore simply an expression of three cubic polynomials in t; as t is varied from 0 to 1, Q(t) defines the position on the curve. Chapter 3. Graphical Model of Ship Wakes 24

3.2.2 Arc-length parameterization

Using the Bezier, a path for the ship can easily be defined. However, (3.1) specifies the superposition of an infinite number of circles along the curve. Of course, the number of circles used will be finite, but then a problem arises in attempting to generate circles that are equally spaced. This is shown in Figure 3.1 (a). The figure shows a Bezier curve with 30 segments drawn using regular parameterization, i.e. for t = 0, ^, Jj,..., 1.0. Depending on the position of the control points (shown in filled circles), regular parame­ terization may not position equally spaced parameter values equal distances apart. The solution is to incorporate arc-length parameterization which parameterizes based on the length s of the curve.

Appendix A.1 illustrates an ad hoc, but simple technique for arc-length parameterization. It should be noted that this approach is quite expensive and faster approximate methods are available [wait95]. The technique involves determining s, the magnitude of the curve and then finding the value of the regular parameter t for each of the n segments at a distance ^ apart. This is accomplished by starting with to = 0 and incrementing t by a very small value 8t (6t

The result of employing arc-length parameterization to the curve in Figure 3.1 (a) is shown in Figure 3.1 (b).

3.3 Techniques Used to Generate Circular Waves

Given a position on the ship's path, a circle is generated with a particular amplitude and radius that represents a circular wave emanating from that point. The circles are Chapter 3. Graphical Model of Ship Wakes 25

M

i©^rK

(a) (b)

Figure 3.1: Effect of arc-length parameterization on curve drawn using two different methods; one uses a midpoint circle algorithm and the other computes a profile for the circles using Stokes's wave.

3.3.1 Calculating radius and amplitude of the circles

Before determining the radius of the circles, it is necessary to point out how time fac­ tors into the model. The approach is simple: circles are generated equal time intervals apart, regardless of parameterization. Since arc-length parameterization parameterizes the curve based on distance, the effect is essentially to produce constant velocity along the path. In the case of regular parameterization, distance along the curve is again in­ dicative of the velocity of the ship; depending on how the control vertices of the curve are positioned, if the distance between consecutive equally spaced parameter values reduces, the ship decelerates, if it increases, the ship accelerates. Chapter 3. Graphical Model of Ship Wakes 26

The radius of each circle is increased subject to the constraint that it grows by one-third the distance traveled by the boat. Therefore, regardless of the velocity of the vessel, as long as it remains constant, a wedge angle of 19°28' is obtained.

The amplitude is related to the wavelength A used to compute the profile. According to Crapper [crap84], one measure for amplitude, at least for linear solutions of progressive waves in deep water, is: ak < 2 (3.4) where a represents the amplitude and k the wave number. The case for the non-linear Stokes's Wave is not investigated here. For the purposes of this model the amplitude is restricted to one seventh the wavelength which is consistent with (3.4) above and is the theoretical limit for waves on the ocean [crap84].

Finally, the amplitude of the circles decays as a function of 4^ which is not entirely arbitrary, but based on what Stoker considers the order of magnitude for wave amplitude at the boundary of the disturbed region [stok57].

3.3.2 Midpoint circle scan-conversion algorithm

Pseudocode for the midpoint circle algorithm based on Bresenham's incremental circle generator is provided in [fole90].

The algorithm is convenient to implement as it requires only a position for the center of the circle, its radius, and a value to attribute to the pixels, or in this case amplitude to assign to points on a grid that represents the water surface.

The center of the circle lies on the path and, for the case of the vessel traveling at constant velocity, its position is obtained from s following arc-length parameterization as discussed in Section 3.2.2. The wavelength and amplitude attributed to the circles is Chapter 3. Graphical Model of Ship Wakes 27

as described in Section 3.3.1.

3.3.3 Computing a profile for circles

The midpoint circle scan-conversion algorithm gives rise to circles whose crests are only one grid point thick. To obtain a closer semblance to a circular wave, an entire profile for each individual circle is computed. To be able to do this efficiently one would hope to compute the value of the amplitude for only those grid points that lie within the extent of the profile. The extent is the wavelength A attributed to the profile and restricts the amplitude computation to a region that is the difference of two rectangles as shown in Figure 3.2 (a). All grid-points within this region can be sampled and assigned an amplitude based on the profile of a sinusoidal wave or Stokes's wave. To ensure no points in the profile are missed, for a circle of given radius r, the outer rectangle circumscribes a circle with radius r + A, whereas the inner rectangle in inscribed within a circle of radius r — A. Figure 3.2 (b) shows the region surrounding a single circular wave as determined by the model. Chapter 3. Graphical Model of Ship Wakes 28

Inner Clipping Rectangle ; ; ; : ; J, ~ 1"! ! • 1-J4 ! ! ! !

-"i""""! : r~7r^v^ : : : :\ : rrifrPfttrk \ \ .J..J.M..L.LA —!"—i—1"""i—:—*"" \ .-.3.-4" •tH" 4...L..4..

' Grid Points used Outer Clipping Rectangle for p^e Calculation

(a) (b)

Figure 3.2: Clipped region for circle profile calculation Chapter 4

Results

Annual income twenty pounds, annual expenditure nineteen ninety six, result happiness. Annual income twenty pounds, annual expenditure twenty pounds ought and six, result misery. [Mr. Micawber] -Charles Dickens, David Copperfield

This chapter shows and analyzes the results obtained from the graphical model described in Chapter 3. Waves are generated for the ship moving along a path using the techniques explained in Section 3.3. The surface is represented by a 64x64 size polygon mesh which proves suitable for demonstrating the working model. A larger mesh would have the benefit of reducing aliasing effects, while increasing the relative time to generate the animation. Different sets of results are obtained by varying the path and number of circles superposed to produce a wake. Unless otherwise indicated, 30 circles are employed in generating the wake for each image. Where a profile is computed, Stokes's wave is used. It has a wavelength that spans roughly four to five grid points and gives rise to a smooth crest. For all cases, except those of Section 4.3 the path is parameterized using arc-length, thus the results are for a vessel traveling at constant velocity. To show how the model supports changes in velocity, images showing the effect of decreasing, or

29 Chapter 4- Results 30

increasing the velocity are included in Section 4.3.

4.1 Varying the Path

Figure 4.1 (a) shows results obtained for a straight course employing Bresenham's circle drawing algorithm, Figure 4.1 (b) for the same course when a profile is computed for the circles using Stokes's wave. Figure 4.1 (c) and (d) show filtered images of 4.1 (a) and (b) respectively using a 3 x 3 Gaussian filter kernel.

Figure 4.2 (a) and (b) provide results for a curved path that does not self-intersect. Figure 4.2 (c) and (d) filter the results obtained.

The constraints on the path are only those imposed by the Bezier curve itself and for the purposes of demonstrating the model, these are insignificant. Figure 4.3 (a) and (b) and (c) and (d) show another application of the two methods, this time for a path that self-intersects.

In comparing the results for the two techniques, the visibility of the individual circles, for Bresenham's algorithm is apparent. Since the circles in this case are but a grid point thick, their interaction is limited. Filtering the data improves results dramatically by applying a Gaussian function to smoothen the individual circles.

The boundary of the region is more noticeable when a profile is computed using Stokes's wave. At the edges, there is negative displacement of the surface that accentuates the profile for the superposed circular waves. The heightened perturbation throughout the course results in a more convincing image of the wake. The filtering here also improves the results obtained. Chapter A. Results 31

(a) (b)

(c) (d)

Figure 4.1: Images obtained for a straight course before and after filterinc Chapter A. Results 32

(a) (b)

(c) (d)

Figure 4.2: Images obtained for a curved path before and after filtering Chapter A. Results 33

(a) (b)

(c) (d)

Figure 4.3: Images obtained for a self-intersecting path before and after filtering. Chapter 4- Results 34

4.2 Changing the Number of Circles

The effects of varying the number of circles to produce a wake are shown in Figure 4.4. Figures in the left column are the result of superposing 10 circles, those on the right superpose 30 circles. The circles in (a) and (b) were generated using Bresenham's algo­ rithm, (c) and (d) using a sinusoidal profile, and finally (e) and (f) using Stokes's Wave approximation. Chapter 4- Results 35

(a) (b)

(c) (d)

(f) Figure 4.4: Showing effect of number of circles on the wake Chapter 4- Results 36

4.3 Effect of Acceleration and Deceleration on Wake Produced

Figures 4.5 and 4.6 show the effects of manipulating the control vertices of the path to visualize deceleration and acceleration respectively. Figure 4.5 shows a path whose control points have been adjusted such that points on the path—separated by equal time intervals—are a smaller distance apart than those at the beginning. The result is deceleration and the effects are visible by comparing (a) and (b). (a) shows the same path parameterized by arc-length; (b) using regular parameterization. Figure 4.5 (c) and (d) allow the individual circles to be visualized for (c) and (d) respectively by replacing the profile with a circle.

Just as for the case of deceleration, Figure 4.6 shows a path for which the control points have been adjusted such that points on the path are a larger distances apart. A much narrower wake is produced in (b) which is a result of superposing the circles in (d). Chapter A. Results 37

(a) (b)

(c) (d)

Figure 4.5: Wake produced by a vessel that is decelerating Chapter 4. Results

(a)

(c)

Figure 4.6: Wake produced a vessel that is accelerating Chapter 5

Conclusion

Thou, too, sail on, O Ship of State! Sail on, O Union, strong and great! Humanity with all its fears, With all the hopes of future years, Is hanging breathless on thy fate! -Henry Wadsworth Longfellow, 1807-1882

A simple model for ship wakes has been presented. By allowing an arbitrary path to be specified a wake can be generated and displayed on a polygonal mesh. An animation of the results has been produced in real-time on an IRIS Crimson supporting VGX Graphics.

While currently not implemented, the height field obtained from the model would need to be interfaced with a modeler such as the Advanced Visualizer from Wavefront Technolo­ gies, Inc. or Alias V. 3.1 System from Alias Research, Inc. This would allow animators to produce a wake pattern for a given course traversed by a vessel without having to model the wake explicitly.

The subject of integrating the model with others is also one that needs to be considered.

39 Chapter 5. Conclusion 40

Interesting results could be obtained by combining the the wake model with an ocean wave model [four86]. A little more ambitious goal would be the integration of these wakes with images of real waves. One could extract normal information from the shade on the real picture and combine it with the geometry form the wake model presented here to reshade the water surface accordingly.

5.1 Future Work

Some goals for this work have been outlined in Section 1.2. This thesis has addressed the issues concerned with arbitrary path specification and concludes by returning to some of the other criteria listed in Section 1.2 as they would pertain to the present model.

• Shape of the vessel Keeping in mind that the model simplifies the ship to a point source one can immediately see the need to consider a more complex shape. For starters one could implement the source as a collection of point sources. The idea could be extended further to produce the outline of an entire hull using point sources; each of which would influence the wake depending on their normals to the direction of motion of the ship.

• Depth of water An additional parameter could be introduced that would affect the wavelength of the circular waves depending on depth of water. For deep water moving at constant velocity there would be no change in the model, however, for shallow water the wavelengths would increase giving rise to refraction effects apparent at the shore.

• Speed of the vessel While speed of the vessel does influences the wake produced by the model, the Chapter 5. Conclusion 41

approach is not accurate. Waves of small amplitudes travel on the water surface at speeds that can be approximated by:

c=\/fc (5-1]

where g is the acceleration due to gravity, and A the wavelength of the waves. Ideally, one would generate circular waves whose wavelengths would be related to the speed of the vessel, but then they would propagate as given by (5.1) above. Appendix A

Algorithms

A.l Pseudocode for Arc-Length Parameterization

var segments: integer; precision: integer; {precision » segments} t_arr: array[0..segments-l] of real; {stores intervals of the regular parameter} d_arr: array[0..segments-l] of real; {stores corresponding parameter values for arc-length} procedure Arc-Length-Parameterization(curve: Bezier); {Bezier represents a type that defines the matrices M and G representing a Bezier curve. find_length(Bezier curve, float t) returns the length of the curve for values of the regular parameter ranging from 0 to t (1.0 is the maximum for t). To do this it divides the curve into t/precision segments and sums the distance between each of these segments.} var magnitude: real; {length of curve} t: real; {current value of regular parameter}

42 Appendix A. Algorithms 43

s: real; {current value of arc-length parameter} s_incr, t_incr, prev, curr_t_incr: real; i: integer; begin magnitude := find_length(curve, 1.0); s_incr := magnitude/segments; t_incr := 1.0/precision; s := 0.0; t := t_incr; t_arr[0] := 0.0; d_arr[0] := 0.0; i := 1; while(i < segments) do begin s := s + s_incr; magnitude := find_length(curve, t); prev := magnitude; while(magnitude < s) do begin t := t + t_incr; prev := magnitude; magnitude := find_length(curve, t) ; end if(magnitude=prev) then begin curr_t_incr := 0.0; end else begin {interpolate value of t_incr} curr_t_incr := (s-prev)/(magnitude-prev)*t_incr; end t_arr[i] := (t-t_incr)+curr_t_incr; d_arr[i] := s; i := i + 1; end t_arr[segments] := 1.0; d_arr[segments] := magnitude; end Bibliography

[bald81] G. R. Baldock. Mathematical Theory of Wave Motion. Ellis Horwood, Chich­ ester, West Sussex, England, 1981.

[crap84] Gordon David Crapper. Introduction to Water Waves. Ellis Horwood, Chich­ ester, West Sussex, England, 1984.

[fole90] James D. Foley, Andries van Dam, Steven K. Feiner, and John F. Hughes. Computer Graphics: Principles and Practice. Addison-Wesley Publishing Company, second edition, 1990.

[four86] A. Fournier and W.T. Reeves. "A Simple Model of Ocean Waves". Proceedings of SIGGRAPH '86, pp. 75-84, August 1986.

[gate94] W. F. Gates. "Interactive Flow Field Modeling for the Design and Control of Fluid Motion in Computer Animation". M.Sc. thesis, Department of Com­ puter Science, University of British Columbia, January 1994.

[goss90] Michael E. Goss. "A Real Time Particle System for Display of Ship Wakes". IEEE Computer Graphics and Applications, Vol. 10, No. 5, pp. 30-35, May 1990.

[kass90] Michael Kass and Gavin Miller. "Rapid, Stable, for Computer Graphics". Proceedings of SIGGRAPH '90, pp. 49-58, August 1990.

[kelv87] Sir William Thomson Kelvin. "On the Waves Produced by a Single Impulse in Water of any Depth, or in a Dispersive Medium". Proceedings of the Royal Society of London, Ser A, Vol. 42, pp. 80-85, 1887.

[kins65] Blair Kinsman. Wind Waves. Prentice-Hall, Englewood Cliffs, N. J., 1965.

[kost68] Aleksandr Aleksandrovich Kostyukov. Theory of Ship Waves and Wave Re­ sistance. Effective Communications Inc., Iowa City, Iowa, 1968.

44 [mast87] G. A. Masten, P. A. Watterberg, and I. F. Mareda. "Fourier Synthesis of Ocean Scenes". IEEE Computer Graphics and Applications, Vol. 7, No. 3, pp. 317-324, February 1987.

[max81] N.L. Max. "Vectorized Procedural Models for Natural Terrain: Waves and Islands in the Sunset". Proceedings of SIGGRAPH '81, pp. 317-324, August 1981.

[mich69] F. C. Michelsen. "Three Recent Papers by Japanese Authors on the Effects of Bulbs on Wave-Making Resistance of Ships". Reprinted Under Contract With U.S. Department of Commerce Maritime Administration, Washington, D.C., 1969.

[newm77] John Nicholas Newman. Marine Hydrodynamics. The MIT Press, Cambridge, Massachusetts, 1977. [nort82] A. Norton, A. P. Rockwood, and P. T. Skolmoski. "Clamping—A Method of Antialiasing Textured Surfaces by Bandwidth Limiting in Object Space". Proceedings of SIGGRAPH '82, pp. 1-8, July 1982.

[peac86] Darwyn R. Peachey. "Modeling Waves and Surf". Proceedings of SIGGRAPH '86, pp. 65-74, August 1986.

[perl85] K. Perlin. "An Image Synthesizer". Proceedings of SIGGRAPH '85, pp. 287- 296, July 1985.

[prus93] Przemyslaw Prusinkiewicz, Mark S. Hammel, and Eric Mjolsness. "Animation of Plant Development". Proceedings of SIGGRAPH '93, pp. 351-360, August 1993.

[prus94] Przemyslaw Prusinkiewicz, Mark James, and Radomir Mech. "Synthetic Top­ iary". Proceedings of SIGGRAPH '94, pp. 362-369, July 1994. reev83] W. T. Reeves. "Particle Systems—A Technique for Modeling a Class of Fuzzy Objects". Proceedings of SIGGRAPH '83, pp. 359-376, July 1983. scha80] B. Schachter. "Long Crested Wave Models". Computer Graphics and Image Processing, Vol. 12, pp. 187-201, 1980. sher56] F. S. Sherman, editor. Symposium on Naval Hydrodynamics. National Academy of Sciences—National Research Council, Washington, D.C., Septem­ ber 1956.

45 [shin92] Mikio Shinya and Alain Fournier. "Stochastic Motion — Motion Under the Influence of Wind". Computer Graphics Forum (EUROGRAPHICS '92 Pro­ ceedings), Vol. 11, No. 3, pp. 119-128, September 1992.

[stok57] James Johnston Stoker. Introduction to Water Waves. Interscience Publishers Inc., New York, 1957.

[ts'o87] Pauline Y. Ts'o and Brian A. Barsky. "Modeling and Rendering Waves: Wave- tracing Using Beta-Splines and Reflective and Refractive Texture Mapping". ACM Transactions on Graphics, Vol. 6, No. 3, pp. 191-214, July 1987.

[walk88] Jearl Walker. "The Amateur Scientist: The Feathery Wake of a Moving Boat is a Complex Interference Pattern". Scientific American, Vol. 258, No. 2, pp. 124-127, February 1988.

[walt95] Marcelo Walter and Alain Fournier. "Computing Arc-Length Parametriza- tions", 1995.

[whit80] T. Whitted. "An Improved Illumination Model for Shaded Display". Comu- nications of The ACM, Vol. 23, No. 6, pp. 343-349, June 1980.

46