Beruflich Dokumente
Kultur Dokumente
NACIONAL
ESCUELA SUPERIOR DE
INGENIERIA MECANICA Y ELECTRICA
UNIDAD TICOMAN
PROYECTO FINAL
PARAMETRIZACION DE FUNCIONES
INTEGRANTES:
CISNEROS VITE EDGAR ULISES
LOPEZ GONZALEZ GUILLERMO
RAMIREZ MURO IVAN
RAMOS SEBASTIAN ARTURO
YAES MONJARDIN WILIAM ALEXIS
2AM1
29-MAYO-2013
OBJETIVO
Facilitar el estudio y el manejo de la parametrizacin de
funciones de curvas planas con respecto al clculo vectorial,
ya que como tal representa un aporte al estudiante y una
herramienta ms de aprendizaje, generndose un programa
didctico y fcil de comprender.
ANALISIS
HIPERBOLA
Necesitamos Po , Pf y F(x)
Caso 1:
(x-h)2 (y-k)2 =1
a2
b2
Caso 2:
x2 + x + y 2 + y + c = 1
c1 (x + a)2 c2 (x + b)2 =1 + a + b
(x + a)2 (x + b)2 =1
c12
c2 2
Caso 3:
(y-k)2 (x-h)2 =1
b2
a2
Caso 4:
y2 + y + x 2 + x + c = 1
(y-k)2 (x-h)2 =1
b2
a2
T(t)=<a sec t + h, b tan t + k>
X=a sec t + h Y=b tan t + k
a sec t1 + h=Pox
b tan t1 + k= Poy
t1 =sec -1 Pox - h
t1=tan -1 Poy k
a
b
a sec tf + h=Pox
b tan tf + k= Poy
tf =sec -1 Pox
-h
tf=tan -1 Poy k
a
b
Pedir
Po = Punto inicial
Pf = Punto final
ELIPSE
Necesitamos Po , Pf y F(x)
Caso 1:
(x-h)2 + (y-k)2 =1
a2
b2
Caso 2:
x2 + x + y 2 + y + c = 1
c1 (x + a)2+ c2 (x + b)2 =1 + a + b
(x + a)2 + (x + b)2 =1
c12
c2 2
Caso 3:
(y-k)2 + (x-h)2 =1
b2
a2
Caso 4:
y2 + y + x 2 + x + c = 1
(y-k)2 + (x-h)2 =1
b2
a2
T(t)=<a sec t + h, b tan t + k>
X=a sec t + h Y=b tan t + k
a sec t1 + h=Pox
b tan t1 + k= Poy
t1 =sec -1 Pox - h
t1=tan -1 Poy k
a
b
a sec tf + h=Pox
b tan tf + k= Poy
tf =sec -1 Pox
-h
tf=tan -1 Poy k
a
b
Pedir
Po = Punto inicial
Pf = Punto final
CIRCULO
Necesitamos Po , Pf y F(x)
Caso 1:
(x-h)2 + (y-k)2 = r2
Caso 2:
X2 + Y2 = r2
(x-h)2 + (y-k)2 = r2
X2 + 2xh + h2 + y2 + 2yk + k2 =r2
Caso 3:
X2 + Y2 = r2
X2 + 2xh + h2 + y2 + 2yk + k2 =r2
(x-h)2 + (y-k)2 = r2
T(t)=<r cos t + h, r sen t + k>
X=r cos t + h Y=r sen t + k
r cos t1 + h=Pox
r sen t1 + k= Poy
-1
t1 =cos Pox - h
t1=sen -1 Poy k
r
r
r cos tf + h=Pox
r sen tf + k= Poy
-1
tf =cos Pox
-h
tf=sen -1 Poy k
a
b
Pedir
Po = Punto inicial
Pf = Punto final
PARABOLA
Necesitamos Po , Pf y F(x)
Caso 1:
(x-h)2 =-4p (y-k)
X2 - 2xh + h2 = - 4p (y-k)
Caso 2:
(y-k)2 =4p (x-h)
Y2-2yk+k2=4p(x-h)
Caso 3:
(y-k)2 =-4p (x-h)
Y2-2yk+k2= - 4p(x-h)
Caso 4:
(x-h)2 =4p (y-k)
X2 - 2xh + h2 = 4p (y-k)
T(t)=<r cos t + h, r sen t + k>
X=r cos t + h Y=r sen t + k
r cos t1 + h=Pox
r sen t1 + k= Poy
-1
t1 =cos Pox - h
t1=sen -1 Poy k
r
r
r cos tf + h=Pox
r sen tf + k= Poy
-1
tf =cos Pox
-h
tf=sen -1 Poy k
a
b
Pedir
Po = Punto inicial
Pf = Punto final
LINEA RECTA
Podemos preguntas cual es la variable independiente.
Considerar si los coeficientes son positivos o negativos.
Pedir puntos en el plano para obtener un rango, para
esto igualamos el punto a la componente del vector y si
son iguales pertenecen a la funcin.
y=mx +b
x=my+ b
Caso 1:
X=t
Y=mt+b
r(t)= <t,mt+b>
Caso 2:
Y=t
X=mt+b
r(t)= <mt+b,t>
ALGORITMO
a.
b.
c.
d.
Recta
Parabola
Circulo
Elipse
Hiprbola
DIAGRAMA DE FLUJO
Inicio
b
Ingrese los puntos
Ingrese la f(x)
Lnea recta
Ingrese la f(x)
X2 / a2 + Y2 / b2 =1
Ingrese la f(x)
Parbola
Ingrese la f(x)
Y=mx+b
Ingrese la f(x)
X2 + Y 2 = R 2
X=my+b
(y-k)2 = 4p (x-h)
a
X2 / a2 - Y2 / b2 =1
a
a
a
aa
Se lleva a cabo la
parametrizacion
si
Desea realizar otra
operacin
No
Fin
CODIGO
CIRCULO
#include <conio.h>
#include <math.h>
#include <iostream>
#include <stdlib.h>
#define PI 3.14159265
using namespace std;
class circulo
{
float x,y,h,k,r,x1,y1,x2,y2,t1,t2,t3,t4,t5;
public:
float pide();
ELIPSE
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
using namespace std;
class elipse
{ public:
float
c1,c,c2,e,f,k,h,t1,t2,t0,x,y,t3,t4,x1,x2,y2,a,b,cx,d,tf,z,r;
void pide ()
{
cout<<"\n\nIntroduzca el valor de los coeficientes de
acuerdo a la siguiente ecuacion \n\n\n\t\t para llevar a cabo la
parametrizacion"<<endl;
cout<<"\n\n\tc1Y^2 + cY + c2X^2 + eX - f =
0"<<endl;
cout<<"\nc1"<<endl;
cin>> c1;
cout<<"\nc"<<endl;
cin>> c;
cout<<"\nc2"<<endl;
cin>> c2;
cout<<"\ne"<<endl;
cin>> e;
cout<<"\nf"<<endl;
cin>> f;
cout<<"\n\nIntroduzca el punto inicial y el final por el
que pasa la funcion"<<endl;
cin>> a >> b >> cx >>d;
}
void calculos()
{
k=c/2*c1;
h= e/2*c2;
z=sqrt(c2);
r=sqrt(c1);
x=(a+h)/z;
y=(b+k)/r;
t1= acos(x);
t2= asin(y);
x1=(c+h)/z;
y2=(d+k)/r;
t3= acos(x1);
t4= asin(y2);
if(t1==t2 && t3==t4)
{t0=t1;
tf=t3;
}
if(t1!=t2 || t3!=t4)
{
cout<<"\n\nLos puntos que introdujo no se
encuentran en la grafica"<<endl;
}
}
void prametrizacion ()
{
cout<<"\n\nLa ecuacion:\n\n\t "<<c1<<"Y^2 +
"<<c<<"Y + "<<c2<<"X^2 + "<<e<<"X - "<<f<<" = 0 \n
su parametrizacion es:"<<endl;
cout<<"\n\n\tr(t)=<"<<z<<"cos(t+"<<h<<"),"<<r<<"sen(t
+"<<k<<")>"<<endl;
cout<<"\n\n\tr(t){"<<t0<<","<<tf<<"}"<<endl;
}
};
main()
{
elipse obj1;
obj1.pide();
obj1.calculos();
obj1.prametrizacion();
system("pause");
HIPERBOLA
#include <conio.h>
#include <math.h>
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#define PI 3.14159265
using namespace std;
struct parametro
{
float y,x,a,b,c,h,;
};
class operaciones
{
struct parametro pt1, pt2, pt5, pt3, pt4;
float ti , tf, n, m,o,q;
public:
float pide();
float opera ();
float imprime ();
};
int main()
{
operaciones num;
system("cls");
cout<<"\t\t\t Parametrisacion de una hiperbola n\n\n";
num.pide();
num.opera ();
num.imprime();
system("pause");
return 0;
}
float operaciones::pide()
{
system("cls");
cout<<"Introduce los datos"<<endl;
cout<<"Primer funcion (x)"<<endl;
cout<<"Introduce el valor de x^2"<<endl;
cin>>pt1.a;
cout<<"Introduce el valor de x "<<endl;
cin>>pt1.b;
cout<<"Segundo valor (y)"<<endl;
cout<<"Introduce el valor de y^2"<<endl;
cin>>pt2.a;
cout<<"Introduce el valor de y "<<endl;
cin>>pt2.b;
cout<<"Tercer valor (constante)"<<endl;
cin>>pt5.c;
cout<<"Primer punto"<<endl;
cout<<"Introduce la coordenada x"<<endl;
cin>>pt1.x;
cout<<"Introduce la coordenada y"<<endl;
cin>>pt1.y;
cout<<"Segundo punto"<<endl;
cout<<"Introduce la coordenada x"<<endl;
cin>>pt2.x;
cout<<"Introduce la coordenada y"<<endl;
cin>>pt2.y;
}
float operaciones::opera()
{
system("cls");
if(pt1.b<=0)
{
pt3.a= pt1.a/ pt1.a;
LINEA RECTA
# include <iostream>
# include <stdlib.h>
# include <math.h>
using namespace std;
static float b;
float c,l1,l11,l2,l21;
class linea{
protected:
float m;
char opc;
float x1,x2,y1,y2;
public:
int pide();
int parametro();
};
main()
{
linea lineas;
cout<<"programa que parametriza la ecuacion de una
linea recta";
lineas.pide();
lineas.parametro();
system ("pause");
return 0;
}
int linea:: pide()
{
float t;
int *ptr[5];
cout<<"\n\n\tIntruduce los parametros que se
pidan"<<endl;
cout<<"\n\npendiente (m)";
cin>>m;
cout<<"\n\nOrdenada al origen (b)";
cin>>b;
if(m==0) cout<<"\nLa ecuacion es y="<<b<<endl;
if(m!=0){
if(b==0) cout<<"\nla ecuacion es "<<m<<"x"<<endl;
if(b>0) cout<<"\nla ecuacion es
"<<m<<"x+"<<b<<endl;
l11=(y1-b)/m;
l2=x2;
l21=(y2-b)/m;
if(l1!=l11||l2!=l21)cout<<"\n\nLos los limites no
pertenecen"<<endl;
if(l1==l11&&l2==l21)cout<<"\n\ncon limites que
van desde "<<l1<<" a "<<l2<<endl;
break;
case '2':
c=(b*(-1))/m;
if(m==0)cout<<"\n\nLa parametrizacion seria mas
facil en x";
if(m!=0){
if(b>0) cout<<"\n\nLa parametrizacion seria
(t/"<<m<<c<<",t)";
if(b<0)cout<<"\n\nLa parametrizacion seria
(t/"<<m<<"+"<<c<<",t)";
}
l11=y1;
l1=(m*x1)+b;
l21=y2;
l2=(m*x2)+b;
if(l1!=l11||l2!=l21)cout<<"\n\nLos los limites no
pertenecen"<<endl;
if(l1==l11&&l2==l21)cout<<"\n\ncon limites que
van desde "<<l1<<" a "<<l2<<endl;
break;
}
}
PARABOLA
#include
#include
#include
#include
<conio.h>
<math.h>
<iostream>
<stdlib.h>
cout<<"\nc= ";cin>>var0.c;
cout<<"\nd= ";cin>>var0.d;
cout<<"\n\n\tELIGE LA QUE SE ASEMEJE A TU ECUACION
PROPUESTA"
<<"\n\n\t1)ECUACION CON VERTICE EN EL ORIGEN:"
<<"\n\n\t
x^2 = 4py"
<<"\n\n\t2)ECUACION CON VERTICE EN UN PUNTO
p(h,k):"
<<"\n\n\t
(x-h)^2=4p(y-k)"
<<"\n\n\tDESARROLLADA:x^2-2xh+h^2=4p(y-k) ";
cin>>opc;
system("cls");
switch (opc)
{
case 1:
cout<<"\n\n\t1)ECUACION CON VERTICE EN EL
ORIGEN:"
<<"\n\n\t
x^2 = 4py";
cout<<"\n\nINGRESA EL VALOR DEL COEFICIENTE DE
x^2: ";
cin>>var1.x;
cout<<"\n\nINGRESA EL VALOR DEL COEFICIENTE DE
y: ";
cin>>var1.y;
cout<<"\n\nINGRESA EL VALOR DEL COEFICIENTE DE
p: ";
cin>>var1.p;
break;
case 2:
cout<<"\n\n\t2)ECUACION CON VERTICE EN UN PUNTO
p(h,k):"
<<"\n\n\t
(x-h)^2=4p(y-k)"
<<"\n\n\tDESARROLLADA:x^2-2xh+h^2=4p(y-k) ";
}
if(opc==2)
{
cout<<"\n\nVALOR DE Tinicial: ( "<<var0.a<<" ,
"<<var0.b<<" )"
<<"\n\nVALOR DE Tfinal: ( "<<var0.c<<" ,
"<<var0.d<<" )\n\n"
<<
"\n\t\t<<<PARAMETRIZACION>>>"
<<"\n\n\tHACEMOS USO DE LA IDENTIDAD
TRIGONOMETRICA\n\n\tsec^2(t)-tan^2(t) = 1 "
<<"\n\n\ttan^2(t)=sec^2(t) - 1"
<<"\n\n\tx - h = tan (t) /\ x = tan (t) + h"
<<"\n\n\ty= (1/4p)(sec^2 (t) - 1) + k"
<<"\n\n\t\t<<<FUNCION PARAMETRIZADA>>>"
<<"\n\n\tR(T)=< tan (t) + "<<sqrt(var2.h)<<" ; "
<<1/(4*var2.p)<<"(sec^2 (t) - 1) +
"<<var2.k<<">\n"
<<"\n\n\t\t<<<LIMITES DE PARAMETRIZACION>>>"
<<"\n\n\tR(T):[ 0 ; + ]";
}
}
PROGRAMA CENTRAL
#include <conio.h>
#include <iostream>
#include "LINEARECTA.cpp "
#include "CIRCULO.cpp "
#include "ELIPSE.cpp "
#include "HIPERBOLA.cpp "
#include "PARABOLA.cpp "
using namespace std;
class principal
{
public:
void menu();
};
int main()
{
system("color 1e");
principal obj;
cout<<"\n\n\t||------------------------------------------------------------||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t|| PROGRAMA QUE PARAMETRIZA CURVAS EN 2
DIMENSIONES (X,Y) ||"
<<"\n\t||
||"
<<"\n\t||
CON FINES DIDACTICOS Y DE
AUTOAYUDA
||"
<<"\n\t||
||"
<<"\n\t|| PROYECTO DE PROGRAMACION ORIENTADA A
OBJETOS ||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
ALUMNOS:
||"
<<"\n\t||
||"
<<"\n\t||
RAMIREZ MURO IVAN
||"
<<"\n\t||
||"
<<"\n\t||
LOPEZ GONZALES GUILLERMO
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||
||"
<<"\n\t||-----------------------------------------------------------||";
getch();
b:
system("cls");
system("color 1e");
obj.menu();
goto b;
}
void principal::menu()
{
principal obj;
int opc;
a:
cout<<"\n\n\tELIGE UNA DE LAS SIGUIENTES CURVAS A
PARAMETRIZAR:"
<<"\n\n\n\t1) PARAMETRIZACION DE RECTA"
<<"\n\n\n\t2) PARAMETRIZACION DE CIRCULO"
<<"\n\n\n\t3) PARAMETRIZACION DE ELIPSE"
<<"\n\n\n\t4) PARAMETRIZACION DE HIPERBOLA"
<<"\n\n\n\t5) PARAMETRIZACION DE PARABOLA "
<<"\n\n\n\t6) SALIR!!\n\t";
cin>>opc;
system("cls");
if(opc==1)
{
system("color 1a");
linea lineas;
cout<<"\n\n\tPARAMETRIZACION DE LA ECUACION
GENERAL DE LA LINEA RECTA\n\n";
lineas.pide();
lineas.parametro();
getch();
}
if(opc==2)
{
system("color 1a");
circulo num;
cout<<"\n\n\t PARAMETRIZACION DE LA ECUACION DE
UN CIRCULO \n\n";
num.pide();
num.opera ();
getch();
}
if(opc==3)
{system("color 1a");
cout<<"\n\n\t PARAMETRIZACION DE LA ECUACION DE
UNA ELIPSE \n\n";
elipse obj1;
obj1.pide();
obj1.calculos();
obj1.prametrizacion();
getch();
}
if(opc==4)
{system("color 1a");
PANTALLAS DE DESPLIEGUE
CONCLUSIONES
Cisneros Vite Edgar Ulises
Para poder dar una conclusin de este proyecto debo decir
que nos enfocamos en un programa que sea utilizado para
nosotros como para nuestros compaeros. Creo sin embargo
que por el reducido tiempo que invertimos en la realizacin
del proyecto no se alcanzaron a prever alguno detalles que lo
haran mucho ms funcional, lo cual exige a quien lo utilice a
tener un cierto conocimiento de geometra analtica.
Puedo concluir que fue un reto, sin embargo tambin que este
proyecto sirvi para que le demos una aplicacin ms tangible
a lo que la P.O.O se refiere, A pesar de las dificultades puedo
concluir que quedo satisfecho con el trabajo ya que exploto el
ingenio de cada persona que participo en el.
Lpez Gonzlez Guillermo
El proyecto cumpli con el objetivo para el cual fue creado. El
lograrlo requiri el uso de los conocimientos adquiridos a lo
largo del curso. El aplicar estos conocimientos para resolver
algn problema en la vida real puede ser complicado, sin
embargo con el trabajo en equipo y la abstraccin necesaria
el realizarlo es posible. Los puntos clave para llevar a cabo un
proyecto de este tipo fueron; encontrar algn problema o una
necesidad, que es necesario para poder satisfacer esa
necesidad, como se puede resolver de acuerdo a los
conocimientos que tienen o que conocimientos se requieren,
disear un plan para llevarlo a cabo, ejecutar el plan y
analizar los resultados que se obtuvieron para poder ver si se
pueden hacer mejoras.
Ramrez Muro Ivn