0

*Hello everyone, I need your help, I'm looking for the center of the figure in green in terms of a point with these coordinates (X, Y) that I posted on the following link: https://i.stack.imgur.com/7jPqM.jpg I tried to apply Guldin's method? ? , look for the center of gravity, the moment of inertia but in vain. could you help me and provide me the code in scilab, because I've been looking for the solution in terms of code and mathematical analysis for a long time. you will find attached the scilab code. enter code here

 function y = h(x)
  if x < 50 | 210 < x then
    error("Out of range");
  elseif x <= 90 then

    y= -57.376067 +9.3746343*x -0.2175008*x^2  +0.0013792*x^3    
   //disp('50-90')
    return;
  elseif x <=100  then

     y=  10330.932 -336.90229*x +3.6300206*x^2  -0.0128709*x^3;
    //disp('90-100')
  elseif x <= 130 then

      y=-6387.7416 +164.65791*x -1.3855814*x^2  +0.0038478*x^3;  
  //disp('100-130')
    return;
  else

    y = 5028.1996 -98.786888*x +0.640917*x^2  -0.0013484*x^3; 
  //disp('130-210')
  end
endfunction
t=[50:210];
plot(t,feval(t,h),'r*')


  l=[50 60 90 100 130 150 210]  
  k=[40  20  30 70 55 80 60]
  plot(l,k,'d')

for i=[40  20  30 70 55 80 60]

 teta=[0: 220]
 beta=linspace(100,100,221)

plot(teta,beta,'*')   
teta1=[100:160:221]
 beta1=linspace(100,160-2*rand(),221) 
 plot2d3(teta1,beta1) 
 end





a=gca()
a.sub_ticks = [5,5]
a.grid_thickness = [0.05,0.05];
a.grid = [-1,-1]
a.grid_position = "foreground"
//a.grid_thickness = [0.05,0.05]

xgrid(0)
C=[50 60 90 100 130 150 210]
//for j=1:size(C,'c')
//C(j)
//if c(k)<=50 then
// (m=k+1& c(m))

J=numderivative(h,t) /*jacobien*/


//f=C(j)
// J=numderivative(h,i) /*jacobien*/
 deff('[z] = h2(k)', 'z = h(k)-100');     
// disp(C(j))
//for i=[157.56011:204.1084]

[x,fx,v]=fsolve([150,200],h2)
disp(x)
disp(fx)
plot(x,fx+100,)
disp(v)
//plot(x,h2,'d')
//end
//po=[50 60 90 100 130 150 210]
//co=[40 20 30 70 55 80 60]
lh=linspace(157.56011,204.1084);
lpo=feval(lh,h);
 xfpoly(lh,lpo)
e=gce()
e.background=13
  • this is really frustrating to see that you do not care about the feedback you are given on this website. Here in the comments of [this post](https://stackoverflow.com/q/55514759/4999991) I gave you instructions about asking good questions. Sadly you disregard again almost all of them! this in my opnion is disrespectfull to your peers. – Foad S. Farimani Feb 27 '20 at 13:21
  • @Foad what are you talking about, what instruction have i not followed? I'm looking for the center of the green shape, that's all. – Faical Mekkaoui Feb 28 '20 at 09:02
  • not cool man. not cool. I mentioned the link! All you have to do is to click on it, read the instructions and follow them. – Foad S. Farimani Feb 28 '20 at 17:23
  • @Foad mister fouad, i see what you mean, next time i will try to respect the rules of the game, but apparently you didn't understand my question. I'm looking for the bary center or else a central point of the figure i posted, and if i ask for help on this forum it is because of the exhaustion of not finding the solution and the help to this problem. All the more the necessity brings me to listen to your criticism so hard. – Faical Mekkaoui Feb 29 '20 at 20:55

0 Answers0