program bifurcation_enlarge character*1 ch x_ini=0.5 rmin=0.0 rmax=1.0 xmin=0.0 xmax=1.0 if(pgopen('/xwin')<=0)stop c call pgenv(rmin,rmax,0.0,1.0,0,0) c call pglab('r','x','Bifurcation') call pgask(0) 100 write(*,*)'How many generations?' read(*,*)n n_group_size=n/15 call pgeras call pgenv(rmin,rmax,xmin,xmax,0,0) call pglab('r','x','Bifurcation (Enlarged)') dr=(rmax-rmin)/999 do j=1,1000 r=rmin+(j-1)*dr x=x_ini do i=1,n x = 4*r*x*(1-x) c if(n<10)cycle call pgsci(i/n_group_size) call pgpt(1,r,x,-1) end do end do write(*,*)'Enlarge?(Yes=1,No=0)' read(*,*)i_enlarge if(i_enlarge==1) then write (*,*) 'Now choose a range to enlarge using mouse pointer.' write (*,*) idummy = pgband (0, 1, 0.5, 0.5, x_pos, y_pos, CH) x1 = x_pos y1= y_pos idummy = pgband (2, 1, x1, y1, x_pos, y_pos, CH) x2 = x_pos y2 = y_pos if (x1.gt.x2) then temp = x1 x1 = x2 x2 = temp endif if (y1.gt.y2) then temp = y1 y1 = y2 y2 = temp endif endif rmin=x1 rmax=x2 xmin=y1 xmax=y2 goto 100 102 write(*,*)'Again?(Yes=1,No=0)' read(*,*)i_again if(i_again==1)goto 100 if(i_again==0)stop goto 102 end