Code covered by the BSD License  

Highlights from
Quadratic curves and quadric surfaces in implicit form

5.0

5.0 | 1 rating Rate this file 22 Downloads (last 30 days) File Size: 20.95 KB File ID: #28768

Quadratic curves and quadric surfaces in implicit form

by Levente Hunyadi

 

20 Sep 2010 (Updated 02 Oct 2010)

Work with general quadratic curves and quadric surfaces given as implicit equation.

| Watch this File

File Information
Description

This submission facilitates working with quadratic curves (ellipse, parabola, hyperbola, etc.) and quadric surfaces (ellipsoid, elliptic paraboloid, hyperbolic paraboloid, hyperboloid, cone, elliptic cylinder, hyperbolic cylinder, parabolic cylinder, etc.) given with the general quadratic equation

Q(x) = x' * A * x + b' * x + c = 0

where a pseudo-MatLab notation has been used. A is a symmetric N-by-N matrix (N = 2 or N = 3 not necessarily invertible), b is an N-by-1 column vector, and c is a scalar. The parameter x is an N-by-1 column vector. Those points x that satisfy Q(x) = 0 comprise the quadratic curve or quadric surface.

The package comprises of two major components.

First, a set of functions is included for quadratic curves that identify the conic section and compute explicit parameters (semimajor axis, semiminor axis, rotation matrix, translation vector) of a conic section given with the general quadratic equation; or plot a conic section, returning a lineseries object (for circles, ellipses and parabolas) or a hggroup object (for hyperbolas).

Second, the package contains an algorithm for computing the distance from a point in 2D to a general quadratic curve defined implicitly by a second-degree quadratic equation in two variables or from a point in 3D to a general quadric surface defined implicitly by a second-degree quadratic equation in three variables.

Utility functions are included to manipulate matrices of symbolic variables that were used to pre-compute polynomials shipped with the package.

MATLAB release MATLAB 7.10 (2010a)
Other requirements The functions in this submission should run in older MatLab releases with little or no changes.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
17 Dec 2010 Daniel Lopes

This is indeed an important package for
computer geometry. A missing link in MATLAB is provided to plot all family members of conic sections in an intuitive manner.
The code is well organized with a handful of examples.

Please login to add a comment or rating.
Updates
02 Oct 2010

Added identifying degenerate cases using syntax kind = imconic(p, 0) without triggering an error.

Tag Activity for this File
Tag Applied By Date/Time
conics Levente Hunyadi 20 Sep 2010 12:19:39
implicit form Levente Hunyadi 20 Sep 2010 12:19:39
plot Levente Hunyadi 20 Sep 2010 12:19:39
point and curve distance Levente Hunyadi 20 Sep 2010 12:19:39
point and surface distance Levente Hunyadi 20 Sep 2010 12:19:39
quadratic curve Levente Hunyadi 20 Sep 2010 12:19:39
quadric surface Levente Hunyadi 20 Sep 2010 12:19:39

Contact us at files@mathworks.com