acceso graf sencos raiz

Download Acceso Graf Sencos Raiz

If you can't read please download the document

Upload: rey-christian-huamani-nizama

Post on 16-Dec-2015

215 views

Category:

Documents


0 download

DESCRIPTION

ptoggra

TRANSCRIPT

PROGRAMA NOS PIDEN HACER UNA CLAVE DE ACCESO LA UCAL TENEMOS EL CODIGO EN EL GENERADOR LUEGO NOS PIDEN EN SU MENU HACER LAS GRAFICAS DEL"SEN COS" Y "RAIZ 2"PROPIEDADES DE LA VENTANAID CAPTIONIDD_APLICACION apli con clave de accesoIDE_USUARIO USUARIOIDE_PASSWORD PASSWORDIDB_ACCEDER ACCEDERIDCANCEL SALIR***PARA EL MENUen propiedades vincularemos el menu ala ventana llamada por el boton accederID CAPTIONMn_SENCOS SENO Y COSENOMn_RAIZ RAIZ CUADRADAcreamos las ventanas de la raiz y del seno-cosenoy las clases: CRAIZ dlg CSENCOS dlg*****PARA LLAMAR LAS VENTANAS DESDE EL MENU:agregar al inicio:#include "SENCOSdlg.h"#include "RAIZdlg.h"ON SENCOS{CSENCOSdlg acces;acces.Do Modal();}ON RAIZ{CRAIZdlg acces;acces.Do Modal();}PARA LAS GRAFICAS EN Class Wizard escogeremos la opcion WM_PAINT, agreamosuna funcion y escribiremos el siguiente codigo para ambossolo se cmabiara el codigo para cada grafica static DWORD dwcolor[q]={RGB(255,0,0),RGB(0,255,0),RGB(0,0,255),RGB(0,255,255),RGB(255,255,0),RGB(255,0,255),RGB(255,255,255),RGB(0,0,0),RGB(127,127,127)}CPen n_pincel;CPen v_pincel;Crect rect;GetClient Rect(rect);int cx=(rect.rigth-rect.left);int cy=(rect.botton-rect.top);dc.Set Map Mode(NM_ANISOTROPIC);//ESCALA DE LOS EJES CORDENADOSdc.SetWindows ext(840,300);dc.Set ViewPort Org ext(cx,-cy);dc.Set ViewPort Org (cx,-cy);dc.Set ViewPort Org ext(cx,-cy);dc.Set ViewPort Org (cx/2,-cy/2);//GRAFICANDO LAS CURVASAGREGAR AL INCIO #include**PARA LA GRAFICA DE LARAIZfloatx,raiz;for(x=0;x=800;x+=0.1){raiz=pow(x,1/2);dc.Get Line (x,raiz,RGB(255,0,0));dc.TextOut(100,100,"raiz");**PARA LA GRAFICA DEL SENY COSfloatx,sen,cos;sen=sin(x);cos=cos(x);dc.GetLine(x,sen,RGB(255,0,0));dc.GetLine(x,cos,RGB(0,0,255));dc.TextOut(100,100,"SEN Y COS");//para ambos escribiremos el codigo de dibujo de ejesn_pincel.CreatePen(PS_SOLID,1,dwColor[0]);v_pincel=dc.Select Objet(&n_pincel);dc.Moveto(0,-100);dc.Lineto(0,100);dc.TextOut(0,100,"y",1);dc.selectObject(n_pincel);v_pincel.Delete Object();n_pincel.Create Pen (PS_SOLID,1,dwColor[0]);v_pincel=dc.SelectObject(&n_pincel);dc.Moveto(-100,0);dc.Lineto(100,0);dc.TextOut(100,0,"x",1);dc.selectObject(n_pincel);v_pincel.Delete Object();}//FIn