IonicWind Software

IWBasic => Games and Graphics => Topic started by: GWS on July 07, 2017, 01:25:59 AM

Title: Cellular Graphics from Mathematics
Post by: GWS on July 07, 2017, 01:25:59 AM
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.
http://www.rhythmiccanvas.com/research/papers/worley.pdf (http://www.rhythmiccanvas.com/research/papers/worley.pdf)

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:
http://mathforum.org/library/drmath/view/52343.html (http://mathforum.org/library/drmath/view/52343.html)

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

all the best, :)

Graham
Title: Re: Cellular Graphics from Mathematics
Post by: Brian on July 07, 2017, 08:39:09 AM
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

Brian
Title: Re: Cellular Graphics from Mathematics
Post by: Egil on July 07, 2017, 11:03:07 AM
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!


Egil
Title: Re: Cellular Graphics from Mathematics
Post by: GWS on July 07, 2017, 11:49:16 AM
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, :)

Graham



Title: Re: Cellular Graphics from Mathematics
Post by: Brian on July 07, 2017, 11:58:44 AM
Graham,

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

Brian
Title: Re: Cellular Graphics from Mathematics
Post by: Egil on July 07, 2017, 12:20:23 PM
Graham:
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.


Brian:
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.


Egil

Title: Re: Cellular Graphics from Mathematics
Post by: aurelCB on April 23, 2019, 09:35:17 AM
well ..this one is nice
it looks like mesh-pattern