Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : CMM2 Mandelbrot Explorer 16bit Color Version
Page 2 of 2 | |||||
Author | Message | ||||
yock1960 Senior Member Joined: 18/08/2020 Location: United StatesPosts: 167 |
Okay, no toggle needed. I'm not sure how many digits this had before I started limiting it, but I increased it from 8 places to the right of the decimal point, to 12. That gives you reasonably rolling values up to a scale of 512 billion, where the last digit starts to become a bit sluggish...but still updates inside the current view. I think this should be good enough for most people! The only other change was to drop 'autoplay on' to 'autoplay', when enabled, to no extra text (autoplay off) when it's not. Steve MandelbrotEXP16x.zip |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1082 |
There might be some interesting ideas here: Mandelbrot zoom on STM32 Blue Pill Visit Vegipete's *Mite Library for cool programs. |
||||
Sasquatch Senior Member Joined: 08/05/2020 Location: United StatesPosts: 296 |
Interesting! He has the "advantage" of a tiny screen with a very low pixel count. He is rendering the Mandelbrot at 80 X 80 pixels (6400 pixels total). This would all fit on just 8 rows (lines) of pixels in Mode 1,X. He is also using a fixed point math represented by integers for speed. This is an old trick from back in the 8-Bit days still used on micro-controllers with limited resources. My initial testing months ago indicated that there is little or no advantage in using integer math on the CMM2. In some cases the 64 bit integer math may even be slower than double precision floats, especially if there is any overhead in encoding/decoding the result. This is counter-intuitive as everyone "knows" that integers are "much faster" than floats. The CMM2 with it's hardware FPU is highly optimized for the double precision float math!!! This has got me thinking.... I should be able to refactor the Mandelbrot calculation in the CSUB to use the DSP instructions available in the FPU. This could be a significant performance improvement! Stay tuned.... Edited 2020-10-27 00:34 by Sasquatch -Carl |
||||
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 382 |
That's a really superb program! -Bill |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1082 |
I wonder. When you zoom in by a factor of 2, one quarter of the pixels have already been calculated. Is "IMAGE RESIZE_FAST" fast enough to usefully draw the new zoom area which is then back-filled with only the new pixels? The alternate might be a "stretch-blit" that either doubles each pixel horizontally and vertically, or just adds a blank pixel between each original pixel. Just had a quick play, starting from your original 8 bit Mandelbrot program. Looks to me like "IMAGE RESIZE_FAST" is useful, at least in 8 bit mode. Haven't tried 16 bit. The following zooms in on a particular (randomly chosen) point. Hit Ctrl-C to quit. To me it looks easier to follow where the zoom is going because the reference image stays visible. (Now if only the image were generated from the center out, maybe like curtains opening... ;-) 'Mandelbrot Explorer V1.3b for Color Maximite 2 9/20/2020 'By the Sasquatch 'with thanks to matherp, vegipete, thwill and yock1960 for your contributions 'www.thebackshed.com ' rev b : test IMAGE RESIZE_FAST Setup: Mode 1,8 '800 X 600 for compatabliliy with MMBasic V5.05.04 CLS XMax = MM.HRES - 1 YMax = MM.VRES - 1 XCursor = XMax / 2 YCursor = YMax / 2 Zoom = 2.0 Depth% = 128 Scale! = 1.0 XCenter! = -0.729961 ' random point that is interesting YCenter! = 0.170701 ' to great zoom factor T = Timer MainLoop: Do 'Main Loop Starts Here ' zoom the pre-existing image image resize_fast 200,150,400,300,0,0,800,600 'Call the Mandelbrot CSUB to render the image Mandelbrot Depth%,Scale!,XCenter!,YCenter! Scale! = Scale! * Zoom Loop 'While Not Done 'End of Main Loop End 'Mandelbrot CSub 'Mandelbrot(Depth,Scale,XCenter,YCenter) 'File mandelbrot.bas written 20-09-2020 13:23:23 CSUB mandelbrot 00000000 'mandelbrot 4FF0E92D 46834C54 460F2000 46916824 8B08ED2D 9301B083 4B5047A0 681B4950 681B6809 2B00680A F3409200 EE07808A EE063A90 EEB72A90 2A007A00 7AE7EEF8 6AE6EEF8 BA27EE87 BA26EEC7 F103DD79 F8DF38FF 4615A110 0608FB02 AB00EEB6 9B3BED9F 6A8BEE27 EEB09B01 EEB75B08 ED976AC6 EE367B00 ED936B4A EE868B00 EE944B07 06AB8B05 F8DAD102 47983000 5A90EE07 3000F8DB 5B08EEB0 6AE7EEB8 ED972B01 EE267B00 ED996A2B EEB72B00 EE366AC6 EE866B4A EEA44B07 DD3D2B05 EEB02401 EEB11B00 EEB00B00 EEB05B49 EEB07B49 EEB06B49 EE274B49 34017B05 EE32429C EEB06B46 EEA75B48 EE365B01 D01E7B04 4B07EE27 6B05EE25 3B04EE36 3BC0EEB4 FA10EEF1 F004DDE7 19AB043F 4C01F803 D1B63D01 1AF69B00 0F00F1B8 EE07D00F 461D8A90 38FFF108 7AE7EEF8 19ABE798 F8032000 E7EB0C01 2401D0F9 B003E7E3 8B08ECBD 8FF0E8BD 8000F3AF 00000000 00000000 08000340 080002F0 080002EC 0800033C End CSUB Visit Vegipete's *Mite Library for cool programs. |
||||
Sasquatch Senior Member Joined: 08/05/2020 Location: United StatesPosts: 296 |
I made the suggested enhancement to the 8bit version. See the original Mandelbrot Explorer post for the updates. Let me know what you think. https://www.thebackshed.com/forum/ViewTopic.php?TID=12685&P=3#157748 I'll do some testing and merge the changes into the 16bit color version and post the update in this thread. Edited 2020-10-27 11:26 by Sasquatch -Carl |
||||
Page 2 of 2 |
Print this page |