Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 02-03-2011
darnnezt darnnezt is offline
Miembro
 
Registrado: jul 2010
Posts: 17
Poder: 0
darnnezt Va por buen camino
Arrow Ayuda Con Una Codificacion-delphi

BUENAS QUERIDOS AMIGOS Y AFELIADOS DEL CLUB DELPHI COMO EN OTRA OCASIONES, HE VUELTO ACA PARA PEDIR UN POCO DE SU AYUDA Y CONOCIMIENTOS SOBRE EL COMPLEJO PROGRAMA DELPHI:
EN ESTA OCACION LES TRAIGO COMO TAREA ( es solo Juego es un programa de la Universidad), el siguiente programa:
el cual desearía que me ayudaran a corregir el los posibles errores presentes en el y si es posible mostrarme hasta una mejor opción de cómo poder codificarlo.
Por otra parte el siguiente programa quería realizarlo usando ya se la estructura Repetitiva “ While to do” o la “Fort o Do” pero en visto de la falta de practica y conocimientos lo hice de la siguiente manera;

El PROGRAMA QUE DISEÑE SE BASA EN EL CALCULO DE CENTROIDES DE FIGURAS COMPUESTA, TENIENDO PREVIENTA EN AREA Y LAS COORDENADAS CENTROIDALES DE CADA FIGURA POR SEPARADO.

Les doy por adalantado las gracias aquellos que se adentren en mi Post también a los q tengan la molestia en ayudar,



Me despido con un cordial saludo : atta: DarNNezT


Código Delphi [-]
TForm1.Button1Click(Sender: TObject);
var a1,a2,a3,a4,a5,a6,areas:real;  // centroides de cada area 
x1,y1,z1:real; 
x2,y2,z2:real; 
x3,y3,z3:real; 
x4,y4,z4:real; 
x5,y5,z5:real; 
x6,y6,z6:real; 
//centroide general 
xc,yc,zc:real
//variables de centroidees  
ax1,ay1,az1:real; 
ax2,ay2,az2:real; 
ax3,ay3,az3:real; 
ax4,ay4,az4:real; 
ax5,ay5,az5:real; 
ax6,ay6,az6:real; 
begin  //Calculo  
//primera figura 
a1:= strtofloat(inputbox('VALOR DE LA PRIMERA AREA','A1=','')); 
x1:= strtofloat(inputbox('CENTROIDE DE LA PRIMERA FIGURA','x1=','')); 
y1:= strtofloat(inputbox('CENTROIDE DE LA PRIMERA FIGURA','y1=','')); 
z1:= strtofloat(inputbox('CENTROIDE DE LA PRIMERA FIGURA','z1=','')); 
ax1:= a1*x1;  
ay1:= a1*y1; 
az1:= a1*z1;  
//figura 2  
a2:= strtofloat(inputbox('VALOR DE LA  AREA','A2=','')); 
x2:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','x2=','')); 
y2:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','y2=','')); 
z2:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','z2=','')); 
ax2:= a2*x2;  
ay2:= a2*y2; 
az2:= a2*z2;  
//figura3  
a3:= strtofloat(inputbox('VALOR DE LA  AREA','A3=','')); 
x3:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','x3=','')); 
y3:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','y3=','')); 
z3:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','z3=','')); 
ax3:= a*x3;  
ay3:= a3*y3; 
az3:= a3*z3;  
//figura 4  
a4:= strtofloat(inputbox('VALOR DE LA  AREA','A4=','')); 
x4:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','x4=','')); 
y4:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','y4=','')); 
z4:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','z4=','')); 
ax4:= a4*x4;  
ay4:= a4*y4; 
az4:= a4*z4;  
//figura5  
a5:= strtofloat(inputbox('VALOR DE LA  AREA','A5=','')); 
x5:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','x5=','')); 
y5:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','y5=','')); 
z5:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','z5=','')); 
ax5:= a5*x5;  
ay5:= a5*y5; 
az5:= a5*z5;  
//figura 6  
a6:= strtofloat(inputbox('VALOR DE LA  AREA','A6=','')); 
x6:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','x6=','')); 
y6:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','y6=','')); 
z6:= strtofloat(inputbox('CENTROIDE DE LA  FIGURA','z6=','')); 
ax6:= a6*x6;  
ay6:= a6*y6; 
az6:= a6*z6;  
areas:= a1+a2+a3+a4+a5+a6; 
xc:= (ax1+ax2+ax3+ax4+ax5+ax16)/areas; 
yc:= (ay1+ay2+ay3+ay4+ay5+ay6)/areas; 
zc:= (az1+az2+az3+az4+az5+az6)/areas;  
//salidas  
showmessage:=(' LA COORDENADA XC:='+ formatfloat('0.00',xc)); 
showmessage:=(' LA COORDENADA YC:='+ formatfloat('0.00',yc)); 
showmessage:=(' LA COORDENADA ZC:='+ formatfloat('0.00',zc));

Última edición por Casimiro Notevi fecha: 02-03-2011 a las 01:04:11. Razón: solucionar etiquetas delphi
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Codificacion seryo Varios 1 08-02-2010 20:55:38
Ayuda con esta codificacion seryo Varios 3 03-02-2010 13:28:32
codificacion en IE ebeltete Windows 3 27-02-2008 12:53:55
Codificacion ean 128 sur-se Varios 0 30-03-2007 11:54:23
Codificacion... chileno Varios 7 10-06-2006 20:47:48


La franja horaria es GMT +2. Ahora son las 14:03:08.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi