Third Age Posted August 21, 2017 Share Posted August 21, 2017 I decided to use a math-heavy BASIC program from Antic magazine called Fractal Zoom to test the built-in floating-point routines. I ran it in Atari BASIC, then BASIC-XE using it's own FP routines. I even made an Action! port that called the built-in routines. All tests were done with the default values for A-corner, B-corner and Side, and in GTIA 9-colour mode. To draw the first screen, Atari BASIC took 9.55 hours, and BASIC-XE using it's own FP took 3.02. The Action! port took about 9.5 hours, almost as long as the Atari BASIC version. That in itself says a lot! So, if you ever need to use floating-point in a speed-critical program, you might want to try something other than the built-in routines! 5 Quote Link to comment Share on other sites More sharing options...
ricortes Posted August 23, 2017 Share Posted August 23, 2017 (edited) Is the Action code in a form that can be posted? I've done similar translations ~Point Set Graphics<?> from an early Compute graphics book and while it was still dog slow, about triple the speed of BASIC. The original http://www.atariarchives.org/c2ba/page067.php Edited August 23, 2017 by ricortes Quote Link to comment Share on other sites More sharing options...
Estece Posted August 25, 2017 Share Posted August 25, 2017 This fractal program took less than one hour //Mad pascal 24-08-2017 uses Crt,fastgraph; const lngth:byte = 79; height:byte = 191; colors:array[0..100] of byte=( 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15, 15,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13, 13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,12, 12,11,11,11,11,11,11,11,11,10,10,10,10,10,10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 3, 3, 2, 2, 1); four:single=4.0; var x,y,count,lastc,nowc:byte; ac,az,az2,bc,bz,bz2,acorner,bcorner,side,gapl,gaph,size:single; xs,ys:single; begin lastc:=0;ys:=0; acorner:=-2; bcorner:=-1.145288; side:=0.253866; gapl:=10*(side/single(lngth)); gaph:=10*(side/single(height)); Initgraph(9); for y:=0 to height do begin bc:=ys*gaph+bcorner; xs:=0; for x:=0 to lngth do begin ac:=xs*gapl+acorner; az:=0; bz:=0; count:=0; repeat az2:=(az*az)-(bz*bz)+ac; bz2:=2*az*bz+bc; az:=az2;bz:=bz2; size:=az2*az2+bz2*bz2; inc(count); until ((size>four) or (count>99)); nowc:=colors[count]; if nowc<>lastc then begin lastc:=nowc; SetColor(lastc); end; PutPixel(x,y); xs:=xs+1; end; ys:=ys+1; end; repeat until keypressed; end. fractal.xex 3 Quote Link to comment Share on other sites More sharing options...
Third Age Posted August 29, 2017 Author Share Posted August 29, 2017 Here is an Action! version of Fractal Zoom. Please note that this is a quick version that I just redid, as I just lost my other ATR file. Most times it draws the first screen. Most times it crashes when you try and zoom in. Use at your own risk! Fractal Zoom in Action.atr 1 Quote Link to comment Share on other sites More sharing options...
Estece Posted September 29, 2017 Share Posted September 29, 2017 New and "fast" fractal fastfractal.xex 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.