Loading...

How to draw 2D & 3D Regression in AutoCAD: lines, circles, spheres, planes. InnerSoft CAD

2,355 views

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Sep 28, 2012

http://innersoft.itspanish.org/en/

13.2.2.- 2D Regression

You can draw some graphical objects that are calculated by regression using a cloud point. You can also draw a point at the Center of Mass of the cloud point (a point which coordinates are X Mean and Y Mean). Application will send to the command line a complete summary of the regression information.

Line by Simple Linear Regression: Y on X

This tool computes a linear regression from a cloud of points; also draw the corresponding straight line. The regression of Y on X minimizes the vertical offsets of the points to the regression line.
After calculating the line, application will send to the command line the mean, variance, covariance, linear equation and linear correlation coefficient. Also report the sum of the quadratic residues.

Line by Simple Linear Regression: X on Y

This tool computes a linear regression from a cloud of points; also draw the corresponding straight line. The regression of X on Y minimizes the horizontal offsets of the points to the regression line.

After calculating the line, application will send to the command line the mean, variance, covariance, linear equation and linear correlation coefficient. Also report the sum of the quadratic residues, defined as the sum of the quantities [Xi – (aYi+b)]2 for the point cloud, where a and b are the slope and the x-intercept of the line calculated: X = aY + b.

Line by Orthogonal Regression: Deming Method

Deming Regression is an orthogonal linear regression method. The orthogonal regressions minimize the perpendicular offsets of points to the line.

Once the line has been calculated, application will send to the command line the mean, the equation of the line and the quadratic sum of residues.

Circle by Least Squares Regression

Given a planar point cloud (the Z coordinate of points is ignored), application calculate the circle that best fits to the cloud. Needless to say, app will not minimize the real distances, but the sum of the following residues
R2 – (Xi - a)2 – (Yi - b)2
where (a, b) are the coordinates of the center of the circle and R its radius.

Once calculated the circle, app will send to the command line its center and radio.

App also send to the command line the quadratic sum of real residues, that is, the quadratic sum of real orthogonal distances of all points to the circle, although it should be clear that this quantity is not what is minimized in the method The approach, however, usually gives good results.

Line by 3D Orthogonal Regression

Given a 3D point cloud, app calculates the line that minimizes the orthogonal distances of the points to such line.
Once drawn the line, app will send to the command line the coordinates of the center of mass, the direction vector of the line and the sum of quadratic residues, which is the sum of squares of orthogonal distances of point cloud to the line.

Plane by Least Squares Regression on Z axis

Given a cloud of points, app calculates the plane that minimizes the vertical distances of the points to it. Is remarked that the quantity that app minimize is not the orthogonal real distances, but the vertical distances measured in the Z axis.

After drawing the plane, the plane will send to the command line the following information: position of center of mass, equation of the plane and sum of quadratic residues, i.e., the sum of the squares of the vertical distances of the points to the plane.

Plane by 3D Orthogonal Regression: SVD Method

Given a cloud of points, will calculate and draw the plane such that the real distances of the points or orthogonal to this is the minimum possible.

For the calculation, app uses the method of Singular Value Decomposition, which is numerically stable.

After drawing the plane, app will send to the command line the following information: position of center of mass, equation of the plane and sum of quadratic residues, i.e., the sum of squares of real orthogonal distances of points cloud to plane.

Sphere by Least Squares Regression

Given a 3D point cloud, application calculates the sphere that best fits to the cloud. Needless to say, app will not minimize the real distances, but the sum of the following residues
R2 – (Xi - a)2 – (Yi - b)2 – (Zi -c)2
where (a, b, c) are the coordinates of the center of the sphere and R its radius.

Once calculated the sphere, app will send to the command line its center and radio. Also will send the sum of quadratic residues, defined as the sum of following quantity for all points
[R2 – (Xi - a)2 – (Yi - b)2 – (Zi - b)2]2

App also send to the command line the quadratic sum of real residues, that is, the quadratic sum of real orthogonal distances of all points to the sphere, although it should be clear that this quantity is not what is minimized in the method The approach, however, usually gives good results.

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...