image thumbnail

CIRCLE FIT IN HEART SHAPE

by

 

It fits all four circle in Heart Shape Which gives Radius and Center for each

stlazimuth.m
%this function derive azimuth from x and y value in 0 to 360 term and
%returns sorted array
function [plts] = stlazimuth(plts)
i=size(plts,2)+1;
plts(:,i)=180*atan(plts(:,2)./plts(:,1))/pi;
plts(:,i)=or(and(plts(:,1)<0,plts(:,2)<0),and(plts(:,1)<0,plts(:,2)>0))*180+plts(:,i);
plts(:,i)=and(plts(:,1)>0,plts(:,2)<0)*360+plts(:,i);
plts=sortrows(plts,i);

Contact us