About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • Last update: 5 years ago
  • Total downloads: 32
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Johannes Korsawe
See full specifications

scripts default iconcirclefit3d - fit circle to three points in 3d space (Scripts) Publisher's description

[center,rad,v1,v2] = circlefit3d(p1,p2,p3)

[center,rad,v1,v2] = circlefit3d(p1,p2,p3)

This function computes centers and radii of circles, that interpolate some given triples of points in 3d space.

The function accepts the input of matrices of trial points also, returning a matrix of corresponding centroids and a vector of corresponding radii. Corresponding points are assumed to be located in the same row in each matrix p1, p2 and p3.

Several error checks are done (collinearity, size of inputs) and return different error codes in return argument rad.

The function uses vector algebra only, is fully vectorized and should run quite fast.

Additional outputs are basis vectors v1 and v2 to describe the plane of the resulting circle.


[center,rad,v1,v2] = circlefit3d(p1,p2,p3);
plot3(p1(:,1),p1(:,2),p1(:,3),'bo');hold on;plot3(p2(:,1),p2(:,2),p2(:,3),'bo');plot3(p3(:,1),p3(:,2),p3(:,3),'bo');
for i=1:361,
a = h(i)/180*pi;
x = center(:,1)+sin(a)*rad.*v1(:,1)+cos(a)*rad.*v2(:,1);
y = center(:,2)+sin(a)*rad.*v1(:,2)+cos(a)*rad.*v2(:,2);
z = center(:,3)+sin(a)*rad.*v1(:,3)+cos(a)*rad.*v2(:,3);
axis equal;grid on;rotate3d on;

System Requirements:

MATLAB 7.11 (2010b)
Program Release Status: New Release
Program Install Support: Install and Uninstall

circlefit3d - fit circle to three points in 3d space (Scripts) Tags:

Click on a tag to find related softwares

Is circlefit3d - fit circle to three points in 3d space (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.