Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
recherche:documents:notespline:accueil [2020/11/25 17:00] alainbataillypublic:notespline:accueil [2022/04/03 17:48] alainbatailly
Ligne 1: Ligne 1:
-====== Technical note: Cubic and bicubic spline interpolation in Python ======+====== Cubic and bicubic spline interpolation in Python ======
  
-This page contains the source codes associated to the [[https://hal.archives-ouvertes.fr/hal-03017566v1|HAL technical note]] for setting up and plotting cubic splines and bicubic parametric surfaces with various end conditions.+This page contains the source codes associated to the [[https://hal.archives-ouvertes.fr/hal-03017566v2|HAL technical note]] for setting up and plotting cubic splines and bicubic parametric surfaces with various end conditions.
  
-<btn type="warning" size="md" modal="modal">Download Python 3.8 files</btn>+<btn type="warning" size="md" modal="modal">Download pdf and Python 3.8 files</btn>
 <modal id="modal" title="File types"> <modal id="modal" title="File types">
 **Technical note: **  **Technical note: ** 
-    * {{note_spline.pdf|pdf file}}+    * [[https://hal.archives-ouvertes.fr/hal-03017566v2/document|pdf file (HAL)]] 
 +    * {{.:note_spline.pdf|pdf file}}
 **Cubic splines: ** **Cubic splines: **
-    * {{cubic_spline_free_end.py | free end condition}} +    * {{.:cubic_spline_free_end.py | free end condition}} 
-    * {{cubic_spline_imposed_tangent_direction.py | imposed tangent direction}} +    * {{.:cubic_spline_imposed_tangent_direction.py | imposed tangent direction}} 
-    * {{cubic_spline_end-to-end_tangent_continuity.py | end-to-end tangent continuity}} +    * {{.:cubic_spline_end-to-end_tangent_continuity.py | end-to-end tangent continuity}} 
-    * {{cubic_spline_not-a-knot.py | not-a-knot end condition}}+    * {{.:cubic_spline_not-a-knot.py | not-a-knot end condition}}
 **Bicubic parametric surfaces: ** **Bicubic parametric surfaces: **
-    * {{bicubic_parametric_surface_free_end.py | free end condition}} +    * {{.:bicubic_parametric_surface_free_end.py | free end condition}} 
-    * {{bicubic_parametric_cylinder.py | cylindrical closed surface}} +    * {{.:bicubic_parametric_cylinder.py | cylindrical closed surface}} 
-    * {{bicubic_parametric_sphere.py | spherical closed surface}} +    * {{.:bicubic_parametric_sphere.py | spherical closed surface}} 
-    * {{bicubic_parametric_surface_not-a-knot.py | not-a-knot end condition}}+    * {{.:bicubic_parametric_surface_not-a-knot.py | not-a-knot end condition}}
 </modal> </modal>
-\\ 
-\\ 
-===== Objective ===== 
-Spline and bicubic spline interpolations are widely used in a variety of domains. Nonetheless, there are limited resources available to help students or professionals who wish to implement these tools within a computer program. Be it for visualization purposes or for use within sophisticated algorithms, building a 2D or a 3D spline may not be a straightforward process. In this context, the present technical note provides a brief theoretical description of both splines and bicubic splines but also focuses on the practical implementation of both concepts with an emphasis on the various types of boundary conditions that may be used. 
 \\ \\
 \\ \\
 ===== Abstract ===== ===== Abstract =====
-A detailed description of cubic and bicubic spline interpolation is presented in this noteThis document provides the elementary operations to build parametric polynomial functions in two- or three-dimensional space. A step by step procedure is presented to set up cubic spline or a bicubic spline surface interpolation on various sets of fit knotsParticular attention is paid to the definition of various types of end conditions. In particular, different configurations featuring free end conditions, not-a-knot end conditions or particuliar tangent orientations to build both open and closed parametric curves and surfaces are detailed. All related source codes —written in Python 3.8— are provided alongside this document. Proceed to the bottom of the page for an overview of practical examples. +Cubic and bicubic spline interpolations are widely used in a variety of domainsNonetheless, there are limited resources available to help students or professionals who wish to implement these tools within computer program. Be it for visualization purposes or for use within sophisticated algorithms, building 2D or a 3D spline may not be a straightforward processIn this context, the present technical note provides a brief theoretical description of both splines and bicubic splines but also focuses on the practical implementation of both concepts with an emphasis on the various types of boundary conditions that may be used. In particular, different configurations featuring free end conditions, not-a-knot end conditions or particular tangent orientations to build both open and closed parametric curves and surfaces are detailed. Several source codes—written in Python 3.8—are provided with the intent to facilitate the reproduction of presented results. Proceed to the bottom of the page for an overview of practical examples. 
 \\ \\
 \\ \\
 ===== 2D cubic spline ===== ===== 2D cubic spline =====
 ==== free end condition ==== ==== free end condition ====
-Python source code: {{cubic_spline_free_end.py | free end condition}}+Python source code: {{.:cubic_spline_free_end.py | free end condition}}
 <figure> <figure>
-{{  2D_free_end.png?nolink&500  }}+{{  .:2d_free_end.png?nolink&500  }}
 <caption> <caption>
 cubic spline interpolated on a set of fit knots with free end conditions cubic spline interpolated on a set of fit knots with free end conditions
Ligne 39: Ligne 36:
  
 ==== imposed tangent direction ==== ==== imposed tangent direction ====
-Python source code: {{cubic_spline_imposed_tangent_direction.py | imposed tangent direction}}+Python source code: {{.:cubic_spline_imposed_tangent_direction.py | imposed tangent direction}}
 <figure> <figure>
-{{  2D_tangent.png?nolink&500  }}+{{  .:2d_tangent.png?nolink&500  }}
 <caption> <caption>
 cubic spline interpolated on a set of fit knots with imposed tangent directions at ends cubic spline interpolated on a set of fit knots with imposed tangent directions at ends
Ligne 48: Ligne 45:
  
 ==== end-to-end tangent continuity ==== ==== end-to-end tangent continuity ====
-Python source code: {{cubic_spline_end-to-end_tangent_continuity.py | end-to-end tangent continuity}}+Python source code: {{.:cubic_spline_end-to-end_tangent_continuity.py | end-to-end tangent continuity}}
 <figure> <figure>
-{{  2D_end-to-end.png?nolink&500  }}+{{  .:2d_end-to-end.png?nolink&500  }}
 <caption> <caption>
 cubic spline interpolated on a set of fit knots with end-to-end tangent continuity cubic spline interpolated on a set of fit knots with end-to-end tangent continuity
Ligne 56: Ligne 53:
 </figure> </figure>
 ==== not-a-knot end condition  ==== ==== not-a-knot end condition  ====
-Python source code: {{cubic_spline_not-a-knot.py | not-a-knot end condition}}+Python source code: {{.:cubic_spline_not-a-knot.py | not-a-knot end condition}}
 <figure> <figure>
-{{  2D_not-a-knot.png?nolink&500  }}+{{  .:2d_not-a-knot.png?nolink&500  }}
 <caption> <caption>
 cubic spline interpolated on a set of fit knots with not-a-knot end conditions cubic spline interpolated on a set of fit knots with not-a-knot end conditions
Ligne 67: Ligne 64:
 ===== 3D bicubic parametric surface ===== ===== 3D bicubic parametric surface =====
 ==== free end condition ==== ==== free end condition ====
-Python source code: {{bicubic_parametric_surface_free_end.py | free end condition}}+Python source code: {{.:bicubic_parametric_surface_free_end.py | free end condition}}
 <figure> <figure>
-{{  3D_free_end.png?nolink&600  }}+{{  .:3d_free_end.png?nolink&600  }}
 <caption> <caption>
 bicubic parametric surface interpolated on a set of fit knots with free end conditions bicubic parametric surface interpolated on a set of fit knots with free end conditions
Ligne 76: Ligne 73:
  
 ==== cylindrical closed surface ==== ==== cylindrical closed surface ====
-Python source code: {{bicubic_parametric_cylinder.py | cylindrical closed surface}}+Python source code: {{.:bicubic_parametric_cylinder.py | cylindrical closed surface}}
 <figure> <figure>
-{{  3D_cylinder.png?nolink&600  }}+{{  .:3d_cylinder.png?nolink&600  }}
 <caption> <caption>
 closed bicubic parametric surface interpolated on a randomized cylindrical set of fit knots closed bicubic parametric surface interpolated on a randomized cylindrical set of fit knots
Ligne 85: Ligne 82:
  
 ==== spherical closed surface ==== ==== spherical closed surface ====
-Python source code: {{bicubic_parametric_sphere.py | spherical closed surface}}+Python source code: {{.:bicubic_parametric_sphere.py | spherical closed surface}}
 <figure> <figure>
-{{  3D_sphere.png?nolink&500  }}+{{  .:3d_sphere.png?nolink&500  }}
 <caption> <caption>
 fully closed bicubic parametric surface interpolated on a randomized spherical set of fit knots fully closed bicubic parametric surface interpolated on a randomized spherical set of fit knots
Ligne 94: Ligne 91:
  
 ==== not-a-knot end condition  ==== ==== not-a-knot end condition  ====
-Python source code: {{bicubic_parametric_surface_not-a-knot.py | not-a-knot end condition}}+Python source code: {{.:bicubic_parametric_surface_not-a-knot.py | not-a-knot end condition}}
 <figure> <figure>
-{{  3D_free_end.png?nolink&600  }}+{{  .:3d_free_end.png?nolink&600  }}
 <caption> <caption>
 bicubic parametric surface interpolated on a set of fit knots with not-a-knot end conditions bicubic parametric surface interpolated on a set of fit knots with not-a-knot end conditions
  • public/notespline/accueil.txt
  • Dernière modification : 2023/04/05 09:04
  • de 127.0.0.1