SimplexNumerica - Algorithm Manual.pdf

(2386 KB) Pobierz
Microsoft Word - Simplex Algorithm Manual A2a.doc
-1-
SimplexNumerica
Simplex
Numerica
Algorithm Manual
DRAFT A
Version 8.0
373197049.001.png 373197049.002.png
-2-
SimplexNumerica
-3-
SimplexNumerica
SimplexNumerica
THE SIMPLEXNUMERICA AND SIMPLEXPARSER PROGRAMS ARE PROVIDED "AS IS"
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL THE AUTHOR BE LIABLE TO YOU FOR ANY DAMAGES,
INCLUDING INCIDENTAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF THE USE OF THE
PROGRAM, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
SimplexNumerica and SimplexParser Copyright 1988-2006 by
Dipl.-Phys.-Ing. Ralf Wirtz
-4-
Contents
Contents
SimplexNumerica.....................................................................................................................................3
Contents ....................................................................................................................................................4
1 2D Algorithm ....................................................................................................................................5
1.1 Regression ..............................................................................................................................................5
1.1.1 Linear Least Squares...........................................................................................................................................6
1.1.2 Polynomial Regression .....................................................................................................................................10
1.1.3 Linearization of Nonlinear Relationships .........................................................................................................12
1.2 Interpolation ........................................................................................................................................14
1.2.1 Polygonal Curve ...............................................................................................................................................15
1.2.2 Additive Segmentation .....................................................................................................................................16
1.2.3 (n-1)-Polynomal................................................................................................................................................17
1.2.4 Lagrange Interpolation......................................................................................................................................17
1.2.5 Newton Interpolation ........................................................................................................................................18
1.3 Spline Interpolation.............................................................................................................................20
1.3.1 Cubic Splines ....................................................................................................................................................20
1.4 Approximation .....................................................................................................................................23
1.4.1 Gauss/Cholesky ................................................................................................................................................23
1.4.2 Simplex-Fit .......................................................................................................................................................27
1.4.3 Gauß-Fit............................................................................................................................................................34
1.5 Fourier Analysis of Time Series .........................................................................................................37
1.5.1 Discrete Fourier Transform (DFT) ...................................................................................................................37
1.5.2 Fast Fourier Transform (FFT)...........................................................................................................................39
1.6 Bezier & Spline Approximation .........................................................................................................49
1.6.1 Bézier-Curves ...................................................................................................................................................49
1.6.2 B-Spline ............................................................................................................................................................56
1.6.3 Smoothing Spline..............................................................................................................................................58
1.6.4 Parametric Smoothing Splines ..........................................................................................................................63
1.6.5 Cyclic Smoothing Splines.................................................................................................................................66
1.7 Numerical Integration.........................................................................................................................67
1.7.1 Rectangular Rule...............................................................................................................................................67
1.7.2 Error Bounds and Estimate for Rectangular Rule.............................................................................................68
1.7.3 Trapezoidal Rule...............................................................................................................................................68
1.7.4 Error Bounds and Estimate for Trapezoidal Rule .............................................................................................69
1.7.5 Simpson’s Rule .................................................................................................................................................71
1.7.6 User-Interface ...................................................................................................................................................74
1.8 Numerical Differentiation ...................................................................................................................77
1.9 Statistics................................................................................................................................................79
1.9.1 Basic Probability...............................................................................................................................................79
1.9.2 Population parameters.......................................................................................................................................80
1.9.3 Mean, Variance, and Standard Deviation .........................................................................................................80
1.9.4 Covariance and Correlation ..............................................................................................................................81
1.9.5 Student’s T-Test................................................................................................................................................82
1.10 Contour Plot.........................................................................................................................................83
1.11 Convex Wrapper Polygon...................................................................................................................87
1.12 Convex Wrapper Curve (Envelope) ..................................................................................................87
1.13 Edge Points...........................................................................................................................................87
2 3D Approximation and Interpolation ............................................................................................88
2.1 Thin Plate Surface Spline....................................................................................................................88
2.2 Bivariate Cubic Spline.........................................................................................................................90
-5-
2D Algorithm
1 2D Algorithm
Curve and surface algorithm are an important topic in SimplexNu-
merica for geometric modelling and visualization courses. In addition to manually set
Bezier and B-Splines from previous Pulldownmenu, interpolation and approximation pro-
vides another level of sophistication. In many situations such as surface re-engineering
and facial movement animation, you may specify a set of data points that describes a
desired shape (e.g., surface model) through any probing or scanning, and obtain a sur-
face that contains all data points. Interpolation is also important in computer animation.
An animator may specify a number of key camera positions and orientations (i.e., key
frames), interpolate these positions with a B-spline curve (i.e., camera path), and inter-
polate the key frames with additional frames. While interpolation can produce a
curve/surface that follows the shape of the data points, it may oscillate or wiggle its way
through every point. Approximation can overcome this problem so that the curve/surface
still captures the shape of the data points without containing all of them.
1.1 Regression
Consider the nature of most experimental data. Typically such data
include noise due to many different effects. The noisy data from an experiment might
appear as shown in the following Table and Figure. We assume that the x values are ac-
curate. Visual inspection of the data suggests a positive relationship between x and y =
f(x) , i.e., higher values of y are associated with higher values of x . One strategy for deriv-
ing an approximating function for this data might be to try to fit the general trend of the
data without necessarily matching the individual points. A straight line could be used to
generally characterize the trend in the data without passing through any particular point.
The line in next Figure has been sketched through the points. Although this approach
may work well in many cases, it does not provide us with any quantitative measure of
how good the fit of the line is to the data. We need a criterion with which to measure the
goodness of fit of the line to the data. One way to do this is to derive a curve that mini-
373197049.003.png 373197049.004.png
Zgłoś jeśli naruszono regulamin