0
$\begingroup$

Equation for the centroid a semi circular arc is x=2*r/(pi). If I have a circle with 1 cm of radius then its centroid is 2r/(pi)= 0.637 cm. Now I use the equation of this circle x^2+y^2=1^2 in Matlab to find all x coordinates of the circle. Then I find the mean of the all x coordinates, which is equal to 0.7812 cm.

According to definition of centroid: "Centroid is the mean position of all the points in all of the coordinate directions". Why does calculated mean value of x coordinates is not same as the value of centroid calculated by equation "x=2*r/(pi)" ?.

Here is the MATLAB code:

close all

clear all

y=1:-0.01:-1;

x= sqrt( 1-y.^2);

a=mean (x)

figure;

plot(x,y)

Link for the equation: https://mathworld.wolfram.com/PappussCentroidTheorem.html

$\endgroup$
  • $\begingroup$ Could you include your MATLAB code please? There's not much we can help you with otherwise... $\endgroup$ – jlammy Jan 13 at 20:44
  • $\begingroup$ What do you ask Mathlab, for a circle-points average or for circumference-points average? $\endgroup$ – Ripi2 Jan 13 at 20:50
  • $\begingroup$ Here is the MATLAB code: close all clear all y=1:-0.01:-1; x= sqrt( 1-y.^2); a=mean (x) figure; plot(x,y) $\endgroup$ – Tarlan Jan 13 at 20:51
  • $\begingroup$ I asked the mean values of X coordinates of circle. PS. I did not get what is the difference between circle points and circumference points. $\endgroup$ – Tarlan Jan 13 at 20:55
  • $\begingroup$ A circumference is the border of the circle. The centroid formula $2r/\pi$ is for a circle, while you are asking Mathlab for an average of a circumference. $\endgroup$ – Ripi2 Jan 13 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.