home *** CD-ROM | disk | FTP | other *** search
- Figure 1: The RAF/Novell architecture.
-
-
- Novell's RAF's Remote VT220
- NET3.COM DOS Call Procedure Terminal
- Redirector Calls Emulator
-
-
- RAF-compatible RAF Protocol Driver LAT-compatible
- IPX.COM Transport
-
- RAF's Ethernet Driver
-
-
- Figure 2: The RAF Terminal screen, showing the host session commands available to the PC user.
-
-
- Welcome to RAF Ethernet Service Version 2.1(0)
-
- Service Name Status Announcement Services: 4
-
- SNEEZY Available Datability Office Management System, VMS V5.
- DOC Available Datability RAF Development System, VMS V5.2
- GRUMPY Available Datability FACS Development System, VMS V5.2
- BASHFU Available Datability Client Service System, VMS V4.7
-
-
- Valid Commands for Version 2.1(0)
-
- ADVISE <name> <password> BACKWARD
- CONNECT <service> DISABLE ADVICE
- DISCONNECT <session #> ENABLE ADVICE <name> <password>
- FORWARD HELP
- RESUME SET ADVISEE_CATEGORY <cat>
- SET ATTENTION DISABLE SET ATTENTION ENABLE <key>
- SET BACKWARD DISABLE SET BACKWARD ENABLE <key>
- SET FORWARD DISABLE SET FORWARD ENABLE <key>
- SET SERVICE_CATEGORY <cat> SHOW SESSIONS
- SHOW SERVICES SHOW TERMINAL
-
- RAF>
- RAF VT220 Terminal Wrap Ethernet Mode:Direct
-
- Figure 3: Code for FRACPC, the main program run from the PC.
-
- #include <stdio.h>
- #include <mem.h>
- #include <math.h>
-
- #define WIDTH 200
- #define LENGTH 320
- #define ITERATIONS 100
- double atof();
- double log();
-
- char *pix_but;
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- char *malloc();
- double lam_x,lam_y;
- double range;
-
- if(argc!=4) {
- fprintf(stderr,"Usage - fractal lx ly range\n");
- exit(1);
- }
- lam_x=atof(argv[1]);
- lam_y=atof(argv[2]);
- range=atof(argv[3]);
- rafmscl(); /* Initialize RAF's C Runtine */
- if((pix_buf=maaloc(320*200))!=NULL) {
- fractal(&lam_x,&lam_y,&range,pix_buf);/* Call the VAX */
- draw_screen(pix_buf);
- }
- else
- printf("Cannot allocate memory\n");
- }
-
- #include <graphics.h>
-
- draw_scren(char pix_buf[LENGTH][WIDTH])
- {
- int driver=DETECT;
- int mode=MCGAC0;
- int i,j;
-
- initgraph(&driver,&mode,NULL);
- for(i=0;i<320;i++) {
- for(j=0;j<200;j++) {
- putpixel(i,j,pix_buf[i][j]);
- }
- }
- getch();
- closegraph();
- }
-
- Figure 4: Code for FRACVAX, the VAX subroutine called by FRACPC to compute the fractals.
-
- #include <stdio.h>
- #include <math.h>
-
- #define XYRATIO 1
- #define WIDTH 200
- #define LENGTH 320
- #define ITERATIONS 100
- double atof();
- double log();
-
- int fractal(double *lx,double *ly,double *nrange,char pix_buf[LENGTH][WIDTH])
- {
- double lam_x=(*lx),lam_y=(*ly),range=(*nrange);
- double a,b;
- double zr,zi,zx,zy;
- double dist;
- double t1,t2,zr2,zi2;
- double lr,li;
- double lrstep,listep;
- double y_step,x_step;
- double hrange;
- int n;
- int px,py;
-
- y_step=WIDTH/range;
- x_step=XYRATIO*y_step;
- lrstep=1.0/x_step;
- listep=1.0/y_step;
- hrange=0.5*range;
- for(px=0,a=lam_x+hrange;px<LENGTH;a=lam_x+hrange-px*lrstep,px++) {
- for(py=0,b=lam_y+hrange;py<WIDTH;b=lam_y+hrange-py*listep,py++) {
- zi2=zr2=zi=zr=0.0;
- for(n=0;(zr+zi2)<=1000.0 && n<ITERATION;n++) {
- t1=zr2-zi2-a;
- zi=2*zr*zi-b
- zr=t1;
- zr2=zr*zr;
- zi2=zi*zi;
- }
- if(zr2+zi2>4.0)
- pix_buf[px][py]=color(n);
- else
- pix_buf[px][py]=0;
- }
- }
- }
-
- int color(int n)
- {
- return((n%3)+1);
- }
-