*--------------------------------------
* Prog : Bifurcation diagram - Core prog
* Author : TheMag@softlabo.org
* Version 1 : April 21, 2004
* Output : See Art Manuscript
* Based on : SOFTLAB® Mandelbrot set explorer framework
*--------------------------------------
*THIS.Enabled=.F.
nBegRapport=SECONDS()
StartTime=SUBST(TIME(0),1,8)+":"+RIGHT(TIME(0),2)
EndTime="Running!!!"
Duration="Running!!!" && Duration=oSLFormSet.AffiHour(0)
oSLFormSet.SlCommandPanel.txtStartTime.REFRESH
oSLFormSet.SlCommandPanel.txtEndTime.REFRESH
oSLFormSet.SlCommandPanel.txtDuration.REFRESH
isRunning=.T. && is drawing
*--- Prepare Graphic panel
oSLFormSet.slGraf.slOleboundcontrol.VISIBLE=.F.
oSLFormSet.slGraf.slEdit.VISIBLE=.F.
oSLFormSet.slGraf.Picture=""
oSLFormSet.slGraf.BackColor=aColors[12]
oSLFormSet.slGraf.Cls
oSLFormSet.slGraf.REFRESH
* Tracing a rectangular zone around the map
xWidth =oSLFormSet.slGraf.WIDTH
yHeight=oSLFormSet.slGraf.HEIGHT
oSLFormSet.slGraf.ForeColor=RGB(255,255,255)-aColors[12] && Inverse video of BackColor
*--- Beg Mapping ---*
vX0= 0&& 40
xRange=(rMax-rMin) &&
xDelta =xRange/(xWidth-vX0)
yRange=yHeight
vY0= yHeight
*--- End Mapping ---*
*--- Explore selected area and plot point with the inherent color
xStep=xWidth/(rMax-rMin)
oSLFormSet.slGraf.DrawWidth= 2 && PenWidth
iCalc=iMax-iDensity && Calculate without printing
FOR r=rMin TO rMax STEP rStep
isRunning=.T. && is drawing
* No plot 'till iMax-iDendity
pt=p0
FOR i=1 TO iCalc
pt=r*pt*(1-pt)
ENDFOR i=1 TO iCalc
*--- Continue calculation and Plot with density color !
FOR j=1 TO iDensity
pt=r*pt*(1-pt)
x=(r-rMin)*xStep
y=(1-pt)*yHeight && Be aware of ...
*-- Plot it with the adequat color
nColor=aColors[j]
oSLFormSet.slGraf.ForeColor = nColor
oSLFormSet.slGraf.PSet(x,y)
ENDFOR j=1 TO iDensity
ENDFOR r=rMin TO rMax STEP rStep
EndTime=SUBST(TIME(0),1,8)+":"+RIGHT(TIME(0),2)
nEndRapport=SECONDS()
IF nEndRapport<nBegRapport && Across a day
nDuraRapport=nEndRapport+(86400-nBegRapport) && 24h*60mn*60ss = 86400
ELSE
nDuraRapport=nEndRapport-nBegRapport
ENDIF nEndRapport<nBegRapport && Across a day
Duration=oSLFormSet.AffiHour(nDuraRapport/3600) && AffiHour(nRealHour)
oSLFormSet.SlCommandPanel.txtEndTime.REFRESH
oSLFormSet.SlCommandPanel.txtDuration.REFRESH
RETURN
|