Ver Mensaje Individual
  #4  
Antiguo 08-03-2011
darnnezt darnnezt is offline
Miembro
 
Registrado: jul 2010
Posts: 17
Reputación: 0
darnnezt Va por buen camino
Smile

Muchas gracias hermano por la ayuda ya pude encontrar solucion, por otra parte Centroide o centro de gravedad, es aquella parte de un cuerpo plano o superficie de revolucion donde se concentrada la mayor cantidad de masa, que a su vez esa masa multiplicada por al gravedad se combierte en Newton y por ende es una fuerza dirijida hacia abajo saludos..

yo codifique de esta manera creo q es igual

Código Delphi [-]
procedure TForm1.BitBtn1Click(Sender: TObject);
var areas,A,xc,yc,zc,x1,y1,z1,x,y,z,x2,y2,z2:real;
 n,i: integer;
begin
//inicializacion
i:=0;
areas:=0;
x:=1; y:=1; z:=1; x2:=0; y2:=0; z2:=0;

//estrutucra

//cantida de figuras
N:= strtoint(inputbox('INGRESE LA CANTIDAD DE FIGURAS','F=',''));


while ido
begin
A:= strtofloat(inputbox('INGRESE EL AREA','A=',''));

x:= strtofloat(inputbox('INGRESE LA COODENADA DEL CENTROIDE','X=',''));
Y:= strtofloat(inputbox('INGRESE LA COODENADA DEL CENTROIDE','Y=',''));
Z:= strtofloat(inputbox('INGRESE LA COODENADA DEL CENTROIDE','Z=',''));
//sumadores
  if x <>0 then
x1:= x*A;
if y<>0 then
y1:=y*A;
if z<>0 then
z1:= z*A;

x2:= x2+x1;
y2:= y2+y1;
z2:= z2+z1;

areas:= areas+a;




I:= i+1;
  end;

xc:= x2/areas;
yc:= y2/areas;
zc:= z2/areas;

showmessage(' LA SUMA DE LAS AREAS ES: ' +  formatfloat('0.0000',areas));
SHOWMESSAGE(' COORDENADA DE CENTROIDE EN X=' + formatfloat('0.0000',xc));
SHOWMESSAGE(' COORDENADA DE CENTROIDE EN Y=' + formatfloat('0.0000',yc));
SHOWMESSAGE(' COORDENADA DE CENTROIDE EN Z=' + formatfloat('0.0000',zc));
Responder Con Cita