• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

realize a circle passing through multiple points

  • Thread starter Thread starter topogeo
  • Start date Start date
your answers to the problem, without looking too much for my little knowledge, seem correct.
in any case your explanation is very exhaustive and complete.
practically, in the specific case and in competition with the tolerances allowed in my work, limit the measures to a few data (points) and limit me to the averages between the coordinates.
Also in the definition of curves, for example, I define the minimum and maximum and leave the program to define the course of the curve.
Of course, yours was a good job.
I thank all those who contributed to my compression.
cordially, antonio.
 
No lightning, I'm referring to the red ones, in the fat part.
Code:
[B]for i=1:npunti
ax(i,:) = [1, [COLOR="Red"]cos[/COLOR](scoffs)
bxi,: ) = [xi(i)];
ay(i,:) = [1, [COLOR="Red"]sin[/COLOR](t(i))];
by(i,:) = [yi(i)];
than[/B]xx = inv(transpose(ax)*ax)*transpose(ax)*bx;
xy = inv(transpose(ay)*ay)*transpose(ay)*by;
xcc = xx(1);
ycc = xy(1);
rr = (xx(2)+xy(2))/2;
% design reconstructed circumference
xxi=xcc+rr*cos(t);% I generate x of the reconstructed circumference points
yyi=ycc+rr*sin(t);% genero la y of the reconstructed circumference points
plot(xxi,yyi,'r'); % drawing circumference
if you do not know what and sin (for the reasons described before), the part of "transpose" and later, go to be blessed.
Am I wrong? Is there something I didn't understand?
 
No lightning, I'm referring to the red ones, in the fat part.
I'm... I'm counting now.
points must be in order. when you do the acquisition you will start from point to point to and end in point b, the points will be acquired in this order. if you pass them to the software in this order, he will associate them to a progressive angle, no matter whether correct or not.

If you mess with them... It's to try.
 
I'm... I'm counting now.
points must be in order. when you do the acquisition you will start from point to point to and end in point b, the points will be acquired in this order. if you pass them to the software in this order, he will associate them to a progressive angle, no matter whether correct or not.

If you mess with them... It's to try.
I can't explain, I think, I try differently.
Regardless of the acquisition order, point 1 will have a x and a y, only safe data
by breaking the coordinates of the point, you will have a coordinate a)valx=x,valy=0;
a coordinate b)valx=0,valy=y
and a co-ordinate c)valx=x,valy=y;
besides the coordinate we will call d) valx=0,valy=0.
the angles you can measure are those derived from the imaginary triangles a-d-c and b-d-c
but the point d), being a derivation of the initial point (subject to error by definition), is not and cannot be the center of the circle.
is the origin of the coordinates (of those of all points), but not of the circle sought.
to understand how it would work, try to assign as a condition that all x of the cloud should be >0 and all y > 0
in this case, the angle of the point obtained from the program, would be that compared to the origin of the coordinates, not the angle regarding the center of the circle.
 
the proposed algorithm does not find the circumference, but it finds at least squares the two sineroids approximate points. to work therefore must know the correct order of points. It is not important that the angle is correct, the important thing is that it is ordered.

I did so because I imagined that if I have a tool that acquires points by turning, I know the angle of each acquisition.
If I don't have this, I can find the corner from the center of the points. even if it is not the center of circumference, it commands me the same points.

Alternatively you can use this code:
Code:
 a=[x y ones(npunti)]\[-(x.^2+y.^2)];
xcc = -.5*a(1);
ycc = -.5*a(2);
rr = ((a(1)^2+a(2)^2)/4-a(3))^0.5;
in this case the equation system I go to solve is:
x1^2 + y1^2 + a1 x1 + a2 y1 + a3 = 0
x2^2 + y2^2 + a1 x2 + a2 y2 + a3 = 0
...

that solves to the minimum squares (then with the same algorimo) directly the canonical equation of the circumference in the plane.
but this for circumferences acquired incompletely, or noisy acquisitions, quickly loses precision.
 
It was,
because in free time do not try to realize This is what vision?

That discussion has been suspended, and so far the only working solution remains This is what...
I really thought I had solved the problem significantly better than the one posted, and in two different ways.
As long as I don't know about lisp, I had proposed to write a software that takes the dxf into the input with the points and returns out a dxf with the circumference.

I can easily write it under linux. If you want it under windows it will take a little more because I have to put on a virtual machine.
 
do so you pass a single spline on all points then divide it into 3 parts and eventually make a tangent circle three curves.
 
do so you pass a single spline on all points
If sowing contains thousands of points, how do you connect them by hand?

better a semi-automatic solution (such as the above-mentioned geometric one) or completely automatic solution (like that of fr), or not?

:
 
really alluded to a working solution in practice e non solo in theoryHowever, we wait for this software that reads points and ejects 1 circumference. . .

:
I swear I don't understand what you mean.
a code that takes the points and returns center and radius of the circumference what has of theorist and of little practical?
The theory is that you didn't install matlab (or its freeware surrogates) and so you don't know where to copy paste my code?

I was first accused of talking and not doing, then I did and he accuses me of doing only in theory. The next step might be that I come to your house, install the software, teach you to use it and then I verify that you use it correctly, or maybe it's better if I do the job directly?

I just apologize, but I'll introduce you to the invoice.
 
If sowing contains thousands of points, how do you connect them by hand?

better a semi-automatic solution (such as the above-mentioned geometric one) or completely automatic solution (like that of fr), or not?

:
depends on the software you use

if you have the macro that connects all the points with a spline the game is made ;)
 
exploiting the center of the points it was possible to apply the acuprthm of the minimum squares to better approximate a cloud of points of a seal ring.

thanks fulvio Romano
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top