PATENT ABSTRACT
Systems and methods for modeling wellbore trajectories, which can be used to model corresponding drillstring trajectories and transform the torque-drag drill string model into a full stiff-string formulation.

PATENT DESCRIPTION
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority from U.S. Provisional Patent Application No. 61/014,362, filed on Dec. 17, 2007, which is incorporated herein by reference. 
     
    
     STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH 
       [0002]    Not applicable. 
       FIELD OF THE INVENTION 
       [0003]    The present invention generally relates to modeling wellbore trajectories. More particularly, the present invention relates to the use of spline functions, derived from drill string solutions, to model wellbore trajectories. 
       BACKGROUND OF THE INVENTION 
       [0004]    Wellbore trajectory models are used for two distinct purposes. The first use is planning the well location, which consists of determining kick-off points, build and drop rates, and straight sections needed to reach a specified target. The second use is to integrate measured inclination and azimuth angles to determine a well&#39;s location. 
         [0005]    Various trajectory models have been proposed, with varying degrees of smoothness. The simplest model, the tangential model, consists of straight line sections. Thus, the slope of this model is discontinuous at survey points. The most commonly used model is the minimum curvature model, which consists of circular-arc sections. This model has continuous slope, but discontinuous curvature. In fact, the minimum curvature model argues that a wellbore would not necessarily have continuous curvature. 
         [0006]    Analysis of drillstring loads is typically done with drillstring computer models. By far the most common method for drillstring analysis is the “torque-drag” model originally described in the Society of Petroleum Engineers article “Torque and Drag in Directional Wells—Prediction and Measurement” by Johancsik, C. A., Dawson, R. and Friesen, D. B., which was later translated into differential equation form as described in the article “Designing Well Paths to Reduce Drag and Torque” by Sheppard, M. C., Wick, C. and Burgess, T. M. 
         [0007]    Torque-drag modeling refers to the torque and drag related to drillstring operation. Drag is the excess load compared to rotating drillstring weight, which may be either positive when pulling the drillstring or negative while sliding into the well. This drag force is attributed to friction generated by drillstring contact with the wellbore. When rotating, this same friction will reduce the surface torque transmitted to the bit. Being able to estimate the friction forces is useful when planning a well or analysis afterwards. Because of the simplicity and general availability of the torque-drag model, it has been used extensively for planning and in the field. Field experience indicates that this model generally gives good results for many wells, but sometimes performs poorly. 
         [0008]    In the standard torque-drag model, the drillstring trajectory is assumed to be the same as the wellbore trajectory, which is a reasonable assumption considering that surveys are taken within the drillstring. Contact with the wellbore is assumed to be continuous. However, given that the most common method for determining the wellbore trajectory is the minimum curvature method, the wellbore shape is less than ideal because the bending moment is not continuous and smooth at survey points. This problem is dealt with by neglecting bending moment but, as a result of this assumption, some of the contact force is also neglected. 
         [0009]    Therefore, there is a need for a new wellbore trajectory model that has sufficient smoothness to model the drillstring trajectory. 
         [0010]    There is a further need to provide a new wellbore trajectory model that transforms the simple torque-drag drill string model into a full stiff-string formulation because, in this formulation, drill string bending and shear forces arise that cannot be determined correctly with conventional wellbore trajectory models. 
       SUMMARY OF THE INVENTION 
       [0011]    The present invention meets the above needs and overcomes one or more deficiencies in the prior art by providing systems and methods for modeling a wellbore trajectory, which can be used to model the corresponding drillstring trajectory and transform the torque-drag drill string model into a full stiff-string formulation. 
         [0012]    In one embodiment, the present invention includes a computer implemented method for modeling a wellbore trajectory, which comprises: i) calculating a tangent vector interpolation function for each interval between two or more survey points within a wellbore using a wellbore curvature, a tangent vector and a normal vector at each respective survey point; and (ii) determining the wellbore trajectory using each tangent vector interpolation function in a torque-drag drillstring model. 
         [0013]    In another embodiment, the present invention includes a computer readable medium having computer executable instructions for modeling a wellbore trajectory. The instructions are executable to implement: i) calculating a tangent vector interpolation function for each interval between two or more survey points within a wellbore using a wellbore curvature, a tangent vector and a normal vector at each respective survey point; and (ii) determining the wellbore trajectory using each tangent vector interpolation function in a torque-drag drillstring model. 
         [0014]    In yet another embodiment, the present invention includes a computer implemented method for modeling a wellbore trajectory, which comprises: i) calculating a tangent vector at each survey point within a wellbore using survey data at each respective survey point, the wellbore comprising two or more survey points; ii) calculating a special normal vector and a special binormal vector at each survey point; iii) calculating a block tridiagonal matrix using the tangent vector, the special normal vector, and the special binormal vector at each respective survey point; iv) calculating a coefficient at each survey point in the direction of the special normal vector at the respective survey point and another coefficient at each survey point in the direction of the special binormal vector at the respective survey point using the block tridiagonal matrix; v) calculating a wellbore curvature at each survey point and a normal vector at each survey point using a first derivative of the tangent vector, the coefficient and the another coefficient at each respective survey point; vi) calculating a tangent vector interpolation function for each interval between the survey points using the wellbore curvature, the tangent vector and the normal vector at each respective survey point; and vii) determining the wellbore trajectory using each tangent vector interpolation function in a torque-drag drillstring model. 
         [0015]    In yet another embodiment, the present invention includes a computer readable medium having computer executable instructions for modeling a wellbore trajectory. The instructions are executable to implement: i) calculating a tangent vector at each survey point within a wellbore using survey data at each respective survey point, the wellbore comprising two or more survey points; ii) calculating a special normal vector and a special binormal vector at each survey point; iii) calculating a block tridiagonal matrix using the tangent vector, the special normal vector, and the special binormal vector at each respective survey point; iv) calculating a coefficient at each survey point in the direction of the special normal vector at the respective survey point and another coefficient at each survey point in the direction of the special binormal vector at the respective survey point using the block tridiagonal matrix; v) calculating a wellbore curvature at each survey point and a normal vector at each survey point using a first derivative of the tangent vector, the coefficient and the another coefficient at each respective survey point; vi) calculating a tangent vector interpolation function for each interval between the survey points using the wellbore curvature, the tangent vector and the normal vector at each respective survey point; and vii) determining the wellbore trajectory using each tangent vector interpolation function in a torque-drag drillstring model. 
         [0016]    Additional aspects, advantages and embodiments of the invention will become apparent to those skilled in the art from the following description of the various embodiments and related drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0017]    The present invention is described below with references to the accompanying drawings in which like elements are referenced with like reference numerals, and in which: 
           [0018]      FIG. 1  is a block diagram illustrating one embodiment of a system for implementing the present invention. 
           [0019]      FIG. 2  is a graphical illustration comparing the analytic model, the minimum curvature model and the spline model of the present invention for a circular-arc wellbore trajectory. 
           [0020]      FIG. 3  is a graphical illustration comparing the analytic model, the minimum curvature model and the spline model of the present invention for a catenary wellbore trajectory. 
           [0021]      FIG. 4  is a graphical illustration comparing the analytic model, the minimum curvature model and the spline model of the present invention for a helix wellbore trajectory. 
           [0022]      FIG. 5  is a graphical illustration comparing the rate-of-change of curvature between an analytic model and the spline model of the present invention for a catenary wellbore trajectory. 
           [0023]      FIG. 6  is a graphical illustration comparing the torsion between an analytic model and the spline model of the present invention for a helix wellbore trajectory. 
           [0024]      FIG. 7  illustrates the test case wellbore used in Example 1. 
           [0025]      FIG. 8  is a graphical illustration comparing the bending moment between the minimum curvature model and the spline model of the present invention for the test case wellbore used in Example 1. 
           [0026]      FIG. 9A  is a graphical illustration (vertical view) of the short radius wellpath used in Example 2. 
           [0027]      FIG. 9B  is a graphical illustration (North/East view) of the short radius wellpath used in Example 2. 
           [0028]      FIG. 10  is a graphical illustration comparing the short radius contact force between a constant curvature model and the spline model of the present invention for the wellpath used in Example 2. 
           [0029]      FIG. 11  is a graphical illustration comparing the short radius bending moment between a constant curvature model and the spline model of the present invention for the wellpath used in Example 2. 
           [0030]      FIG. 12  is a flow diagram illustrating one embodiment of a method for implementing the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0031]    The subject matter of the present invention is described with specificity, however, the description itself is not intended to limit the scope of the invention. The subject matter thus, might also be embodied in other ways, to include different steps or combinations of steps similar to the ones described herein, in conjunction with other present or future technologies. Moreover, although the term “step” may be used herein to describe different elements of methods employed, the term should not be interpreted as implying any particular order among or between various steps herein disclosed unless otherwise expressly limited by the description to a particular order. 
       System Description 
       [0032]    The present invention may be implemented through a computer-executable program of instructions, such as program modules, generally referred to as software applications or application programs executed by a computer. The software may include, for example, routines, programs, objects, components, and data structures that perform particular tasks or implement particular abstract data types. The software forms an interface to allow a computer to react according to a source of input. WELLPLAN™, which is a commercial software application marketed by Landmark Graphics Corporation, may be used as an interface application to implement the present invention. The software may also cooperate with other code segments to initiate a variety of tasks in response to data received in conjunction with the source of the received data. The software may be stored and/or carried on any variety of memory media such as CD-ROM, magnetic disk, bubble memory and semiconductor memory (e.g., various types of RAM or ROM). Furthermore, the software and its results may be transmitted over a variety of carrier media such as optical fiber, metallic wire, free space and/or through any of a variety of networks such as the Internet. 
         [0033]    Moreover, those skilled in the art will appreciate that the invention may be practiced with a variety of computer-system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable-consumer electronics, minicomputers, mainframe computers, and the like. Any number of computer-systems and computer networks are acceptable for use with the present invention. The invention may be practiced in distributed-computing environments where tasks are performed by remote-processing devices that are linked through a communications network. In a distributed-computing environment, program modules may be located in both local and remote computer-storage media including memory storage devices. The present invention may therefore, be implemented in connection with various hardware, software or a combination thereof, in a computer system or other processing system. 
         [0034]    Referring now to  FIG. 1 , a block diagram of a system for implementing the present invention on a computer is illustrated. The system includes a computing unit, sometimes referred to as a computing system, which contains memory, application programs, a client interface, and a processing unit. The computing unit is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the invention. 
         [0035]    The memory primarily stores the application programs, which may also be described as program modules containing computer-executable instructions, executed by the computing unit for implementing the methods described herein and illustrated in  FIGS. 2-12 . The memory therefore, includes a Wellbore Trajectory Module, which enables the methods illustrated and described in reference to  FIGS. 2-12 , and WELLPLAN™. 
         [0036]    Although the computing unit is shown as having a generalized memory, the computing unit typically includes a variety of computer readable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. The computing system memory may include computer storage media in the form of volatile and/or nonvolatile memory such as a read only memory (ROM) and random access memory (RAM). A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computing unit, such as during start-up, is typically stored in ROM. The RAM typically contains data and/or program modules that are immediately accessible to, and/or presently being operated on by, the processing unit. By way of example, and not limitation, the computing unit includes an operating system, application programs, other program modules, and program data. 
         [0037]    The components shown in the memory may also be included in other removable/nonremovable, volatile/nonvolatile computer storage media. For example only, a hard disk drive may read from or write to nonremovable, nonvolatile magnetic media, a magnetic disk drive may read from or write to a removable, non-volatile magnetic disk, and an optical disk drive may read from or write to a removable, nonvolatile optical disk such as a CD ROM or other optical media. Other removable/non-removable, volatile/non-volatile computer storage media that can be used in the exemplary operating environment may include, but are not limited to, magnetic tape cassettes, flash memory cards, digital versatile disks, digital video tape, solid state RAM, solid state ROM, and the like. The drives and their associated computer storage media discussed above therefore, store and/or carry computer readable instructions, data structures, program modules and other data for the computing unit. 
         [0038]    A client may enter commands and information into the computing unit through the client interface, which may be input devices such as a keyboard and pointing device, commonly referred to as a mouse, trackball or touch pad. Input devices may include a microphone, joystick, satellite dish, scanner, or the like. 
         [0039]    These and other input devices are often connected to the processing unit through the client interface that is coupled to a system bus, but may be connected by other interface and bus structures, such as a parallel port or a universal serial bus (USB). A monitor or other type of display device may be connected to the system bus via an interface, such as a video interface. In addition to the monitor, computers may also include other peripheral output devices such as speakers and printer, which may be connected through an output peripheral interface. 
         [0040]    Although many other internal components of the computing unit are not shown, those of ordinary skill in the art will appreciate that such components and their interconnection are well known. 
       Method Description 
       [0041]    Unlike prior wellbore trajectory models, the present invention proceeds from the concept that the trajectory given by the survey measurements made within the drillstring is the trajectory of the drillstring, which must have continuity of bending moment proportional to curvature. The nomenclature used herein is described in the Society of Petroleum Engineers article “Drillstring Solutions Improve the Torque-Drag Model” by Mitchell, Robert F. (“SPE 112623”), which is incorporated herein by reference and repeated in Table 1 below. 
         [0000]    
       
         
               
               
               
             
           
               
                   
                 TABLE 1 
               
               
                   
                   
               
             
             
               
                   
                 {right arrow over (b)} 
                 binormal vector 
               
               
                   
                 {tilde over (b)} 
                 special binormal vector 
               
               
                   
                 E 
                 Young&#39;s elastic modulus (psf) 
               
               
                   
                 F 
                 the effective axial force (lbf.) 
               
               
                   
                 {tilde over (F)} 
                 F − EIκ 2   
               
               
                   
                 I 
                 moment of inertia (ft 4 ) 
               
               
                   
                 {right arrow over (i)} E   
                 unit vector in east direction 
               
               
                   
                 {right arrow over (i)} N   
                 unit vector in north direction 
               
               
                   
                 {right arrow over (i)} Z   
                 unit vector in downward direction 
               
               
                   
                 {right arrow over (n)} 
                 normal vector 
               
               
                   
                 ñ 
                 special normal vector 
               
               
                   
                 s 
                 measured depth (ft) 
               
               
                   
                 {right arrow over (t)} 
                 tangent vector 
               
               
                   
                 {right arrow over (T)} 
                 spline tangent vector function 
               
               
                   
                 {right arrow over (u)} 
                 position vector, (ft) 
               
               
                   
                 {right arrow over (u)} j   0   
                 initial position vector, increment j (ft) 
               
               
                   
                 α j   
                 coefficient in ñ direction (ft −1 ) 
               
               
                   
                 β j   
                 coefficient in {tilde over (b)} direction (ft −1 ) 
               
               
                   
                 Δs j   
                 s j+1  − s j  (ft) 
               
               
                   
                 λ j   
                 Coefficient in spline functions 
               
               
                   
                 ε j   
                 angle between {right arrow over (n)} and ñ 
               
               
                   
                 κ 
                 wellbore curvature (ft −1 ) 
               
               
                   
                 φ 
                 wellbore trajectory inclination angle 
               
               
                   
                 Θ 
                 wellbore trajectory azimuth angle 
               
               
                   
                 ξ j   
                 (s − s j )/(s j+1  − s j ) 
               
               
                   
                 {acute over ( )} 
                 d/ds 
               
               
                   
                 
                   IV 
                 
                 d 4 /ds 4   
               
               
                   
                 subscripts 
               
               
                   
                 j 
                 survey point 
               
               
                   
                   
               
             
          
         
       
     
         [0042]    The use of cubic splines is well known in the art for achieving higher continuity in a trajectory model. If, for example, a table of {x i ,y i } is used, intermediate values of y as a function of x may be determined by linear interpolation: 
         [0000]    
       
         
           
             
               
                 
                   
                     y 
                      
                     
                       ( 
                       x 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         y 
                         j 
                       
                        
                       
                         ( 
                         
                           
                             
                               x 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             - 
                             x 
                           
                           
                             
                               x 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             - 
                             
                               x 
                               j 
                             
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         y 
                         
                           j 
                           + 
                           1 
                         
                       
                        
                       
                         ( 
                         
                           
                             x 
                             - 
                             
                               x 
                               j 
                             
                           
                           
                             
                               x 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             - 
                             
                               x 
                               j 
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where the interpolation occurs between x j  and x j+1 . If it is desired that the interpolation have smooth first and second derivatives at the x j  points, the interpolation may be: 
         [0000]        y ( x )= y   j   f   1 ( x )+ y″   j   f   2 ( x )+ y   j+1   f   3 ( x )+ y″   j+1   f   4 ( x )   (2) 
         [0000]    where the functions f j  are devised so that: 
         [0000]        y ( x   j )= y   j    (3) 
         [0000]        y ( x   j−1 )= y   j+1    
         [0000]        y ″( x   j )= y″   j    
         [0000]        y ″( x   j+1 )= y″   j+1    
         [0043]    In the classic cubic spline formulation, the f j  are cubic functions of x and the unknown coefficients y″ j  are determined by requiring continuity of the first derivatives of y(x) at each x j . Here the functions in equation (2) need not be cubic functions. They must only satisfy equations (3). The use of spline formulations such as, for example, cubic splines and tangent splines to model wellbore trajectories is well known in the art. The determination of the wellbore trajectory from survey data, however, is not. Furthermore, the use of conventional splines, as applied to a three-dimensional curve, will not satisfy equation (5) and equation (6). 
         [0044]    Once survey data is obtained, the tangent vector  t   j  at each survey point j can be calculated. One formula for interpolating the tangent vectors is: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           t 
                           _ 
                         
                         j 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             T 
                             _ 
                           
                           j 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                       
                         
                           
                             
                               
                                 T 
                                 _ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                             
                               
                                 T 
                                 _ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         T 
                         j 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             t 
                             _ 
                           
                           j 
                         
                          
                         
                           
                             f 
                             
                               1 
                                
                               j 
                             
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           κ 
                           j 
                         
                          
                         
                           
                             n 
                             _ 
                           
                           j 
                         
                          
                         
                           
                             f 
                             
                               2 
                                
                               j 
                             
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           
                             t 
                             _ 
                           
                           
                             j 
                             + 
                             1 
                           
                         
                          
                         
                           
                             f 
                             
                               3 
                                
                               j 
                             
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           κ 
                           
                             j 
                             + 
                             1 
                           
                         
                          
                         
                           
                             n 
                             _ 
                           
                           
                             j 
                             + 
                             1 
                           
                         
                          
                         
                           
                             f 
                             
                               4 
                                
                               j 
                             
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where s is measured depth, κ j  is the curvature at s j , and {right arrow over (n)} j  is the normal vector at s j . This formulation has two purposes. The first purpose is to satisfy the Frenet equation for a curve (by suitable choice of functions f ij ): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                        
                       
                         
                           t 
                           _ 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                     
                        
                       s 
                     
                   
                   = 
                   
                     
                       κ 
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                      
                     
                       
                         n 
                         _ 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The second reason is to insure that s is indeed measured depth. This requirement means: 
         [0000]    
       
      
       du 
       1 
       2 
       +du 
       2 
       2 
       +du 
       3 
       2 
       =ds 
       2  
      
     
         [0000]    (an incremental change of position equals the incremental arc length) or, in terms of the tangent vectors: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         ( 
                         
                           
                              
                             
                               u 
                               1 
                             
                           
                           
                              
                             s 
                           
                         
                         ) 
                       
                       2 
                     
                     + 
                     
                       
                         ( 
                         
                           
                              
                             
                               u 
                               2 
                             
                           
                           
                              
                             s 
                           
                         
                         ) 
                       
                       2 
                     
                     + 
                     
                       
                         ( 
                         
                           
                              
                             
                               u 
                               3 
                             
                           
                           
                              
                             s 
                           
                         
                         ) 
                       
                       2 
                     
                   
                   = 
                   
                     
                       
                         
                            
                           
                             u 
                             _ 
                           
                         
                         
                            
                           s 
                         
                       
                       · 
                       
                         
                            
                           
                             u 
                             _ 
                           
                         
                         
                            
                           s 
                         
                       
                     
                     = 
                     
                       
                         
                           t 
                           _ 
                         
                         · 
                         
                           t 
                           _ 
                         
                       
                       = 
                       1 
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0045]    As demonstrated in the following section, equation (4) satisfies this condition. The details for determining the unknowns in equation (4), which are the normal vectors and the curvatures, are also addressed in the following section. 
       Spline Wellbore Trajectory 
       [0046]    The normal method for determining the well path is to use some type of surveying instrument to measure the inclination and azimuth at various depths and then to calculate the trajectory. At each survey point j, inclination angle φ j  and azimuth angle θ j  are measured, as well as the course length Δs j =s j+1 −s j  between survey points. Each survey point j therefore, includes survey data comprising an inclination angle φ j , an azimuth angle θ j  and a measured depth s. These angles have been corrected (i) to true north for a magnetic survey or (ii) for drift if a gyroscopic survey. The survey angles define the tangent  t   j  to the trajectory at each survey point j where the tangent vector is defined in terms of inclination φ j  and azimuth θ j  in the following formulas: 
         [0000]        {right arrow over (t)}   j   ·{right arrow over (i)}   N =cos(θ j )sin(φ j )   (7) 
         [0000]          t     j   ·ī   E =sin(θ j )sin(φ j ) 
         [0000]          t     j   ·ī   z =cos(φ j ) 
         [0047]    If it was known how the angles φ and θ varied between survey points, or equivalently, if it was known how the tangent vectors varied between survey points, then the trajectory could be determined by integrating the tangent vector: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           t 
                           _ 
                         
                         j 
                       
                       = 
                       
                         
                            
                           
                             
                               u 
                               _ 
                             
                             j 
                           
                         
                         
                            
                           s 
                         
                       
                     
                     , 
                     so 
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           u 
                           _ 
                         
                         j 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           u 
                           _ 
                         
                          
                         
                           o 
                           j 
                         
                       
                       + 
                       
                         
                           ∫ 
                           j 
                         
                          
                         
                           
                             
                               t 
                               _ 
                             
                             j 
                           
                            
                           
                               
                           
                            
                           
                              
                             s 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
         [0048]    Given tangent vectors  t   j  and {right arrow over (t)} j+1  and associated normal vectors  n   j  and {right arrow over (n)} j+1 , a tangent vector interpolation function connecting these vectors can be created. First, a set of interpolation functions f ij (s), s in [s j , s j+1 ], with the following properties, will be needed: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               
                                 f 
                                 
                                   1 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                             = 
                             1 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       1 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       j 
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                           , 
                         
                       
                       
                         
                           
                             
                               
                                 f 
                                 
                                   1 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       1 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       
                                         j 
                                         + 
                                         1 
                                       
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       2 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       j 
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             1 
                           
                           , 
                         
                       
                       
                         
                           
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       2 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       
                                         j 
                                         + 
                                         1 
                                       
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                             
                               
                                 f 
                                 
                                   3 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       3 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       j 
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                           , 
                         
                       
                       
                         
                           
                             
                               
                                 f 
                                 
                                   3 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                             = 
                             1 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       3 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       
                                         j 
                                         + 
                                         1 
                                       
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       4 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       j 
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             0 
                           
                           , 
                         
                       
                       
                         
                           
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                             = 
                             0 
                           
                           , 
                           
                             
                               
                                  
                                 
                                   
                                     f 
                                     
                                       4 
                                        
                                       j 
                                     
                                   
                                    
                                   
                                     ( 
                                     
                                       s 
                                       
                                         j 
                                         + 
                                         1 
                                       
                                     
                                     ) 
                                   
                                 
                               
                               
                                  
                                 s 
                               
                             
                             = 
                             1 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0049]    There are a variety of functions that satisfy equations (9). If the spline function T j (ξ) is defined as: 
         [0000]        T   j (ξ)=   t     j   f   1j ( s )+κ j     n     j   f   2j ( s )+   t     j+1   f   3j ( s )+κ j+1     n     j+1   f   4j ( s )   (10) 
         [0000]    it becomes clear that: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           T 
                           _ 
                         
                         j 
                       
                        
                       
                         ( 
                         
                           s 
                           j 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         t 
                         _ 
                       
                       j 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           T 
                           _ 
                         
                         j 
                       
                        
                       
                         ( 
                         
                           s 
                           
                             j 
                             + 
                             1 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         t 
                         _ 
                       
                       
                         j 
                         + 
                         1 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                            
                           
                             
                               T 
                               _ 
                             
                             j 
                           
                         
                         
                            
                           s 
                         
                       
                        
                       
                         ( 
                         
                           s 
                           j 
                         
                         ) 
                       
                     
                     = 
                     
                       
                         κ 
                         j 
                       
                        
                       
                         
                           n 
                           _ 
                         
                         j 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                            
                           
                             
                               T 
                               _ 
                             
                             j 
                           
                         
                         
                            
                           s 
                         
                       
                        
                       
                         ( 
                         
                           s 
                           
                             j 
                             + 
                             1 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         κ 
                         
                           j 
                           + 
                           1 
                         
                       
                        
                       
                         
                           n 
                           _ 
                         
                         
                           j 
                           + 
                           1 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The function T j  satisfies the Frenet equation: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                        
                       
                         
                           t 
                           _ 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                     
                        
                       s 
                     
                   
                   = 
                   
                     
                       κ 
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                      
                     
                       
                         n 
                         _ 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0000]    for a tangent vector at s=s j  and s j+1 . However, T j  is not a tangent vector because it is not a unit vector. This can be corrected by normalizing Tj: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         t 
                         _ 
                       
                       j 
                     
                      
                     
                       ( 
                       s 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         
                           T 
                           _ 
                         
                         j 
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     
                       
                         
                           
                             
                               T 
                               _ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                         · 
                         
                           
                             
                               T 
                               _ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where it is shown that equation (12) is still satisfied. In order to evaluate the curvatures κ j , equation (13) is differentiated twice and evaluated at s=s j  and s j+1 : 
         [0000]    
       
         
           
             
               
                 
                   
                       
                   
                    
                   
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             t 
                             ⇀ 
                           
                           j 
                         
                       
                       = 
                       
                         - 
                         
                           κ 
                           j 
                           2 
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             n 
                             ⇀ 
                           
                           j 
                         
                       
                       = 
                       
                         
                           
                             κ 
                             j 
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     2 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             
                               
                                 n 
                                 ⇀ 
                               
                               j 
                             
                             · 
                             
                               
                                 t 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     3 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             κ 
                             
                               j 
                               + 
                               1 
                             
                           
                            
                           
                             
                               n 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             · 
                             
                               
                                 n 
                                 ⇀ 
                               
                               j 
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     4 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                         
                     
                      
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             b 
                             ⇀ 
                           
                           j 
                         
                       
                       = 
                       
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             · 
                             
                               
                                 b 
                                 ⇀ 
                               
                               j 
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     3 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             κ 
                             
                               j 
                               + 
                               1 
                             
                           
                            
                           
                             
                               
                                 n 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             · 
                             
                               
                                 b 
                                 ⇀ 
                               
                               j 
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     4 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                         
                     
                      
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             t 
                             ⇀ 
                           
                           
                             j 
                             + 
                             1 
                           
                         
                       
                       = 
                       
                         - 
                         
                           κ 
                           
                             j 
                             + 
                             1 
                           
                           2 
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             n 
                             ⇀ 
                           
                           
                             j 
                             + 
                             1 
                           
                         
                       
                       = 
                       
                         
                           
                             κ 
                             
                               j 
                               + 
                               1 
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     4 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             
                               
                                 n 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             · 
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     1 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             κ 
                             j 
                           
                            
                           
                             
                               
                                 n 
                                 ⇀ 
                               
                               j 
                             
                             · 
                             
                               n 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     2 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                       
                     
                      
                     
                       
 
                     
                      
                     
                         
                     
                      
                     
                       
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 t 
                                 ⇀ 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                         · 
                         
                           
                             b 
                             ⇀ 
                           
                           
                             j 
                             + 
                             1 
                           
                         
                       
                       = 
                       
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                             · 
                             
                               
                                 b 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     1 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         + 
                         
                           
                             κ 
                             j 
                           
                            
                           
                             
                               
                                 n 
                                 ⇀ 
                               
                               j 
                             
                             · 
                             
                               
                                 b 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                           
                            
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 
                                   f 
                                   
                                     2 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Using the Frenet equation (12) and 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                          
                         
                           
                             n 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                          
                         s 
                       
                     
                     = 
                     
                       
                         
                           - 
                           
                             κ 
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           τ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             b 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     = 
                     
                       
                         
                           - 
                           
                             
                               κ 
                               2 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           
                             κ 
                             ′ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             n 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           κ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           τ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             b 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
         [0000]    it is evident that: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               j 
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         t 
                         ⇀ 
                       
                       j 
                     
                   
                   = 
                   
                     - 
                     
                       κ 
                       j 
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     a 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               j 
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         n 
                         ⇀ 
                       
                       j 
                     
                   
                   = 
                   
                     
                        
                       
                         κ 
                         j 
                       
                     
                     
                        
                       s 
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     b 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               j 
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         b 
                         ⇀ 
                       
                       j 
                     
                   
                   = 
                   
                     
                       κ 
                       j 
                     
                      
                     
                       τ 
                       j 
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     c 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         t 
                         ⇀ 
                       
                       
                         j 
                         + 
                         1 
                       
                     
                   
                   = 
                   
                     - 
                     
                       κ 
                       
                         j 
                         + 
                         1 
                       
                       2 
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     d 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         n 
                         ⇀ 
                       
                       
                         j 
                         + 
                         1 
                       
                     
                   
                   = 
                   
                     
                        
                       
                         κ 
                         
                           j 
                           + 
                           1 
                         
                       
                     
                     
                        
                       s 
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     e 
                   
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             
                               s 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     · 
                     
                       
                         b 
                         ⇀ 
                       
                       
                         j 
                         + 
                         1 
                       
                     
                   
                   = 
                   
                     
                       κ 
                       
                         j 
                         + 
                         1 
                       
                     
                      
                     
                       τ 
                       
                         j 
                         + 
                         1 
                       
                     
                   
                 
               
               
                 
                   ( 
                   
                     16 
                      
                     f 
                   
                   ) 
                 
               
             
           
         
       
     
         [0000]    The Frenet formulae, equation (15), are identically satisfied by equation (16a) and equation (16d). Before this set of equations can be solved for curvatures κ j , a representation for the normal vector ({right arrow over (n)} j ) and the binormal vector (  b   j ) is needed. The tangent vector is defined by the inclination angle (φ j ) and the azimuth angle (θ j ) in the following way: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       t 
                       ⇀ 
                     
                     j 
                   
                   = 
                   
                     [ 
                     
                       
                         
                           
                             sin 
                              
                             
                                 
                             
                              
                             
                               ϕ 
                               j 
                             
                              
                             cos 
                              
                             
                                 
                             
                              
                             
                               ϑ 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             sin 
                              
                             
                                 
                             
                              
                             
                               ϕ 
                               j 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             
                               ϑ 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             cos 
                              
                             
                                 
                             
                              
                             
                               ϕ 
                               j 
                             
                           
                         
                       
                     
                     ] 
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Then the Frenet equation (7) requires: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                              
                             
                                
                               s 
                             
                           
                            
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                         
                         = 
                           
                          
                         
                           
                             
                               [ 
                               
                                 
                                   
                                     
                                       cos 
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϕ 
                                         j 
                                       
                                        
                                       cos 
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϑ 
                                         j 
                                       
                                     
                                   
                                 
                                 
                                   
                                     
                                       cos 
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϕ 
                                         j 
                                       
                                        
                                       sin 
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϑ 
                                         j 
                                       
                                     
                                   
                                 
                                 
                                   
                                     
                                       
                                         - 
                                         sin 
                                       
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϕ 
                                         j 
                                       
                                     
                                   
                                 
                               
                               ] 
                             
                              
                             
                                
                               
                                  
                                 s 
                               
                             
                              
                             
                               ϕ 
                               j 
                             
                           
                           + 
                           
                             
                               [ 
                               
                                 
                                   
                                     
                                       
                                         - 
                                         sin 
                                       
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϑ 
                                         j 
                                       
                                     
                                   
                                 
                                 
                                   
                                     
                                       cos 
                                        
                                       
                                           
                                       
                                        
                                       
                                         ϑ 
                                         j 
                                       
                                     
                                   
                                 
                                 
                                   
                                     0 
                                   
                                 
                               
                               ] 
                             
                              
                             sin 
                              
                             
                                 
                             
                              
                             
                               ϕ 
                               j 
                             
                              
                             
                                
                               
                                  
                                 s 
                               
                             
                              
                             
                               ϑ 
                               j 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             κ 
                             j 
                           
                            
                           
                             
                               n 
                               ⇀ 
                             
                             j 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
           
         
       
     
         [0000]    From equation (12), the equation for the curvature κ j  becomes: 
         [0000]    
       
         
           
             
               
                 
                   
                     κ 
                     j 
                   
                   = 
                   
                     
                       
                         
                           ( 
                           
                             
                                
                               
                                  
                                 s 
                               
                             
                              
                             
                               ϕ 
                               j 
                             
                           
                           ) 
                         
                         2 
                       
                       + 
                       
                         
                           sin 
                           2 
                         
                          
                         
                           
                             
                               ϕ 
                               j 
                             
                              
                             
                               ( 
                               
                                 
                                    
                                   
                                      
                                     s 
                                   
                                 
                                  
                                 
                                   ϑ 
                                   j 
                                 
                               
                               ) 
                             
                           
                           2 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
         [0000]    We define the following quantities found in equation (18): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         n 
                         ~ 
                       
                       j 
                     
                     = 
                       
                      
                     
                       [ 
                       
                         
                           
                             
                               cos 
                                
                               
                                   
                               
                                
                               
                                 ϕ 
                                 j 
                               
                                
                               cos 
                                
                               
                                   
                               
                                
                               
                                 ϑ 
                                 j 
                               
                             
                           
                         
                         
                           
                             
                               cos 
                                
                               
                                   
                               
                                
                               
                                 ϕ 
                                 j 
                               
                                
                               sin 
                                
                               
                                   
                               
                                
                               
                                 ϑ 
                                 j 
                               
                             
                           
                         
                         
                           
                             
                               
                                 - 
                                 sin 
                               
                                
                               
                                   
                               
                                
                               
                                 ϕ 
                                 j 
                               
                             
                           
                         
                       
                       ] 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         b 
                         ~ 
                       
                       j 
                     
                     = 
                     
                       [ 
                       
                         
                           
                             
                               
                                 - 
                                 sin 
                               
                                
                               
                                   
                               
                                
                               
                                 ϑ 
                                 j 
                               
                             
                           
                         
                         
                           
                             
                               cos 
                                
                               
                                   
                               
                                
                               
                                 ϑ 
                                 j 
                               
                             
                           
                         
                         
                           
                             0 
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
           
         
       
     
         [0000]    These vectors are useful in defining the normal and binormal vectors. 
         [0050]    As provided above, {right arrow over (t)} j , ñ j , and {tilde over (b)} j  form a right-handed coordinate system at s j . The normal vector (  n   j ) and the binormal vector (  b   j ) can be defined by rotation through the angle ε j  around the tangent vector: 
         [0000]          n     j   =ñ   j  cos ε j   +{tilde over (b)}   j  sin ε j    (21) 
         [0000]          b     j   =−ñ   j  sin ε j   +{tilde over (b)}   j  cos ε j    
         [0000]    Then {right arrow over (n)} j  is a unit vector consistent with Frenet equation (5), given: 
         [0000]    
       
         
           
             
               
                 
                   
                     cos 
                      
                     
                         
                     
                      
                     
                       ɛ 
                       j 
                     
                   
                   = 
                   
                     
                       
                         1 
                         
                           κ 
                           j 
                         
                       
                        
                       
                          
                         
                            
                           s 
                         
                       
                        
                       
                         ϕ 
                         j 
                       
                        
                       
                           
                       
                        
                       and 
                        
                       
                           
                       
                        
                       sin 
                        
                       
                           
                       
                        
                       
                         ɛ 
                         j 
                       
                     
                     = 
                     
                       
                         
                           sin 
                            
                           
                               
                           
                            
                           
                             ϕ 
                             j 
                           
                         
                         
                           κ 
                           j 
                         
                       
                        
                       
                         
                            
                           
                               
                           
                         
                         
                            
                           s 
                         
                       
                        
                       
                         ϑ 
                         j 
                       
                     
                   
                 
               
               
                 
                   ( 
                   22 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The variables κ j  and ε j  are not the most convenient choices because of the nonlinearity introduced by the sine and cosine functions. An alternate selection may be: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         κ 
                         j 
                       
                        
                       
                         
                           n 
                           ⇀ 
                         
                         j 
                       
                     
                     = 
                     
                       
                         
                           α 
                           j 
                         
                          
                         
                           
                             n 
                             ~ 
                           
                           j 
                         
                       
                       + 
                       
                         
                           β 
                           j 
                         
                          
                         
                           
                             b 
                             ~ 
                           
                           j 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       α 
                       j 
                     
                     = 
                     
                       
                         κ 
                         j 
                       
                        
                       cos 
                        
                       
                           
                       
                        
                       
                         ɛ 
                         j 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       β 
                       j 
                     
                     = 
                     
                       
                         κ 
                         j 
                       
                        
                       sin 
                        
                       
                           
                       
                        
                       
                         ɛ 
                         j 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       κ 
                       j 
                     
                     = 
                     
                       
                         
                           α 
                           j 
                           2 
                         
                         + 
                         
                           β 
                           j 
                           2 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       ɛ 
                       j 
                     
                     = 
                     
                       
                         tan 
                         
                           - 
                           1 
                         
                       
                        
                       
                         
                           β 
                           j 
                         
                         
                           α 
                           j 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   23 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Equations (16a)-(16f) can be rewritten in terms of the vectors ñ and {tilde over (b)} to give: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                              
                             2 
                           
                            
                           
                             
                               t 
                               ⇀ 
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                       · 
                       
                         
                           n 
                           ~ 
                         
                         j 
                       
                     
                     = 
                     
                       
                         
                           α 
                           j 
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               n 
                               ~ 
                             
                             j 
                           
                           · 
                           
                             
                               t 
                               ⇀ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   3 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               n 
                               ~ 
                             
                             j 
                           
                           · 
                           
                             [ 
                             
                               
                                 
                                   α 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     n 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                               + 
                               
                                 
                                   β 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                             
                             ] 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                              
                             2 
                           
                            
                           
                             
                               t 
                               ⇀ 
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                       · 
                       
                         
                           b 
                           ~ 
                         
                         j 
                       
                     
                     = 
                     
                       
                         
                           β 
                           j 
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               b 
                               ~ 
                             
                             j 
                           
                           · 
                           
                             
                               t 
                               ⇀ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   3 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               b 
                               ~ 
                             
                             j 
                           
                           · 
                           
                             [ 
                             
                               
                                 
                                   α 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     n 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                               + 
                               
                                 
                                   β 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                             
                             ] 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   j 
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                              
                             2 
                           
                            
                           
                             
                               t 
                               ⇀ 
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                       · 
                       
                         
                           n 
                           ~ 
                         
                         
                           j 
                           + 
                           1 
                         
                       
                     
                     = 
                     
                       
                         
                           α 
                           
                             j 
                             + 
                             1 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               n 
                               ~ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                           · 
                           
                             t 
                             ⇀ 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   1 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               n 
                               ~ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                           · 
                           
                             [ 
                             
                               
                                 
                                   α 
                                   j 
                                 
                                  
                                 
                                   
                                     n 
                                     ~ 
                                   
                                   j 
                                 
                               
                               + 
                               
                                 
                                   β 
                                   j 
                                 
                                  
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   j 
                                 
                               
                             
                             ] 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           
                              
                             2 
                           
                            
                           
                             
                               t 
                               ⇀ 
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                       · 
                       
                         
                           b 
                           ~ 
                         
                         
                           j 
                           + 
                           1 
                         
                       
                     
                     = 
                     
                       
                         
                           β 
                           
                             j 
                             + 
                             1 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               b 
                               ~ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                           · 
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   1 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             
                               b 
                               ~ 
                             
                             
                               j 
                               + 
                               1 
                             
                           
                           · 
                           
                             [ 
                             
                               
                                 
                                   α 
                                   j 
                                 
                                  
                                 
                                   
                                     n 
                                     ~ 
                                   
                                   j 
                                 
                               
                               + 
                               
                                 
                                   β 
                                   j 
                                 
                                  
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   j 
                                 
                               
                             
                             ] 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   24 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Continuity of d 2 {right arrow over (t)}/ds 2  at survey points requires for j=2, N−1: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         [ 
                         
                           
                             
                               α 
                               
                                 j 
                                 - 
                                 1 
                               
                             
                              
                             
                               
                                 
                                   n 
                                   ~ 
                                 
                                 j 
                               
                               · 
                               
                                 
                                   n 
                                   ~ 
                                 
                                 
                                   j 
                                   - 
                                   1 
                                 
                               
                             
                           
                           + 
                           
                             
                               β 
                               
                                 j 
                                 - 
                                 1 
                               
                             
                              
                             
                               
                                 
                                   n 
                                   ~ 
                                 
                                 j 
                               
                               · 
                               
                                 
                                   b 
                                   ~ 
                                 
                                 
                                   j 
                                   - 
                                   1 
                                 
                               
                             
                           
                         
                         ] 
                       
                        
                       
                         
                           
                              
                             2 
                           
                            
                           
                             f 
                             
                               
                                 2 
                                  
                                 j 
                               
                               - 
                               1 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                     
                     + 
                     
                       
                         α 
                         j 
                       
                        
                       
                         ( 
                         
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                           + 
                           
                             
                               
                                  
                                 2 
                               
                                
                               
                                 f 
                                 
                                   
                                     4 
                                      
                                     j 
                                   
                                   - 
                                   1 
                                 
                               
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                         ) 
                       
                     
                     + 
                     
                       
                         [ 
                         
                           
                             
                               α 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                              
                             
                               
                                 
                                   n 
                                   ~ 
                                 
                                 j 
                               
                               · 
                               
                                 
                                   n 
                                   ~ 
                                 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                             
                           
                           + 
                           
                             
                               β 
                               
                                 j 
                                 + 
                                 1 
                               
                             
                              
                             
                               
                                 
                                   n 
                                   ~ 
                                 
                                 j 
                               
                               · 
                               
                                 
                                   b 
                                   ~ 
                                 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                             
                           
                         
                         ] 
                       
                        
                       
                         
                           
                              
                             2 
                           
                            
                           
                             f 
                             
                               4 
                                
                               j 
                             
                           
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                     
                   
                   = 
                   
                     
                       
                         
                           
                             
                               n 
                               ~ 
                             
                             j 
                           
                           · 
                           
                             
                               ( 
                               
                                 
                                   
                                     
                                       t 
                                       ⇀ 
                                     
                                     
                                       j 
                                       + 
                                       1 
                                     
                                   
                                    
                                   
                                     
                                       
                                          
                                         2 
                                       
                                        
                                       
                                         f 
                                         
                                           3 
                                            
                                           j 
                                         
                                       
                                     
                                     
                                        
                                       
                                         s 
                                         2 
                                       
                                     
                                   
                                 
                                 - 
                                 
                                   
                                     
                                       t 
                                       ⇀ 
                                     
                                     
                                       j 
                                       - 
                                       1 
                                     
                                   
                                    
                                   
                                     
                                       
                                          
                                         2 
                                       
                                        
                                       
                                         f 
                                         
                                           
                                             1 
                                              
                                             j 
                                           
                                           - 
                                           1 
                                         
                                       
                                     
                                     
                                        
                                       
                                         s 
                                         2 
                                       
                                     
                                   
                                 
                               
                               ) 
                             
                              
                             
                               
 
                             
                             [ 
                             
                               
                                 
                                   α 
                                   
                                     j 
                                     - 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     
                                       b 
                                       ~ 
                                     
                                     j 
                                   
                                   · 
                                   
                                     
                                       n 
                                       ~ 
                                     
                                     
                                       j 
                                       - 
                                       1 
                                     
                                   
                                 
                               
                               + 
                               
                                 
                                   β 
                                   
                                     j 
                                     - 
                                     1 
                                   
                                 
                                  
                                 
                                   
                                     
                                       b 
                                       ~ 
                                     
                                     j 
                                   
                                   · 
                                   
                                     
                                       b 
                                       ~ 
                                     
                                     
                                       j 
                                       - 
                                       1 
                                     
                                   
                                 
                               
                             
                             ] 
                           
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               f 
                               
                                 
                                   2 
                                    
                                   j 
                                 
                                 - 
                                 1 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                       + 
                       
                         
                           β 
                           j 
                         
                          
                         
                           ( 
                           
                             
                               
                                 
                                    
                                   2 
                                 
                                  
                                 
                                   f 
                                   
                                     2 
                                      
                                     j 
                                   
                                 
                               
                               
                                  
                                 
                                   s 
                                   2 
                                 
                               
                             
                             + 
                             
                               
                                 
                                    
                                   2 
                                 
                                  
                                 
                                   f 
                                   
                                     
                                       4 
                                        
                                       j 
                                     
                                     - 
                                     1 
                                   
                                 
                               
                               
                                  
                                 
                                   s 
                                   2 
                                 
                               
                             
                           
                           ) 
                         
                       
                       + 
                       
                         
                           [ 
                           
                             
                               
                                 α 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                                
                               
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   j 
                                 
                                 · 
                                 
                                   
                                     n 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                             
                             + 
                             
                               
                                 β 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                                
                               
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   j 
                                 
                                 · 
                                 
                                   
                                     b 
                                     ~ 
                                   
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                               
                             
                           
                           ] 
                         
                          
                         
                           
                             
                                
                               2 
                             
                              
                             
                               f 
                               
                                 4 
                                  
                                 j 
                               
                             
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                     
                     = 
                     
                       
                         
                           b 
                           ~ 
                         
                         j 
                       
                       · 
                       
                         ( 
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               
                                 j 
                                 + 
                                 1 
                               
                             
                              
                             
                               
                                 
                                    
                                   2 
                                 
                                  
                                 
                                   f 
                                   
                                     3 
                                      
                                     j 
                                   
                                 
                               
                               
                                  
                                 
                                   s 
                                   2 
                                 
                               
                             
                           
                           - 
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               
                                 j 
                                 - 
                                 1 
                               
                             
                              
                             
                               
                                 
                                    
                                   2 
                                 
                                  
                                 
                                   f 
                                   
                                     
                                       1 
                                        
                                       j 
                                     
                                     - 
                                     1 
                                   
                                 
                               
                               
                                  
                                 
                                   s 
                                   2 
                                 
                               
                             
                           
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   25 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The set of equations (25) together with boundary conditions defined at the initial and end points form a diagonally dominant block tridiagonal set of equations that are relatively easy to solve. Notably, by also solving for α j  and β j , the system has also solved for dφ j /ds and dθ j /ds through equation (23). Further, there is no ambiguity about the magnitude of θ j (±nπ) in the definition of these derivatives. 
         [0051]    There is therefore, a need for expressions for the parameters κ, τ, and κ′ that appear in the torque-drag equilibrium equations. 
         [0052]    Recalling the Frenet formulae (equations (12) and (15)): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                          
                         s 
                       
                     
                     = 
                     
                       
                         κ 
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                        
                       
                         
                           n 
                           ⇀ 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                          
                         
                           
                             n 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                          
                         s 
                       
                     
                     = 
                     
                       
                         
                           - 
                           
                             κ 
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           τ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             b 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                            
                           2 
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                          
                         
                           s 
                           2 
                         
                       
                     
                     = 
                     
                       
                         
                           - 
                           
                             
                               κ 
                               2 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                          
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           
                             κ 
                             ′ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             n 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           κ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           τ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             b 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           t 
                           ⇀ 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                       × 
                       
                         
                            
                           
                             
                               t 
                               ⇀ 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                         
                            
                           s 
                         
                       
                     
                     = 
                     
                       
                         
                           
                             t 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                         × 
                         
                           κ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             n 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       = 
                       
                         
                           κ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                          
                         
                           
                             b 
                             ⇀ 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   26 
                   ) 
                 
               
             
           
         
       
     
         [0000]    it is determined that: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       κ 
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                            
                           
                              
                             s 
                           
                         
                          
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                              
                             
                                
                               s 
                             
                           
                         
                          
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         κ 
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                        
                       
                          
                         
                            
                           s 
                         
                       
                        
                       
                         κ 
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                     = 
                     
                       
                          
                         
                            
                           s 
                         
                       
                        
                       
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                         · 
                         
                           
                              
                             2 
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                       
                        
                       
                         
                           
                             t 
                             ⇀ 
                           
                           j 
                         
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           κ 
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                         2 
                       
                        
                       
                         τ 
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                     = 
                     
                       
                         
                            
                           2 
                         
                         
                            
                           
                             s 
                             2 
                           
                         
                       
                        
                       
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                         · 
                         
                           [ 
                           
                             
                               
                                 
                                   t 
                                   ⇀ 
                                 
                                 j 
                               
                                
                               
                                 ( 
                                 s 
                                 ) 
                               
                             
                             × 
                             
                                
                               
                                  
                                 s 
                               
                             
                              
                             
                               
                                 
                                   t 
                                   ⇀ 
                                 
                                 j 
                               
                                
                               
                                 ( 
                                 ξ 
                                 ) 
                               
                             
                           
                           ] 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   27 
                   ) 
                 
               
             
           
         
       
     
         [0000]    If κ is non-zero at a given point, then: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       κ 
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                            
                           
                              
                             s 
                           
                         
                          
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                              
                             
                                
                               s 
                             
                           
                         
                          
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                          
                         
                            
                           s 
                         
                       
                        
                       
                         κ 
                          
                         
                           ( 
                           s 
                           ) 
                         
                       
                     
                     = 
                     
                       
                         
                            
                           
                              
                             s 
                           
                         
                          
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                             
                                
                               2 
                             
                             
                                
                               
                                 s 
                                 2 
                               
                             
                           
                         
                          
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                       
                         
                           
                              
                             
                                
                               s 
                             
                           
                            
                           
                             
                               
                                 
                                   t 
                                   ⇀ 
                                 
                                 j 
                               
                                
                               
                                 ( 
                                 s 
                                 ) 
                               
                             
                             · 
                             
                                
                               
                                  
                                 s 
                               
                             
                           
                            
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       τ 
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                              
                             2 
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                          
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                             [ 
                             
                               
                                 
                                   
                                     t 
                                     ⇀ 
                                   
                                   j 
                                 
                                  
                                 
                                   ( 
                                   s 
                                   ) 
                                 
                               
                               × 
                               
                                  
                                 
                                    
                                   s 
                                 
                               
                                
                               
                                 
                                   
                                     t 
                                     ⇀ 
                                   
                                   j 
                                 
                                  
                                 
                                   ( 
                                   s 
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                       
                       
                         
                           
                              
                             2 
                           
                           
                              
                             
                               s 
                               2 
                             
                           
                         
                          
                         
                           
                             
                               
                                 t 
                                 ⇀ 
                               
                               j 
                             
                              
                             
                               ( 
                               s 
                               ) 
                             
                           
                           · 
                           
                              
                             
                                
                               s 
                             
                           
                         
                          
                         
                           
                             
                               t 
                               ⇀ 
                             
                             j 
                           
                            
                           
                             ( 
                             s 
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   28 
                   ) 
                 
               
             
           
         
       
     
         [0053]    Since the system is intended to model drillstrings, the best choice for interpolating functions (f ij ) are solutions to actual drillstring problems. The equation for the mechanical equilibrium of a weightless elastic rod with large displacement is: 
         [0000]        EIū   iv −[( F−EIκ   2 ) {right arrow over (u)}′]′=   0   (29) 
         [0000]    where EI is the bending stiffness, F is the axial force (tension positive), and κ is the curvature of the rod. Looking at a small interval of s, F and κ are roughly constant, so the solution to equation (7) becomes: 
         [0000]        u ( s )= c   0   +c   1   s+c   2  sin  h (λ s )+ c   3  cos  h (λ s )   (30 a ) 
         [0000]      when:  EIλ   2   =F−EIκ   2 &gt;0 
         [0000]        u ( s )= c   0   +c   1   s+c   2  sin(λ s )+ c   3  cos(λ s )   (30 b ) 
         [0000]      when:  EIλ   2   =EIκ   2   −F&gt; 0 
         [0000]        u ( s )= c   0   +c   1   s+c   2   s   2   +c   3   s   3    (30 c ) 
         [0000]      when:  EIκ   2   −F= 0 
         [0000]    where the c 0 -c 3  are four constants to be determined. The third equation is a cubic equation, so cubic splines are a candidate solution, even though they represent a special case of zero axial loads. Equation (30a) can be used to define what are known as tension-splines and equation (30b) may be used to define “compression” splines. This is demonstrated in the following section using drillstring solutions as interpolation functions. 
       Drillstring Solutions as Interpolation Functions 
       [0054]    As demonstrated in the Spline Wellbore Trajectory section above, a set of interpolation functions f ij (s), s in [s j , s j+1 ], is needed with the following properties: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               f 
                               
                                 1 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                           = 
                           1 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                                
                               
                                 
                                   f 
                                   
                                     1 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               s 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                               f 
                               
                                 1 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                              
                             
                               
                                 f 
                                 
                                   1 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             s 
                           
                         
                         = 
                         0 
                       
                     
                   
                   
                     
                       
                         
                           
                             
                               f 
                               
                                 2 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                                
                               
                                 
                                   f 
                                   
                                     2 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               s 
                             
                           
                           = 
                           1 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                               f 
                               
                                 2 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                              
                             
                               
                                 f 
                                 
                                   2 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             s 
                           
                         
                         = 
                         0 
                       
                     
                   
                   
                     
                       
                         
                           
                             
                               f 
                               
                                 3 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                                
                               
                                 
                                   f 
                                   
                                     3 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               s 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                               f 
                               
                                 3 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                           = 
                           1 
                         
                         , 
                       
                     
                     
                       
                         
                           
                              
                             
                               
                                 f 
                                 
                                   3 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             s 
                           
                         
                         = 
                         0 
                       
                     
                   
                   
                     
                       
                         
                           
                             
                               f 
                               
                                 4 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 j 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                                
                               
                                 
                                   f 
                                   
                                     4 
                                      
                                     j 
                                   
                                 
                                  
                                 
                                   ( 
                                   
                                     s 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             
                                
                               s 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                             
                               f 
                               
                                 4 
                                  
                                 j 
                               
                             
                              
                             
                               ( 
                               
                                 s 
                                 
                                   j 
                                   + 
                                   1 
                                 
                               
                               ) 
                             
                           
                           = 
                           0 
                         
                         , 
                       
                     
                     
                       
                         
                           
                              
                             
                               
                                 f 
                                 
                                   4 
                                    
                                   j 
                                 
                               
                                
                               
                                 ( 
                                 
                                   s 
                                   
                                     j 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                           
                           
                              
                             s 
                           
                         
                         = 
                         1 
                       
                     
                   
                 
               
               
                 
                   ( 
                   31 
                   ) 
                 
               
             
           
         
       
     
         [0000]    For example, the following cubic functions satisfy the requirements of equation (31): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         f 
                         
                           1 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       1 
                       + 
                       
                         
                           ( 
                           
                             
                               2 
                                
                               ξ 
                             
                             - 
                             3 
                           
                           ) 
                         
                          
                         
                           ξ 
                           2 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           2 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ξ 
                            
                           
                             ( 
                             
                               ξ 
                               - 
                               1 
                             
                             ) 
                           
                         
                         2 
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           3 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         ( 
                         
                           3 
                           - 
                           
                             2 
                              
                             ξ 
                           
                         
                         ) 
                       
                        
                       
                         ξ 
                         2 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           4 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         s 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ξ 
                           2 
                         
                          
                         
                           ( 
                           
                             ξ 
                             - 
                             1 
                           
                           ) 
                         
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ξ 
                     = 
                     
                       
                         s 
                         - 
                         
                           s 
                           j 
                         
                       
                       
                         
                           s 
                           
                             j 
                             + 
                             1 
                           
                         
                         - 
                         
                           s 
                           j 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   32 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The cubic spline functions defined in equation (32) are not the only possible choices. An alternate formulation that has direct connection to drillstring solutions is the tension spline: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         f 
                         
                           1 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             1 
                             + 
                             
                               
                                 
                                   
                                     [ 
                                     
                                       
                                         cosh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                       - 
                                       1 
                                     
                                     ) 
                                   
                                   ] 
                                 
                                  
                                 
                                   [ 
                                   
                                     1 
                                     - 
                                     
                                       cosh 
                                        
                                       
                                         ( 
                                         λξ 
                                         ) 
                                       
                                     
                                   
                                   ] 
                                 
                               
                               
                                 
                                   λ 
                                    
                                   
                                       
                                   
                                    
                                   
                                     sinh 
                                      
                                     
                                       ( 
                                       λ 
                                       ) 
                                     
                                   
                                 
                                 + 
                                 
                                   2 
                                    
                                   
                                     [ 
                                     
                                       1 
                                       - 
                                       
                                         cosh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                               
                             
                             - 
                           
                         
                       
                       
                         
                           
                             
                               
                                 sinh 
                                  
                                 
                                   ( 
                                   λ 
                                   ) 
                                 
                               
                                
                               
                                 [ 
                                 
                                   λξ 
                                   - 
                                   
                                     sinh 
                                      
                                     
                                       ( 
                                       λξ 
                                       ) 
                                     
                                   
                                 
                                 ] 
                               
                             
                             
                               
                                 λsinh 
                                  
                                 
                                   ( 
                                   λ 
                                   ) 
                                 
                               
                               + 
                               
                                 2 
                                  
                                 
                                   [ 
                                   
                                     1 
                                     - 
                                     
                                       cosh 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   ] 
                                 
                               
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           2 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             
                               
                                 ξ 
                                 - 
                                 
                                   
                                     
                                       
                                         [ 
                                         
                                           
                                             sinh 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                           - 
                                           
                                             λcosh 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ) 
                                       
                                       ] 
                                     
                                      
                                     
                                       [ 
                                       
                                         1 
                                         - 
                                         
                                           cosh 
                                            
                                           
                                             ( 
                                             λξ 
                                             ) 
                                           
                                         
                                       
                                       ] 
                                     
                                   
                                   
                                     
                                       
                                         λ 
                                         2 
                                       
                                        
                                       
                                           
                                       
                                        
                                       
                                         sinh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     + 
                                     
                                       2 
                                        
                                       
                                         λ 
                                          
                                         
                                           [ 
                                           
                                             1 
                                             - 
                                             
                                               cosh 
                                                
                                               
                                                 ( 
                                                 λ 
                                                 ) 
                                               
                                             
                                           
                                           ] 
                                         
                                       
                                     
                                   
                                 
                                 - 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     [ 
                                     
                                       
                                         λsinh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                       + 
                                       1 
                                       - 
                                       
                                         cosh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                    
                                   
                                     [ 
                                     
                                       
                                         λ 
                                          
                                         
                                             
                                         
                                          
                                         ξ 
                                       
                                       - 
                                       
                                         sinh 
                                          
                                         
                                           ( 
                                           λξ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                                 
                                   
                                     
                                       λ 
                                       2 
                                     
                                      
                                     
                                         
                                     
                                      
                                     
                                       sinh 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   + 
                                   
                                     2 
                                      
                                     
                                       λ 
                                        
                                       
                                         [ 
                                         
                                           1 
                                           - 
                                           
                                             cosh 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ] 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                         } 
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           3 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             
                               [ 
                               
                                 1 
                                 - 
                                 
                                   cosh 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                               
                               ) 
                             
                             ] 
                           
                            
                           
                             [ 
                             
                               1 
                               - 
                               
                                 cosh 
                                  
                                 
                                   ( 
                                   λξ 
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                         
                           
                             λ 
                              
                             
                                 
                             
                              
                             
                               sinh 
                                
                               
                                 ( 
                                 λ 
                                 ) 
                               
                             
                           
                           + 
                           
                             2 
                              
                             
                               [ 
                               
                                 1 
                                 - 
                                 
                                   cosh 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                               
                               ] 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             sinh 
                              
                             
                               ( 
                               λ 
                               ) 
                             
                           
                            
                           
                             [ 
                             
                               λξ 
                               - 
                               
                                 sinh 
                                  
                                 
                                   ( 
                                   λξ 
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                         
                           
                             λ 
                              
                             
                                 
                             
                              
                             
                               sinh 
                                
                               
                                 ( 
                                 λ 
                                 ) 
                               
                             
                           
                           + 
                           
                             2 
                              
                             
                               [ 
                               
                                 1 
                                 - 
                                 
                                   cosh 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                               
                               ] 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           4 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             
                               
                                 
                                   
                                     
                                       
                                         [ 
                                         
                                           
                                             sinh 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                           - 
                                           λ 
                                         
                                         ) 
                                       
                                       ] 
                                     
                                      
                                     
                                       [ 
                                       
                                         1 
                                         - 
                                         
                                           cosh 
                                            
                                           
                                             ( 
                                             λξ 
                                             ) 
                                           
                                         
                                       
                                       ] 
                                     
                                   
                                   
                                     
                                       
                                         λ 
                                         2 
                                       
                                        
                                       
                                           
                                       
                                        
                                       
                                         sinh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     + 
                                     
                                       2 
                                        
                                       
                                         λ 
                                          
                                         
                                           [ 
                                           
                                             1 
                                             - 
                                             
                                               cosh 
                                                
                                               
                                                 ( 
                                                 λ 
                                                 ) 
                                               
                                             
                                           
                                           ] 
                                         
                                       
                                     
                                   
                                 
                                 + 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     [ 
                                     
                                       1 
                                       - 
                                       
                                         cosh 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                    
                                   
                                     [ 
                                     
                                       λξ 
                                       - 
                                       
                                         sinh 
                                          
                                         
                                           ( 
                                           λξ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                                 
                                   
                                     
                                       λ 
                                       2 
                                     
                                      
                                     
                                       sinh 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   + 
                                   
                                     2 
                                      
                                     
                                       λ 
                                        
                                       
                                         [ 
                                         
                                           1 
                                           - 
                                           
                                             cosh 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ] 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                         } 
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ξ 
                     = 
                     
                       
                         s 
                         - 
                         
                           s 
                           j 
                         
                       
                       
                         
                           s 
                           
                             j 
                             + 
                             1 
                           
                         
                         - 
                         
                           s 
                           j 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   33 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where λ is a parameter to be determined. For beam-column solutions, 
         [0000]    
       
         
           
             
               
                 
                   
                     λ 
                     = 
                     
                       Δ 
                        
                       
                           
                       
                        
                       s 
                        
                       
                         
                           
                             F 
                             ~ 
                           
                           EI 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       F 
                       ~ 
                     
                     = 
                     
                       
                         F 
                         - 
                         
                           EI 
                            
                           
                               
                           
                            
                           
                             κ 
                             2 
                           
                         
                       
                       &gt; 
                       0 
                     
                   
                 
               
               
                 
                   ( 
                   34 
                   ) 
                 
               
             
           
         
       
     
         [0000]    A similar solution for strings in compression is: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         f 
                         
                           1 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             1 
                             - 
                             
                               
                                 
                                   
                                     [ 
                                     
                                       
                                         cos 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                       - 
                                       1 
                                     
                                     ) 
                                   
                                   ] 
                                 
                                  
                                 
                                   [ 
                                   
                                     1 
                                     - 
                                     
                                       cos 
                                        
                                       
                                         ( 
                                         λξ 
                                         ) 
                                       
                                     
                                   
                                   ] 
                                 
                               
                               
                                 
                                   λ 
                                    
                                   
                                       
                                   
                                    
                                   
                                     sin 
                                      
                                     
                                       ( 
                                       λ 
                                       ) 
                                     
                                   
                                 
                                 - 
                                 
                                   2 
                                    
                                   
                                     [ 
                                     
                                       1 
                                       - 
                                       
                                         cos 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                               
                             
                             - 
                           
                         
                       
                       
                         
                           
                             
                               
                                 sin 
                                  
                                 
                                   ( 
                                   λ 
                                   ) 
                                 
                               
                                
                               
                                 [ 
                                 
                                   λξ 
                                   - 
                                   
                                     sin 
                                      
                                     
                                       ( 
                                       λξ 
                                       ) 
                                     
                                   
                                 
                                 ] 
                               
                             
                             
                               
                                 λsin 
                                  
                                 
                                   ( 
                                   λ 
                                   ) 
                                 
                               
                               - 
                               
                                 2 
                                  
                                 
                                   [ 
                                   
                                     1 
                                     - 
                                     
                                       cos 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   ] 
                                 
                               
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           2 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             
                               
                                 ξ 
                                 + 
                                 
                                   
                                     
                                       
                                         [ 
                                         
                                           
                                             sin 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                           - 
                                           
                                             λcos 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ) 
                                       
                                       ] 
                                     
                                      
                                     
                                       [ 
                                       
                                         1 
                                         - 
                                         
                                           cos 
                                            
                                           
                                             ( 
                                             λξ 
                                             ) 
                                           
                                         
                                       
                                       ] 
                                     
                                   
                                   
                                     
                                       
                                         λ 
                                         2 
                                       
                                        
                                       
                                           
                                       
                                        
                                       
                                         sin 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     - 
                                     
                                       2 
                                        
                                       
                                         λ 
                                          
                                         
                                           [ 
                                           
                                             1 
                                             - 
                                             
                                               cos 
                                                
                                               
                                                 ( 
                                                 λ 
                                                 ) 
                                               
                                             
                                           
                                           ] 
                                         
                                       
                                     
                                   
                                 
                                 - 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     [ 
                                     
                                       
                                         λsin 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                       - 
                                       1 
                                       + 
                                       
                                         cos 
                                          
                                         
                                           ( 
                                           λ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                    
                                   
                                     [ 
                                     
                                       
                                         λ 
                                          
                                         
                                             
                                         
                                          
                                         ξ 
                                       
                                       - 
                                       
                                         sin 
                                          
                                         
                                           ( 
                                           λξ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                                 
                                   
                                     
                                       λ 
                                       2 
                                     
                                      
                                     
                                         
                                     
                                      
                                     
                                       sin 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   - 
                                   
                                     2 
                                      
                                     
                                       λ 
                                        
                                       
                                         [ 
                                         
                                           1 
                                           - 
                                           
                                             cos 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ] 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                         } 
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           3 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           
                             
                               [ 
                               
                                 
                                   cos 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                                 - 
                                 1 
                               
                               ) 
                             
                             ] 
                           
                            
                           
                             [ 
                             
                               1 
                               - 
                               
                                 cos 
                                  
                                 
                                   ( 
                                   λξ 
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                         
                           
                             λ 
                              
                             
                                 
                             
                              
                             
                               sin 
                                
                               
                                 ( 
                                 λ 
                                 ) 
                               
                             
                           
                           - 
                           
                             2 
                              
                             
                               [ 
                               
                                 1 
                                 - 
                                 
                                   cos 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                               
                               ] 
                             
                           
                         
                       
                       + 
                       
                         
                           
                             sin 
                              
                             
                               ( 
                               λ 
                               ) 
                             
                           
                            
                           
                             [ 
                             
                               λξ 
                               - 
                               
                                 sin 
                                  
                                 
                                   ( 
                                   λξ 
                                   ) 
                                 
                               
                             
                             ] 
                           
                         
                         
                           
                             λ 
                              
                             
                                 
                             
                              
                             
                               sin 
                                
                               
                                 ( 
                                 λ 
                                 ) 
                               
                             
                           
                           - 
                           
                             2 
                              
                             
                               [ 
                               
                                 1 
                                 - 
                                 
                                   cos 
                                    
                                   
                                     ( 
                                     λ 
                                     ) 
                                   
                                 
                               
                               ] 
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         f 
                         
                           4 
                            
                           j 
                         
                       
                        
                       
                         ( 
                         ξ 
                         ) 
                       
                     
                     = 
                     
                       
                         { 
                         
                           
                             
                               
                                 
                                   - 
                                   
                                     
                                       
                                         
                                           [ 
                                           
                                             
                                               sin 
                                                
                                               
                                                 ( 
                                                 λ 
                                                 ) 
                                               
                                             
                                             - 
                                             λ 
                                           
                                           ) 
                                         
                                         ] 
                                       
                                        
                                       
                                         [ 
                                         
                                           1 
                                           - 
                                           
                                             cos 
                                              
                                             
                                               ( 
                                               λξ 
                                               ) 
                                             
                                           
                                         
                                         ] 
                                       
                                     
                                     
                                       
                                         
                                           λ 
                                           2 
                                         
                                          
                                         
                                             
                                         
                                          
                                         
                                           sin 
                                            
                                           
                                             ( 
                                             λ 
                                             ) 
                                           
                                         
                                       
                                       - 
                                       
                                         2 
                                          
                                         
                                           λ 
                                            
                                           
                                             [ 
                                             
                                               1 
                                               - 
                                               
                                                 cos 
                                                  
                                                 
                                                   ( 
                                                   λ 
                                                   ) 
                                                 
                                               
                                             
                                             ] 
                                           
                                         
                                       
                                     
                                   
                                 
                                 + 
                               
                             
                           
                           
                             
                               
                                 
                                   
                                     λ 
                                      
                                     
                                       [ 
                                       
                                         
                                           cos 
                                            
                                           
                                             ( 
                                             λ 
                                             ) 
                                           
                                         
                                         - 
                                         1 
                                       
                                       ] 
                                     
                                   
                                    
                                   
                                     [ 
                                     
                                       λξ 
                                       - 
                                       
                                         sin 
                                          
                                         
                                           ( 
                                           λξ 
                                           ) 
                                         
                                       
                                     
                                     ] 
                                   
                                 
                                 
                                   
                                     
                                       λ 
                                       2 
                                     
                                      
                                     
                                       sin 
                                        
                                       
                                         ( 
                                         λ 
                                         ) 
                                       
                                     
                                   
                                   - 
                                   
                                     2 
                                      
                                     
                                       λ 
                                        
                                       
                                         [ 
                                         
                                           1 
                                           - 
                                           
                                             cos 
                                              
                                             
                                               ( 
                                               λ 
                                               ) 
                                             
                                           
                                         
                                         ] 
                                       
                                     
                                   
                                 
                               
                             
                           
                         
                         } 
                       
                        
                       
                         ( 
                         
                           
                             s 
                             
                               j 
                               + 
                               1 
                             
                           
                           - 
                           
                             s 
                             j 
                           
                         
                         ) 
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     ξ 
                     = 
                     
                       
                         s 
                         - 
                         
                           s 
                           j 
                         
                       
                       
                         
                           s 
                           
                             j 
                             + 
                             1 
                           
                         
                         - 
                         
                           s 
                           j 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   35 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where λ is a parameter to be determined. For beam-column solutions, 
         [0000]    
       
         
           
             
               
                 
                   
                     λ 
                     = 
                     
                       Δ 
                        
                       
                           
                       
                        
                       s 
                        
                       
                         
                           
                             - 
                             
                               F 
                               ~ 
                             
                           
                           EI 
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       F 
                       ~ 
                     
                     = 
                     
                       
                         F 
                         - 
                         
                           EI 
                            
                           
                               
                           
                            
                           
                             κ 
                             2 
                           
                         
                       
                       &lt; 
                       0 
                     
                   
                 
               
               
                 
                   ( 
                   36 
                   ) 
                 
               
             
           
         
       
     
         [0055]    One problem is that the λ coefficients are functions of the axial force, which are not known until the torque-drag equations are solved. In practice, λ tends to be small, so that the solution approximates a cubic equation. The cubic interpolation can be used to approximate the trajectory, and to solve the torque-drag problem. The torque-drag solution can then be used to refine the trajectory, iterating if necessary. 
         [0056]    A simple comparison of the wellbore trajectory model of the present invention, also referred to as a spline model, and the standard minimum curvature model with three analytic wellbore trajectories (circular-arc, catenary, helix) is illustrated in  FIGS. 2-4 , respectively. The comparisons of the displacements illustrated in  FIGS. 2-4  demonstrate that the minimum curvature model and the spline model match the analytic wellbore trajectory in  FIG. 2  (circular-arc), the analytic wellbore trajectory in  FIG. 3  (catenary) and the analytic wellbore trajectory in  FIG. 4  (helix). Only one displacement is shown for the helix, but is representative of the other displacements. The spline model was also used to calculate the rate of change of curvature for the analytic wellbore trajectory illustrated in  FIG. 5  (catenary), and the geometric torsion for the analytic wellbore trajectory illustrated in  FIG. 6  (helix). Despite the results of the simple comparison illustrated in  FIGS. 2-4 , the results illustrated by the comparisons in  FIGS. 5-6  demonstrate the deficiencies of the minimum curvature model when calculating the curvature rate of change for the catenary wellbore trajectory illustrated in  FIG. 5  or when calculating the geometric torsion for the helix wellbore trajectory illustrated in  FIG. 6 . The minimum curvature model predicts zero for both quantities compared in  FIGS. 5-6 , which cannot be plotted. The spline model, however, determines both quantities accurately, although there is some end effect apparent in the geometric torsion calculation. Additional advantages attributed to the present invention (spline model) are demonstrated by the following examples. 
       Torque-Drag Calculations 
       [0057]    Torque-drag calculations were made using a comprehensive torque-drag model well known in the art. Similarly, the equilibrium equations were integrated using a method well known in the art. Otherwise, the only difference in the solutions is the choice of the trajectory model. 
       EXAMPLE 1 
       [0058]    In this example, the drag and torque properties of an idealized well plan are based on Well 3 described in Society of Petroleum Engineers article “Designing Well Paths to Reduce Drag and Torque” by Sheppard, M. C., Wick, C. and Burgess, T. M. Referring now to  FIG. 7 , the fixed points on the model trajectory are as follows: i) the well is considered to be drilled vertically to a KOP at a depth of 2,400 ft.; ii) the inclination angle then builds at a rate of 5°/100 ft; and iii) the target location is considered to be at a vertical depth of 9,000 ft and displaced horizontally from the rig location by 6,000 ft. Drilled as a conventional build-tangent well, this would correspond to a 44.5° well deviation. The model drillstring was configured with 372 feet of 6½ inch drill collar (99.55 lbf./ft.) and 840 ft of 5 inch heavyweight pipe (50.53 lbf./ft.) with 5 inch drillpipe (20.5 lbf./ft.) to the surface. A mud weight of 9.8 lbm/gal was used. In this example, a value of 0.4 was chosen for the coefficient of friction to simulate severe conditions. Torque-loss calculations were made with an assumed WOB of 38,000 lbf. and with an assumed surface torque of 24,500 ft.-lbf. 
         [0059]    Hook load calculated for zero friction was 192202 lbf. for the circular-arc calculation, and 192164 lbf for the spline model, which compare to a spreadsheet calculation of 192203 lbf. The slight difference (38 lbf.) is due to the spline taking on a slightly different shape (due to smoothness requirements) from the straight-line/circular-arc shapes specified, which the minimum curvature model exactly duplicated. Other than the slight difference in the spline trajectory, all other aspects of the axial force calculations are identical between the two models. Tripping out, with a friction coefficient of 0.4, the hook load was 313474 lbf for the circular-arc model and 319633 lbf for the spline model, for a difference of 6159 lbf. If calculations are from the zero friction base line, this represents a difference of 5% in the axial force loading. With a surface torque of 24,500 ft-lbs., the torque at the bit was 3333 ft-lbs. for the minimum curvature model and 2528 ft-lbs. for the spline model. This represents a 4% difference in the distributed torque between the two models. The bending moments for the drillstring through the build section are illustrated in  FIG. 8 . Notably, the minimum curvature does give a lower bending moment than the spline, but that the spline results are much smoother. 
         [0060]    Since this case has a relatively mild build rate, and since the build section was only about 8% of the total well depth, it would be expected that a relatively small effect from the spline formulation would be seen. Because the classic torque-drag analysis has historically given good results, the agreement of the two models for this case verifies that the overall formulation is correct. 
       EXAMPLE 2 
       [0061]    For a more demanding example, the short-radius wellbore described in the Society of Petroleum Engineers article “Short Radius TTRD Well with Rig Assisted Snubbing on the Veslefrikk Field” by Grinde, Jan, and Haugland, Torstein was used. Referring now to  FIGS. 9A and 9B , the vertical and horizontal views of the end of the wellpath are illustrated, respectively. The build rate for this example was 42°/30 m, roughly ten times the build rate of the first case in Example 1. As illustrated in  FIG. 10 , some of the contact force is neglected by neglecting the bending moment since the contact force for the spline model at the end of the build is four times that of the minimum curvature model. In  FIG. 11 , the bending moment for this example is illustrated. The minimum curvature model still provides a lower bending moment than the spline model, but the spline results are still much smoother. 
         [0062]    Referring now to  FIG. 12 , flow diagram illustrates one embodiment of a method  1200  for implementing the present invention. 
         [0063]    In step  1202 , the survey data is obtained for each survey point (j). 
         [0064]    In step  1204 , a tangent vector ({right arrow over (t)} j ) is calculated at each survey point using the survey data at each respective survey point. 
         [0065]    In step  1206 , a special normal vector (ñ j ) and a special binormal vector ({tilde over (b)} j ) are calculated at each survey point. 
         [0066]    In step  1208 , a block tridiagonal matrix is calculated using the tangent vector, the special normal vector and the special binormal vector at each respective survey point. 
         [0067]    In step  1210 , a coefficient (α j ) is calculated at each survey point in the direction of the special normal vector at the respective survey point and another coefficient (β j ) is calculated at each survey point in the direction of the special binormal vector at the respective survey point using the block tridiagonal matrix. 
         [0068]    In step  1212 , a wellbore curvature (κ j ) and a normal vector (  n   j ) are calculated at each survey point using a first derivative of the tangent vector, the coefficient and the another coefficient at each respective survey point. 
         [0069]    In step  1214 , a tangent vector interpolation function ({right arrow over (t)} j (s)) is calculated for each interval between survey points using the wellbore curvature, the tangent vector and the normal vector at each respective survey point. 
         [0070]    In step  1216 , the wellbore trajectory is determined using each tangent vector interpolation function in a torque-drag drillstring model. 
         [0071]    While the present invention has been described in connection with presently preferred embodiments, it will be understood by those skilled in the art that it is not intended to limit the invention to those embodiments. The present invention, for example, may also be applied to model other tubular trajectories, which are common in chemical plants and manufacturing facilities. It is therefore, contemplated that various alternative embodiments and modifications may be made to the disclosed embodiments without departing from the spirit and scope of the invention defined by the appended claims and equivalents thereof.