home *** CD-ROM | disk | FTP | other *** search
- Path: unixg.ubc.ca!vanbc.wimsey.com!cyber2.cyberstore.ca!math.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!auvm!C53000.PETROBRAS.ANRJ.BR!BJ06
-
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
-
- Newsgroups: bit.listserv.frac-l
-
- Return-Path: <@AUVM.AMERICAN.EDU,@VTBIT.CC.VT.EDU:FRAC-L@GITVM1.BITNET>
-
- X-Envelope-to: FRAC-L@GITVM1.BITNET
-
- X-VMS-To: @FRACTAL
-
- References: ANSP network HEPnet SPAN Bitnet Internet gateway
-
- Message-ID: <35C294C680001660@fpsp.fapesp.br>
-
- Date: Mon, 10 Jan 1994 11:38:00 BDB
-
- Sender: "\"FRACTAL\" discussion list" <FRAC-L@GITVM1.BITNET>
-
- Comments: @FPSP.FAPESP.BR - @FPSP.HEPNET - @BRFAPESP.BITNET - .BR gateway
-
- From: BJ06@C53000.PETROBRAS.ANRJ.BR
-
- Subject: VANDRPOL.CPP
-
- Lines: 84
-
-
-
- //
-
- //+------------------------------------------------------------+
-
- //+ Program VANDRPOL.CPP +
-
- //+ Plots isoclines of the Van Der Pol's ODE (VDP Oscillator): +
-
- //+ y" - Mu*y'*(1 - y^2) + y = 0 +
-
- //+ or +
-
- //+ v(dv/dy) - Mu*v*(1 - y^2) + y = 0 +
-
- //+ Isoclines are defined by (dv/dy) = k +
-
- //+------------------------------------------------------------+
-
- //+ KREYSZIG, E. - _Advanced Engineering Mathematics_ , +
-
- //+ John Wiley & Sons, 1988, pp. 165-166 +
-
- //+ Requires SVGA and SVGA256.BGI + SVGA256.H +
-
- //+------------------------------------------------------------+
-
- //+ Usage: +
-
- //+ VANDRPOL <Mu> <ymin> <ymax> <vmin> <vmax> +
-
- //+ Example: +
-
- //+ VANDRPOL 0.32 -5.0 5.0 -5.0 5.0 +
-
- //+ Try: +
-
- //+ Mu xmin xmax ymin ymax +
-
- //+ 0.1 -5.0 5.0 -5.0 5.0 +
-
- //+ -3.95 -4.0 4.0 -4.0 4.0 +
-
- //+ 0.05 -5.0 5.0 -5.0 5.0 +
-
- //+ -0.75 -5.0 5.0 -5.0 5.0 +
-
- //+ 8.75 -5.0 5.0 -5.0 5.0 +
-
- //+------------------------------------------------------------+
-
- //+ COMMENTS modified by N. Giffin at Fausto's request. May/94 +
-
- //+------------------------------------------------------------+
-
- //+ By Fausto A. A. Barbuto, January 8, 1994 +
-
- //+ [PS: This is probably NOT a fractal, but it's +
-
- //+ good-looking! :-) ] +
-
- //+------------------------------------------------------------+
-
- //
-
- #include <stdio.h>
-
- #include <conio.h>
-
- #include <graphics.h>
-
- #include <math.h>
-
- #include <stdlib.h>
-
- #include "Svga256.h"
-
-
-
- //void far initgraph(int far *,int far *,char far *);
-
-
-
- int huge DetectVGA256()
-
- {
-
- int Vid=4;
-
- return Vid;
-
- }
-
-
-
- void main(int argc, char *argv[])
-
- {
-
- double Mu, ymin, ymax, vmin, vmax;
-
- double y, v, k, const_scr=1.0, deltav, deltay;
-
- register int npix=1024, npiy=768;
-
- register int ny, nv, ipen;
-
- char *endptr;
-
- int graphdriver=DETECT;
-
- int graphmode;
-
-
-
- Mu = strtod(argv[1],&endptr);
-
- ymin = strtod(argv[2],&endptr);
-
- ymax = strtod(argv[3],&endptr);
-
- vmin = strtod(argv[4],&endptr);
-
- vmax = strtod(argv[5],&endptr);
-
-
-
- installuserdriver("Svga256",DetectVGA256);
-
- initgraph(&graphdriver, &graphmode, "c:\\borlandc\\bgi");
-
-
-
- deltay = (ymax-ymin)/(double)npix;
-
- deltav = (vmax-vmin)/(double)npiy;
-
-
-
- cleardevice();
-
- for (ny=0; ny<=npix-1; ny++) {
-
- y = ymin + (double)ny*deltay;
-
- for (k=-5.0; k<=5.0; k=k+0.025) {
-
- v = y/(Mu*(1.0-y*y) - k);
-
- nv = (int)((v - vmin)/deltav);
-
- ipen = 33 + (int)(1.5*(k+5.0));
-
- putpixel(ny,nv,ipen);
-
- }
-
- }
-
-
-
- // Clean-up.
-
- // Fecha a parte grafica.
-
-
-
- getch();
-
- closegraph();
-
- restorecrtmode();
-
- }
-
-