Object-oriented tools to fit/plot conics and quadrics

バージョン 1.2.11 (495 KB) 作成者: Matt J
A tool set for fitting and/or plotting various conics and quadric surfaces, e.g., ellipses, cylinders, spheres, planes, cones, and lines.
ダウンロード: 1.6K
更新 2024/2/8


This FEX submission offers a tool set for fitting and plotting 2D conics (ellipses, circles, lines,...) as well as 3D quadric surfaces (ellipsoids, spheres, planes, cylinders, cones,...). Each type of fit is represented by an object within a class hierarchy. For each fit type, overloaded methods are provided for fitting the data, as well as post-plotting an overlay of the fit onto the raw data in a style similar to the Curve Fitting Toolbox. There are also methods for re-sampling the fit at a user-selected set of points.
Finally, the tools allow one to construct "ground truth" objects representing a conic/quadric with pre-selected parameters. This makes it possible to simply plot a desired ellipse or other supported shape regardless of whether it arises from a fitting process at all.
Currently, not all curve/surface types in the conic/quadric family are covered by this tool set, although I may add more over time. For now, I provide a subset of the ones that seem to be the most commonly encountered. Similarly, most fitting algorithms used by the tool set are very basic algebraic methods, although I may add more refined algorithms as the need and interest arise.
Various example uses of these tools are illustrated in the Examples tab.


Matt J (2024). Object-oriented tools to fit/plot conics and quadrics (https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-to-fit-plot-conics-and-quadrics), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2020a
R2018a 以降のリリースと互換性あり
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート

Small bug fix in ellipticalFit.xysim() and ellipticalFIt.sample()


Further description updates


Small modifications to description page.


*Added some functionality to planarFit.project2D and planarFIt.unproject3D().
*Embellished example in "Fitting a 2D Shape to 3D Points", making it a 3D ellipse fit.


Minor edits to Examples.mlx


Added some tools and examples to help with fitting circles, ellipses, and other 2D shapes that are sampled in 3D. See the Examples.mlx section "Fitting a 2D Shape to 3D Points".


Bug fix in circularFit.sample().


Cosmetic update: default axis labels will now be provided on all plots.


Upload redo.


Updated Examples.mlx with examples for cones.


*Added rightcircularconeFit (beta version)
*Added showfit() method as a general interface for plotting the fit only (without the data points)
*Some documentation typos fixed.
*Other cosmetic fixes.


Cosmetic fix: quadricFit.plot() was unintentionally returning an output argument when nargout=0.


*Added groundtruth() methods.
*3D line plots now return line handles.
*3D ellipsoid and cylinder plots now return surf handles (implicit surface behavior was problematic).


Small text corrections


Mild tweaks and fixes


Small edits


Small edit


Small edit to Examples.mlx