Bézier Surface Fitting and Evaluation

버전 1.0.3 (5.08 KB) 작성자: Moreno, M.
Fast Bézier surface fitting and evaluation via linear and non-linear least squares.
다운로드 수: 123
업데이트 날짜: 2022/6/14

라이선스 보기

Syntax
Fitting
y = bsfit(x,n)
y = bsfit(x,n,u,v)
[y,res,u,v,val] = bsfit(x,n,u,v,varargin)
Evaluation
[x,y,z] = bsval(x,u,v)
Description
Fitting
[y,res,u,v,val] = bsfit(x,n,u,v,varargin) Returns the control points 'y' of the best-fitting Bézier surface of order 'n' by 'n' to a data set 'x' of scattered points. A vector of 'u' and 'v' knots can be parsed as an input, as well as the following pairs of parameter-vales:
'nlls' Specifies a non-linear least squares calculation
'tol' Specifies a fit tolerance for the non-linear iterations
'iter' Specifies a maximum number of non-linear iterations
'bico' Specifies the binomial coefficients of order 'n+1'
'coef' Specifies a relaxation factor for the knot correction
'plot' Generates a figure with the residual convergence
The average residual 'res', knot vectors 'u' and 'v' and the surface evaluation 'val' in the previous knots can be queried as output. The unstructured point cloud 'x' must be a three-dimensional column matrix.
The research paper of reference for this function is:
Lifton, J., Liu, T. and McBride, J., 'Non-Linear Least Squares Fitting of Bézier Surfaces to Unstructured Point Clouds'. AIMS Mathematics, 6(4), 3142-3159.
The help of the research paper author Joseph Lifton has ben of paramount importance.
Evaluation
[x,y,z] = bsval(x,u,v) Evaluates the Bézier surface of order n+1, n+1 that results from the [n*n, 3] control point matrix 'x' with knots 'u' and 'v'. If the knot vectors are not parsed, a grid of 100 by 100 knots is used.
The function returns the scattered surface points if only one output is specified, and the gridded surface points otherwise. The nomenclature of this function is as per bsfit and the aforementioned research paper.

인용 양식

Moreno, M. (2024). Bézier Surface Fitting and Evaluation (https://www.mathworks.com/matlabcentral/fileexchange/112470-bezier-surface-fitting-and-evaluation), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2022a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.3

Function optimisation, significant speed boost. Change of files and description text.

1.0.2

Correction of the reshaping index in bsurfeval for the case where no knot vectors are parsed as inputs

1.0.1

Typo parsing input arguments in bsurfit. Enhancement of bsurfeval input argument checks.

1.0.0