Código de Pascal/Turbo Pascal - Graficar funciones trigonométricas

Versión 1
estrellaestrellaestrellaestrellaestrella(7)

Publicado el 31 de Octubre del 2002gráfica de visualizaciones de la versión: Versión 1
27.403 visualizaciones desde el 31 de Octubre del 2002
estrellaestrellaestrellaestrellaestrella
estrellaestrellaestrellaestrella
estrellaestrellaestrella
estrellaestrella
estrella

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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
{**************************************
 *  GRAFICAS TRIGONOMETRICAS          *
 *  AUTOR: ALEJANDRO CESPEDES D.      *
 *  UNIVERSIDAD DE PLAYA ANCHA        *
 **************************************}
 
 
program graficas_funciones;
uses crt,graph;
var
   amplitud : integer;       {valor que establece cada cuantos pixeles
                              se considera una unidad}
 
{========================================================================}
procedure iniciar_graficos;
var
   codigo_error,
   modograf,
   drvgraf      : integer;
 
begin
     drvgraf:=detect;
     initgraph(drvgraf,modograf,'c:\tp\bgi');
     codigo_error := graphresult;
     if codigo_error <> 0 then
     begin
          writeln('Error de graficos: ',grapherrormsg(codigo_error));
          readkey;
          halt(1);
     end;
end;
{==========================================================================}
procedure numeros_en_pantalla(uni:integer);
{dibuja las lineas que hacen de numeros, recibe el en x la amplitud}
var
   inf,
   sup : integer; {variables que establecen cuantos "numeros"
                   se dibujaran}
 
begin
 
     inf := -15;
     sup :=  15;
     while inf < sup do
     begin
          setcolor(yellow);
          line((getmaxx div 2)+inf*uni,(getmaxy div 2)-2,(getmaxx div 2)+inf*uni,(getmaxy div 2)+2);
          line((getmaxx div 2)-2,(getmaxy div 2)+inf*uni,(getmaxx div 2)+2,(getmaxy div 2)+inf*uni);
          inc(inf);
     end;
end;
 
{=========================================================================}
procedure pantalla_grafica(x:integer);
{dibuja un eje x,y en pantalla, traspasa x (amplitud) al procedimiento
numeros_en_pantalla}
begin
     cleardevice;
     setcolor(blue);
     setbkcolor(lightblue);
     {lineas en la pantalla}
     line(getmaxx div 2,0, getmaxx div 2, getmaxy);
     line(0, getmaxy div 2, getmaxx, getmaxy div 2);
     setcolor(red);
     outtextxy((getmaxx div 2)-20,10,'Y');
     outtextxy(getmaxx-20,(getmaxy div 2)+5,'X');
     numeros_en_pantalla(x);
end;
 
{========================================================================}
procedure menu;
begin
     cleardevice;
     setbkcolor(blue);
     setcolor(red);
     rectangle(100,50,520,400);
     setcolor(white);
     floodfill(110,60,red);
     settextstyle(1,0,2);
     SETCOLOR(BLACK);
     outTextxy(180,60,'SELECCIONE UNA GRAFICA');
     setcolor(red);
     line(180,85,430,85);
     settextstyle(0,0,1);
     setcolor(red);
     outtextxy(120,150,'1.- ');
     setcolor(blue);
     outtextxy(150,150,'Sen(x)');
     setcolor(red);
     outtextxy(120,180,'2.- ');
     setcolor(blue);
     outtextxy(150,180,'Cos(x)');
     setcolor(red);
     outtextxy(120,210,'3.- ');
     setcolor(blue);
     outtextxy(150,210,'Tg(x)');
     setcolor(red);
     outtextxy(120,240,'4.- ');
     setcolor(blue);
     outtextxy(150,240,'ln(x)');
     setcolor(red);
     outtextxy(230,150,'5.- ');
     setcolor(blue);
     outtextxy(260,150,'raiz(x)');
     setcolor(red);
     outtextxy(230,180,'6.- ');
     setcolor(blue);
     outtextxy(260,180,'X2');
     setcolor(red);
     outtextxy(230,210,'7.- ');
     setcolor(blue);
     outtextxy(260,210,'csc(x)');
     setcolor(red);
     outtextxy(230,240,'8.- ');
     setcolor(blue);
     outtextxy(260,240,'ctg(x)');
     setcolor(red);
     outtextxy(330,150,'9.- ');
     setcolor(blue);
     outtextxy(360,150,'sec(x)');
     setcolor(blink);
     outtextxy(200,350,'PRESIONE <esc> PARA SALIR....');
 
 
end;
{=====================================================================}
procedure salida;
 
begin
     cleardevice;
     setbkcolor(blue);
     setcolor(white);
     settextstyle(3,1,4);
     outtextxy(50,50,'GRAFICAS DE FUNCIONES');
     DELAY(500);
     setcolor(yellow);
     settextstyle(4,0,2);
     outtextxy(220,50,'C');
     delay(50);
     outtextxy(240,50,'R');
     delay(50);
     outtextxy(260,50,'E');
     delay(50);
     outtextxy(280,50,'A');
     delay(50);
     outtextxy(300,50,'D');
     delay(50);
     outtextxy(320,50,'O');
     delay(50);
     outtextxy(380,50,'P');
     delay(50);
     outtextxy(400,50,'O');
     delay(50);
     outtextxy(420,50,'R');
     delay(600);
     setcolor(red);
     rectangle(160,100,500,400);
     setcolor(white);
     floodfill(170,140,red);
     setcolor(red);
     settextstyle(11,0,1);
     delay(50);
     outtextxy(180,130,'Alejandro D. C‚spedes D.');
     delay(200);
     outtextxy(180,180,'Alumno Ingenier¡a en Inform tica.');
     delay(200);
     outtextxy(180,240,'Universidad de Playa Ancha.');
     delay(200);
     outtextxy(180,290,'Taller de Programaci¢n.');
     delay(200);
     setcolor(green);
     outtextxy(180,380,'2002 - Todos los derechos reservados');
 
     readkey;
     halt(1);
end;
 
{=======================================================================}
procedure entrada;
 
begin
     cleardevice;
     setbkcolor(blue);
     setcolor(white);
     settextstyle(3,1,4);
     outtextxy(50,50,'GRAFICAS DE FUNCIONES');
     DELAY(500);
     setcolor(GREEN);
     settextstyle(2,0,10);
     outtextxy(220,50,'I');
     delay(50);
     outtextxy(240,50,'N');
     delay(50);
     outtextxy(260,50,'S');
     delay(50);
     outtextxy(280,50,'T');
     delay(50);
     outtextxy(300,50,'R');
     delay(50);
     outtextxy(320,50,'U');
     delay(50);
     outtextxy(340,50,'C');
     delay(50);
     outtextxy(360,50,'C');
     delay(50);
     outtextxy(380,50,'I');
     delay(50);
     outtextxy(400,50,'O');
     delay(50);
     outtextxy(420,50,'N');
     delay(50);
     outtextxy(440,50,'E');
     delay(50);
     outtextxy(460,50,'S');
     delay(50);
     delay(600);
     setcolor(red);
     rectangle(120,100,600,300);
     setcolor(white);
     floodfill(130,140,red);
     setcolor(red);
     settextstyle(2,0,5);
     delay(50);
     outtextxy(150,130,'* utilice las tecla numericas para seleccionar una funcion');
     delay(200);
     outtextxy(150,150,'* Ingrese los limites de acuerdo a la funcion');
     delay(200);
     outtextxy(150,170,'* Utilice + y - para hacer zoom.');
     delay(200);
     outtextxy(150,190,'* presione <esc> para volver al menu.');
     delay(200);
     outtextxy(150,210,'* Antes de presionar <esc> presione cualquier tecla');
     outtextxy(150,220,'  hasta ver las opciones zoom.');
     delay(200);
     setcolor(green);
     outtextxy(180,380,'2002 - Todos los derechos reservados');
 
     readkey;
 
end;
{========================================================================}
procedure seno(inf,sup:real;uni:integer);
var
   x,{variable para calcular el valor de la funcion}
   y {variable auxiliar para achurar la grafica} : real;
 
begin
     y:=inf;
     while inf<=sup do
     begin
          x:=sin(inf);
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
 
          delay(5);
 
     end;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=sin(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'SENO DE X');
 
end;
{======================================================================}
procedure cosecante(inf,sup:real;uni:integer);
var
   x,z,{variable para calcular el valor de la funcion}
   y {variable auxiliar para achurar la grafica} : real;
 
begin
     y:=inf;
     repeat
           x:=1/sin(inf);
           putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)+trunc(x*uni),white);
           inf:=inf+0.01;
           delay(5);
     until inf>-0.01;
     z:=0.01;
     repeat
           x:=1/sin(z);
           putpixel(trunc(getmaxx div 2+(z*uni)),(getmaxy div 2)+trunc(x*uni),white);
           z:=z+0.01;
           delay(5);
     until z>=sup;
     delay(600);
     setcolor(red);
     repeat
          x:=1/sin(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)+round(x*uni));
          y:=y+0.01;
          delay(5);
     until y>-0.01;
     y:=0.01;
     repeat
          x:=1/sin(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)+round(x*uni));
          y:=y+0.01;
          delay(5);
     until y>sup;
     setcolor(yellow);
     outtextxy(50,50,'COSECANTE DE X');
 
end;
 
{==========================================================================}
procedure coseno(inf,sup:real;uni:integer);
var
   x,{variable para calcular el valor de la funcion}
   y {variable auxiliar para achurar la grafica} : real;
 
 
begin
     y:=inf;
     while inf<=sup do
     begin
          x:=cos(inf);
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
          delay(5);
 
     end;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=COS(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'COSENO DE X');
 
end;
{========================================================================}
procedure secante(inf,sup:real;uni:integer);
var
   x,{variable para calcular el valor de la funcion}
   y {variable auxiliar para achurar la grafica} : real;
 
 
begin
     y:=inf;
     while inf<=sup do
     begin
          x:=1/cos(inf);
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
          delay(5);
 
     end;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=1/COS(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'SECANTE DE X');
 
end;
{==========================================================================}
procedure tangente(inf,sup:real;uni:integer);
var
   x,{variable para calcular la funcion}
   y:{variable para achurar la figura}real;
 
begin
     y:=inf;
     while inf<=sup do
     begin
          x:=(sin(inf))/cos(inf);
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
          delay(5);
 
     end;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=(sin(y))/cos(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'TANGENTE DE X');
 
end;
{=======================================================================}
procedure cotangente(inf,sup:real;uni:integer);
var
   x,z,{variable para calcular la funcion}
   y:{variable para achurar la figura}real;
 
begin
     y:=inf;
     repeat
          x:=1/(sin(inf)/cos(inf));
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
          delay(5);
    until inf>-0.01;
    z:=0.01;
    repeat
          x:=1/(sin(z)/cos(z));
          putpixel(trunc(getmaxx div 2+(z*uni)),(getmaxy div 2)-round(x*uni),white);
          z:=z+0.01;
          delay(5);
    until z>sup;
    delay(600);
    setcolor(red);
    repeat
          x:=1/(sin(y)/cos(y));
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
   until y>-0.01;
   y:=0.01;
   repeat
          x:=1/(sin(y)/cos(y));
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
   until y>sup;
   setcolor(yellow);
   outtextxy(50,50,'COTANGENTE DE X');
 
end;
 
{===========================================================================}
procedure cuadrado(inf,sup:real;uni:integer);
var
   x,y:real;
 
begin
     y:=inf;
     repeat
 
          x:=(inf*inf);
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-trunc(x*uni),white);
          inf:=inf+0.01;
          delay(5);
 
     until inf>sup;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=y*y;
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'CUADRADO DE X');
 
 
end;
{==========================================================================}
procedure raiz(inf,sup:real;uni:integer);
var
   x,y:real;
 
begin
     y:=inf;
     while inf<=sup do
     begin
          x:=sqrt((inf));
          putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
          inf:=inf+0.01;
          delay(5);
 
     end;
     delay(600);
     setcolor(red);
     while y<sup do
     begin
          x:=sqrt(y);
          line(trunc(getmaxx div 2+(y*uni)),getmaxy div 2,trunc(getmaxx div 2+(y*uni)),(getmaxy div 2)-round(x*uni));
          y:=y+0.01;
          delay(5);
     end;
     setcolor(yellow);
     outtextxy(50,50,'RAIZ DE X');
end;
{===========================================================================}
procedure logaritmo_n(sup:real;uni:integer);
var
   x,{variable para calcular el valor de la funcion}
   inf,{variable a la que se le asignara el valor inicial para comnezar a graficar la funcion}
   z {variable auxiliar para achurar la grafica}:real;
 
begin
     inf:=0.01;
     Z:=INF;
          repeat
                x:=LN(inf);
                       putpixel(trunc(getmaxx div 2+(inf*uni)),(getmaxy div 2)-round(x*uni),white);
                       inf:=inf+0.01;
                       delay(5);
                until inf>sup;
                delay(600);
                setcolor(red);
                repeat
                      x:=ln(z);
                      line(trunc(getmaxx div 2+(z*uni)),getmaxy div 2,trunc(getmaxx div 2+(z*uni)),
                      (getmaxy div 2)-round(x*uni));
                      z:=z+0.01;
                      delay(5);
                until z>sup;
                readkey;
     setcolor(yellow);
     outtextxy(50,50,'LOGARITMO NATURAL DE X');
end;
{==========================================================================}
procedure graficar_funciones;
var
   zoom,
   a,
   b     : integer;
begin
     cleardevice;
     menu;
     window(10,30,20,31);
     zoom:=0;
     case readkey of
     '1':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    seno(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   seno(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   seno(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
 
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
 
           '2':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    coseno(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   coseno(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   coseno(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
           '3':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    tangente(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   tangente(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   tangente(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '4':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite superior:  ');
                          window(27,2,30,2);
                          readln(b);
                    until b>0;
                    pantalla_grafica(amplitud);
                    logaritmo_n(b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   logaritmo_n(b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   logaritmo_n(b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '5':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros positivos');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until (a>=0) and (b>a);
                    pantalla_grafica(amplitud);
                    raiz(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   raiz(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   raiz(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '6':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros ');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    cuadrado(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   cuadrado(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   cuadrado(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '7':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    cosecante(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   cosecante(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   cosecante(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '8':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    cotangente(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   cotangente(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   cotangente(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               '9':begin
                    cleardevice;
                    setcolor(white);
                    repeat
                          outtextxy(1,1,'solo numeros enteros');
                          outtextxy(1,20,'ingrese limite inferior:  ');
                          window(27,2,30,2);
                          readln(a);
                          outtextxy(1,30,'Ingrese limite superior: ');
                          window(27,3,30,3);
                          readln(b);
                    until a<b;
                    pantalla_grafica(amplitud);
                    secante(a,b,amplitud);
                    repeat
                          outtextxy(50,60,'+ zoom in  - zoom out');
                          case readkey of
                          '+':begin
                                   zoom:=zoom+10;
                                   pantalla_grafica(amplitud+zoom);
                                   secante(a,b,amplitud+zoom);
                              end;
 
                          '-':begin
                                   pantalla_grafica((amplitud+zoom)-10);
                                   secante(a,b,(amplitud+zoom)-10);
                                   zoom:=zoom-10;
                              end;
 
                          #27:graficar_funciones;
                          end;
                    until readkey=#27;
               end;
               #27:salida;
end;
end;
 
{=====================     programa principal     ===================}
begin
     amplitud:=30;
     iniciar_graficos;
     ENTRADA;
     repeat
           graficar_funciones;
     until readkey=#27;
     salida;
end.



Comentarios sobre la versión: Versión 1 (7)

15 de Mayo del 2003
estrellaestrellaestrellaestrellaestrella
manda los archivos!!!
Responder
6 de Diciembre del 2003
estrellaestrellaestrellaestrellaestrella
es buen codigo pero subelo en un modo de archivo zip
Responder
11 de Noviembre del 2004
estrellaestrellaestrellaestrellaestrella
Tiene truco el programa si no quieres ayudarnos no lo publiques
Responder
11 de Noviembre del 2004
estrellaestrellaestrellaestrellaestrella
P U D R E T E ! ! ! ! TU Y TU ""$#$%$%& PROGRAMA
Maldito Gilipollo......
Responder
3 de Julio del 2007
estrellaestrellaestrellaestrellaestrella
si tienes programas buenisimos como este te lo agradeceria mucho.

gracias
Responder
15 de Diciembre del 2010
estrellaestrellaestrellaestrellaestrella
Excelente programa de graficación de funciones.
Responder
esperanza
30 de Mayo del 2017
estrellaestrellaestrellaestrellaestrella
hola cuales son los archivo por favor??
Responder

Comentar la versión: Versión 1

Nombre
Correo (no se visualiza en la web)
Valoración
Comentarios...
CerrarCerrar
CerrarCerrar
Cerrar

Tienes que ser un usuario registrado para poder insertar imágenes, archivos y/o videos.

Puedes registrarte o validarte desde aquí.

Codigo
Negrita
Subrayado
Tachado
Cursiva
Insertar enlace
Imagen externa
Emoticon
Tabular
Centrar
Titulo
Linea
Disminuir
Aumentar
Vista preliminar
sonreir
dientes
lengua
guiño
enfadado
confundido
llorar
avergonzado
sorprendido
triste
sol
estrella
jarra
camara
taza de cafe
email
beso
bombilla
amor
mal
bien
Es necesario revisar y aceptar las políticas de privacidad

http://lwp-l.com/s348