Browse Search Popular Register Upload Rules User list Login:
Math Generated Patterns

screenshot of the scene

Author: Xray

Group: Default

Filesize: 18.19 kB

Date added: 2019-01-06

Rating: 5

Downloads: 451

Views: 143

Comments: 6

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0


Scene tag

The short story: I used some code from FRA32's Koch Pattern generator, and I also used a few lines of code from one of s_noonan's scenes. After placing those scripts in a large baking dish, and adding a few lines of magic ingredients of my own, I came up with a delicious meal that I think you will like. If you don't like it, there is a Burger King just down the street.

The LONG story: For a very long time, I have been amazed by how some mathematics equations can create interesting geometric patterns. I also discovered that by tweaking certain values in variables and/or constants that the generated patterns can morph into something totally different, which are even more amazing! That's basically how I made this scene. I used a previous scene of mine: Koch Pattern which is a hacked up version of FRA32's Koch Pattern generator scene, and I hacked it up even more. Here is how I did that: I took the scene and ran it through a meat grinder, then a paper shredder, then I ran over it with my truck, shot it 30 times with my AR15 rifle and my 12-Gauge shotgun, and then I gave it to my dog to chew on it for a couple of weeks. After all that, the scene was making some really interesting patterns, none of which I planned, engineered, invented, or otherwise caused it to generate anything that I had imagined. The scene simply created whatever it wanted to, just from my screwing around with a few numbers! How amazing is THAT!?

After you start Algodoo, you will notice that the scene has a secondary "Run/Pause" button, which starts and stops the actual pattern generator. While the generator is stopped, you have the oportunity to change the pattern (select number 1 to 10 with the Up and Down arrow keys) and you can also change the pattern color by clicking on the desired color circle. When ready, click the Run button to start generating the pattern. You can Pause the generator any time by clicking the Pause button (I'd bet that you already figured that one out! LOL). While the pattern is being generated, the display will automatically attempt to keep the newly generated pattern near the center of the screen. It does that by shifting the camera pan value each time the generator moves beyond a certain distance from the center of the screen. When the pattern starts to get very large, you may want to zoom out so that you can view a larger area. I made the buttons and the text in such a way that they will remain in a displayed area of the screen regardless of how you pan or zoom the camera. It's not perfect, but it works fairly well.

FYI - My favorite pattern is number 4. The pattern it produces is really interesting! I would not be able to intentionally create a pattern like that by using math equations if my life depended on it! But some how, the math gods made it happen, and I get speechless every time I see that pattern being generated. By the way, some patterns will suddenly switch to another version of the pattern after it has been generating for a few minutes. So, if you see a pattern which is not especially appealing to you, just wait a few minutes to see if it changes into something more interesting! Again, you will probably want to zoom out a ways to view it.

Okay, enough rambling. You can leave comments if you want to, but please be nice about it. I made this scene just for fun, and I realize that it's probably full of many bugs (also known as, "unintended enhancements"). If you don't happen to like my scene, you can return it for a refund. Just pack it up in a large titanium box shielded with 34Kg lead plates on each side, and send it prepaid via FedEx overnight to: Mr. Ecks Ray, Sqrt(2) Pi Highway, Algotown, Siberia, postal code 314159. Your money will be cheerfully refunded as soon as I receive the package.

Last edited at 2019/01/21 15:54:26 by Xray
Please log in to rate this scene
Similar scenes
Title: atan2 mouse control(motor)
Rating: 5.625
Filesize: 78.59 kB
Downloads: 670
Comments: 4
Ratings: 2
Date added: 2009/10/12 18:36:37
Made with: Algodoo before v1.8.5
Rating: rated 5.6
Title: atan2 mouse control(springs)
Rating: 5.1111
Filesize: 77.08 kB
Downloads: 681
Comments: 1
Ratings: 3
Date added: 2009/10/12 18:37:07
Made with: Algodoo before v1.8.5
Rating: rated 5.1
Title: Origins of math
Rating: 5
Filesize: 14.41 kB
Downloads: 61
Comments: 0
Ratings: 1
Date added: 2019/10/05 16:44:27
Made with: Algodoo v2.1.0
Rating: rated 5
Title: Patterns for people
Rating: 5
Filesize: 0.51 MB
Downloads: 77
Comments: 1
Ratings: 1
Date added: 2019/07/31 14:02:26
Made with: Algodoo v2.1.0
Rating: rated 5
Title: Patterns of particles in water
Rating: 5.5
Filesize: 455.92 kB
Downloads: 387
Comments: 4
Ratings: 2
Date added: 2014/03/24 15:02:44
Made with: Algodoo v2.1.0
Rating: rated 5.5
Title: Linear Outliner
Rating: 5.5
Filesize: 40.25 kB
Downloads: 546
Comments: 4
Ratings: 2
Date added: 2014/12/02 08:55:37
Made with: Algodoo v2.1.0
Rating: rated 5.5
I like 5 the best, although I'm not sure if i can see a difference between 5 and 10.
I noticed that too, but I haven't the foggiest idea why. :blush: A W.A.G. is that it has something to do with the fact that 5 and 10 are in synch with a particular moon phase, which causes the stack pointer to overflow at the same time and in the same manner.

I'll be busy for a while now 'cause "Forged In Fire" is on.

Pattern #4 seems to be a very interesting variation of the "T-Square" surface.
In the T-square, the edge is filled with more and more advanced figures. If we were to give each figure on the edge a number according to it's size, the sequence of numbers across the edge has a simple pattern:
Every figure of "rank" x appears once every 2^(x+1) figures.

In Pattern #4, you also have a kind of basic figure(the small line stumps). If you number the figures here and look at the sequence, the result looks a bit similar, but different:
every pattern of rank x appears 4 times in a row, and when it would appear for the 5th time, the next higher rank appear instead.
The shape of the figures also has some differences:
In the normal T-square, every figure "sprouts" into a double-sided T-square line where only one x-1 ranked child appears per side at the very end, and another x-2 child in the center of each side(This then recursively repeats inbetween as the lines "grow").
In this figure, each "tree" has a grand total of 5 x-1 children(2 left and right each, 1 at the tip). Additionally to this, it has 4 x-2 children at it's square base(2 per side, 1 on each square side). These once again become more complex as each "tree grows". If it weren't for it's ridiculous size(5^x units, depending on the rank of the largest tree), it would actually be a really cool figure to look into. Nonetheless a cool "discovery"!


I did some experimentation in L-Systems to try and replicate the pattern(Without looking at the code!) and found out that your pattern is in fact the result of an L system with:

Starting Parameter: F
Replacement Rules:
F -> F+F|F+FF+F|F+F
+ -> F+F-F+F

L-Systems are replacement systems where you use a starting text and replace each symbol with the specified chain of new symbols. the final result is rendered by interpreting F as "forward", + as "turn left", - as "turn right" and | as "turn around".

I have taken the liberty of entering the pattern into a website for you and got the link for it here
Last edited at 2019/01/07 17:13:44 by FRA32
FRA32 - Thanks for the treatise on my scene! I also appreciate the links that describe L-systems and how they work. I am not even close to being the math wiz that you are, and so I have to THINK a lot harder than you do when trying to understand a new math concept.:blush:

The wonderful thing about many math equations is the fact that they can be "tweaked" in various ways to produce amazing and unexpected patterns. I never get tired of doing that! :tup:
Xray, I am confused about if whether or not marble races are allowed. Are they?
Qwertyopilis -- Yes, marble races have ALWAYS been allowed. You just won't see too many of them being posted these days because people are tired of them. Now, most of the kids post scenes with stick men "athletes", and they have camps and "Algocathlons" (whatever they are). If you are not sure about the rules and the Terms of Service, click on "Rules" at the top of any Algodoo web page.