-
Notifications
You must be signed in to change notification settings - Fork 1
/
RESIDUE.BAK
93 lines (84 loc) · 1.26 KB
/
RESIDUE.BAK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
void plot(double x,double y,int c,double sx,double sy)
{
if(fabs(x)<getmaxy())
{
if(y>0)
{
if(sx+1>fabs(y))
{
putpixel(sy+x,sx-y,c);
lineto(sy+x,sx-(y));
}
}
if(y<0)
{
if(sx+1>fabs(y))
{
putpixel(sy+x,sx+fabs(y),c);
lineto(sy+x,sx+fabs(y));
}
}
}
}
*/
/*
int get_n(int n)
{
cout<<"\n\t Enter the value of n";
cin>>n;
return(n);
}
*/
double f=0.05;
double T=1/f;
double dx=1;
//cout<<sx<<" "<<sy;getch();
for(double x=-sy;x<sy;x+=dx)
{
double y=0;
/*
for(int n=0;n<3;n++)
{
//y+=coeff(n,f,T,x)*sin(2*M_PI*f*n*x);
y+=sin(2*M_PI*f*n*x);
}
*/
//term=sin(2*M_PI*f*n*x);
/*
int a=100;
for(int j=0; j<a; j++)
{
*/
//plot(x*j,1000,4,sx,sy);
//delay(500);
//plot (x,y*100,4,sx,sy);
//cou t<<"("<<x<<","<<y<<")"<<endl;
//ge tch();
//p lot(x*j,1000,2,sx,sy);
// delay(500);
}
/*
for(x=-sy;x<sy;x+=dx)
{
if(fabs(x*scx)<sy)
{ y=f(x);
if(errno!=EDOM)
{
y*=scy;
x*=scx;
if(x>=l&&x<=u)
{
s+=y*dx;
line(sy+x,sx,sy+x,sx-y);
}
plotr(x,y,c,0,len,sx,sy,m);
asdf++;
delay(1);
m=(f(x+dx)-f(x))/dx;
m=-1/m;
y/=scy;
x/=scx;
}
}
} /* */