January 27, 2021, 09:56:09 am


Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........

Cellular Graphics from Mathematics

Started by GWS, July 07, 2017, 01:25:59 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hi All,

Here is a strange program which generates cellular patterns.  It's in EBasic, but not far away from IWB.

I'd never heard of this subject, but it's from a 1996 paper - A Cellular Texture Basis Function by
Steven Worley.

According to Wikipedia, ' it is used to create procedural textures,  that is textures that are created automatically in arbitrary precision and don't have to be drawn by hand. Worley noise comes close to simulating textures of stone, water, or cell noise.'

How anyone came up with this algorithm I don't know .. :)

The process also uses a Mod() subroutine ?   I'd previously only used the % modulus operator, which gives the remainder following an integer division.  A Modulus operation gives a different result when negative values are involved - hence the Mod() subroutine.
See a discussion of this here:

This is another graphics intensive program that really needs fast pixel processing.

all the best, :)

Tomorrow may be too late ..


I can only say: Wow! That's good, Graham, and very fast on my PC - you don't see it drawing

Will look at the code now



An amazing program!
Now I've got a lot to read (and learn!!) when the weather turns bad ...

Runs rather fast also on my computer. There is one little thing though... When trying to run the supplied exe file, MalwareBytes Pro quarantined the program.
But when compiling the supplied source, the exe ran smoothly.

Thanks for sharing!

Support Amateur Radio  -  Have a ham  for dinner!


Hi Guys,

Glad you like it ..  :)

You can fiddle with the image size and quality settings, which can slow things down a bit. The graphics facilities in Paul's newer systems are remarkable. Even Microsoft can't match it without third party libraries.

Egil, I had to stop using Norton AV, for the same reason.  Every time I compiled a new .exe, it flagged up a false alarm and quarantined every program I made.  I wrote to Norton about it - but got nowhere.  I sort of traced the effect to my having selected an icon for the program from the Windows selection.  Why Norton hated that I don't know.

I have no trouble at all with McAfee ..  :)

Best wishes, :)


Tomorrow may be too late ..



I compiled it with IWB, and it came out 39kb smaller than your .eba version



QuoteEgil, I had to stop using Norton AV, for the same reason.

The same happened to me when I used Norton AV some years ago, so I changed to F-Secure. But F-Secure also suddenly blocked every exe i had compiled with eb, and after I reported it and told them it had to be "false positives" causing the quarantine, all exe files compiled with EB just not was quarantined, but deleted from the computer. When I purchased LarryMc's Button Designer, I really got trouble. It was impossible to get the package installed. Then I gave up on F-Secure and changed to McAfee. But from time to time  the same happened with that package.
At the same time Microsoft offered their free Security Essentials, and since then I have been using their package, which plays well in harmony with MalwareBytes Premium. And have not had any issues for four years now. MalwareBytes sometimes warns about certain websites, and that suits me just fine.

QuoteI compiled it with IWB, and it came out 39kb smaller than your .eba version

I set Windows  to open EBA and EBP files in IWB. Works great!
So EB is now unistalled here.


Support Amateur Radio  -  Have a ham  for dinner!


well ..this one is nice
it looks like mesh-pattern
forum for hobby programming:<br />https://aurelsoft.ucoz.com