Docsity

Теория Попова курсовая по математике , Дипломная из Математика

Toggle sidebar
bg1
#include <graphics.h>
#include <stdio.h>
#include <iostream.h>
#include <conio.h>
#include <dos.h>
#include <math.h>
typedef float (*Otv)(float w);
unsigned char GraphMode(void);
void BackGround(void);
float Formula1(float w);
float Formula2(float w);
void ShowGrafic(void);
void LinePopov(void);
float Xmas=30; // Масштаб
float Ymas=30;
main()
{
clrscr();
if (GraphMode()==0){ // Инициализация
графики
BackGround(); // Построение СКО
ShowGrafic(); } // Построение
графиков
return 0;
}
unsigned char GraphMode(void)
{
int driver, mode;
unsigned char err;
driver = DETECT;
initgraph(&driver,&mode,"");
err = graphresult();
if (err!=grOk) {cout<<"\n\t"<<grapherrormsg(err);
getch();
return 1;}
return 0;
}
void BackGround(void)
{
int xmax = getmaxx();
int ymax = getmaxy();
setcolor(15);
rectangle(0,0,xmax,ymax);
line((int)(xmax/2),10,(int)(xmax/2),ymax-10);
line(10,(int)(ymax/2),xmax-10,(int)(ymax/2));
pf3

Частичный предварительный просмотр текста

Скачай Теория Попова курсовая по математике и еще Дипломная в формате PDF Математика только на Docsity!

#include <graphics.h> #include <stdio.h> #include <iostream.h> #include <conio.h> #include <dos.h> #include <math.h>

typedef float (*Otv)(float w);

unsigned char GraphMode(void); void BackGround(void); float Formula1(float w); float Formula2(float w); void ShowGrafic(void); void LinePopov(void);

float Xmas=30; // Масштаб float Ymas=30; main() { clrscr(); if (GraphMode()==0){ // Инициализация графики BackGround(); // Построение СКО ShowGrafic(); } // Построение графиков return 0; }

unsigned char GraphMode(void) { int driver, mode; unsigned char err; driver = DETECT; initgraph(&driver,&mode,""); err = graphresult(); if (err!=grOk) {cout<<"\n\t"<<grapherrormsg(err); getch(); return 1;} return 0; }

void BackGround(void) { int xmax = getmaxx(); int ymax = getmaxy(); setcolor(15); rectangle(0,0,xmax,ymax); line((int)(xmax/2),10,(int)(xmax/2),ymax-10); line(10,(int)(ymax/2),xmax-10,(int)(ymax/2));

line((int)(xmax/2)-3,15,(int)(xmax/2),10); line((int)(xmax/2),10,(int)(xmax/2)+3,15); line(xmax-15,(int)(ymax/2)-3,xmax-10,(int)(ymax/2)); line(xmax-15,(int)(ymax/2)+3,xmax-10,(int)(ymax/2)); settextstyle(2,0,5); outtextxy((int)(xmax/2)+7,10,"jwQ(w)"); outtextxy(xmax-35,(int)(ymax/2)+7,"P(w)"); settextstyle(2,0,4); outtextxy((int)(xmax/2)-8,(int)(ymax/2)+1,"0"); setcolor(15); }

void ShowGrafic(void) { Otv Re=Formula1; Otv Im=Formula2; int xmax = getmaxx(); int ymax = getmaxy();

for(float Step=0; Step<=40; Step=Step+0.0001){ // procedure Grafic putpixel(xmax/2+Xmas(Re)(Step),ymax/2+Ymas(Im) (Step),15); } setcolor(11); line((int)xmax/2+Xmas,(int)(ymax/2)+4,(int)(xmax/2)+Xmas,(int) (ymax/2)-4); line((int)xmax/2-Xmas,(int)(ymax/2)+4,(int)(xmax/2)-Xmas,(int) (ymax/2)-4); LinePopov(); while(!kbhit()); // Ожидание нажатия closegraph(); }

float Formula1(float w) { return (0.0044wwww-0.223ww-1)/ (-(0.63w-0.009www)(0.63w-0.009www)-(1-0.087ww) (1-0.087ww)); }

float Formula2(float w) { return -ww(0.034ww+0.14)/ (-(0.63w-0.009www)(0.63w-0.009www)-(1-0.087ww) (1-0.087ww));

}

void LinePopov(void)