Showing posts with label fractal. Show all posts
Showing posts with label fractal. Show all posts

Wednesday, September 24, 2008

System Update in Orimath.com

Orimath.com is the website I used to sell Orimath Quadratic Solver, which is basically a commercial version of the Quadratic Solver I used to answer questions in Yahoo!Answer. The website used to sell only one product, there is practically no other software other than the Orimath Quadratic Solver itself. But that already changed.

Yesterday Orimath.com got a facelift. The index page had been changed to fit more with its role as a webstore. I added a new feature called Fractal Store.






At the moment this post is written 8 fractal patterns are being sold in the web. The pattern is sold as programs capable of rendering the fractal in any resolution. User can also explore the fractals in any range they want to, this would give users freedom to choose which part of the pattern they want to render into high resolution fractal image.

However, since fractal rendering is a time consuming process, it is advised that exploration should be done in low resolution. Should users find certain part of the fractal interesting, they can take high resolution shoot on that particular part.

Tuesday, September 16, 2008

Newton Fractal and Durand Kerner method

Newton Fractal and Durand Kerner method

I had known about Newton Fractal for a long enough time, even before I wrote the code for RTC7681 and RTC7683. But it is impossible to do, as long as I don't know what numerical method people use to get the complex roots of complex polynomial function.

Anyway I just decided to ask the question in Yahoo!Answer recently and several people was kind enough to answer my question. Too bad I can only choose one best answer. Internet is a really helpful thing to have, just imagine how many knowledge do millions of user around the world can have. So I just need to transform Durand-Kerner method into computer code and voila I have my Newton Fractal.

All pictures showed below is a actually Newton Fractal plot of the same complex polynomial function, but different pictures showed different level of detail. The complex polynomial function used is f(x) = x8 + x6 + 5i x5 + ( 3 + 2i )x4 + ( 3 + 5i )x2 -1. The value of a used is 1 + 1i.




The picture above is the Newton Fractal plot of the complex polynomial function mentioned earlier. The plot range is between -300-300i and 300+300i. Even though this is the least detailed plot of the fractal, this one is drawn the latest as that was the last thing I am curious about. If I wasn't too curious about the geometry of the Newton Fractal in big range, I would probably never care to plot it. Anyway the prospect of being able to get the same small detail in big scale win my curiousity.




This particular Newton Fractal was plotted with plot range between -3-3i and 3+3i. So this one have about 100 times more detailed, than the previous Newton Fractal plot result. This is the first plot I told my cute little computer to execute, as that is the range I used to test the program with different polynomial function and a value.




Curious what would happen if we take a look on those little blob in plot range between -2.3-0.3i and -1.7+0.3i ? I was curious as well. So I decided to spend about 8 hours of my computer time to plot the function in high resolution ( 8000x8000 pixels2 ). I have ordered the ( 70x70 cm2 glossy paper print of the plot result and planned to use it as a poster in my room. Too bad I can't share either the 183 MB BMP file or 20.7 MB JPG File due to the upload speed where I live. But if you click the image, you can still view it in 2000x2000 pixels2 detail.


Extreme Resolution



I was still curious about bigger picture of the Newton Fractal, so I decided to do more experiments. The first extreme experiment result was the picture above, depicting the plot result with range between -3e5-3e5i and 3e5+3e5i. It seems that the greater range we go, the less detail we can expect to get.




And on the range of -3e8-3e8i and 3e8+3e8i, you will get no complex picture at all. See the picture above and you will realize that the pictur consist of only 5 different color, instead of 8. This means that in the big picture of things, the probability to get 5 roots out of 8 from x8 + x6 + 5i x5 + ( 3 + 2i )x4 + ( 3 + 5i )x2 -1 = 0 using Newton-Raphson method is great. To get the other 3 roots however will be almost impossible.




On the other hand, it is not easy to get a plot result with good complexity on the micro scale either. Most of the time you are going to Fall into the Sea, but by using a numerical method called Bisection combined with low resolution exploration, we can expect to arrive in some Island of Complexity. The plot result above for example, was drawn with plot range between -2.2113+0.0002i and -2.2117+0.0006i.

Saturday, April 26, 2008

Mathematical Artwork Thumbnails

The images below are thumbnails of mathematical artworks I had made. Click the image for greater resolution.


























Thursday, April 3, 2008

Cellular Automata

Several days ago, I read an entry about Cellular Automation in Wikipedia, which links to a page titled Conway's Game of Life. In that page I learned that there is a simple rule in Cellular Automation, capable of generating complex pattern. Since I had been interested in the concept for a long time, I made the program yesterday (April 1st 2008).




There are many rules, which can be used in a Cellular Automation program. A Cellular Automation's rule have to mention what neighborhood condition should be fulfilled, to make a cell born, unchanged, or dies. The image above for example, is generated using rule 1/1, which means that for each cell, having one neighbor is going to come to life, but will die of loneliness if it have no neighbor, or die of overcrowd if it have more than one neighbor.


You can see the lexicon of rules, and the possible outcome in this Index of Rule.


Gosper's Glider Gun (Rule 23/3)

One of the pattern in Cellular Automation that I'm fond of is Gosper's Glider Gun which use Rule 23/3. The Gun, continuously produce a glider, which is a pattern capable of traversing the map. Since the glider is going to leave away, as soon as its pattern emerged from the reaction in a Gosper's Glider Gun, the Gun appear to shoot, with a glider as its ammunition.




I used Gosper's Glider Gun, to make a pattern consisting of 16 Gosper's Glider Guns, to make a Collider above. The collision between glider are unpredictable. Sometimes they explosively annihilate, sometimes they calmly annihilate, depend on how they collide.




The Collider is not stable, it will slowly degenerate itself to become the pattern above. The pattern above consist of only p1-oscillator and still lives. ( For definition of p1-oscillator and still lives, see this
Lexicon Of Life ).




I had made the X-Collider above as well, using 16 Gosper's Glider Guns in 4 different phase. The X-Collider, will continue to make a lot of glider collisions, and exhibit chaotic behavior. Whether these will result in degeneration or oscillation, is yet unknown. I haven't tried to play it long enough.




By merging different pattern I found in this Lexicon Of Life, I made the Space station above from components such as gliders, glider duplicators, octagon IIs,
octagon IVs, non-monotonic spaceships, and sparky spaceships. ( See the definition of each component in the Lexicon Of Life )


Download Cellular Automata Installer here.

Credits

Sunday, February 24, 2008

GeoScene 2D Fractal Generator

GeoScene Fractal Generator, is a program I made in 2006 using Julia Set generation algorithm, as a part of my thesis for my bachelor degree. I used it at that time to generate some kind of geographical irregularities, as part of the input used by my seawave simulation program.

Later, I also used the program to make different kinds of mathematical arts. Which you can see in my deviant art gallery. The icons I used as part of my banner in my Mathematical Programming Tutorial Website is also generated using this program.

How to Use GeoScene Fractal Generator ?

Before you can use the program, you have to download the program here. Then you can activate the program and see the following screen.



If you set the Multiplier in Limit section by 20, and click ADD Generate button in Coloring section, you will see a fractal generated using the equation : green(z)=1-z^2, where z is a complex number.



The Polynomial and Coloring Section

Now, clear the screen by clicking Clear Color button in Coloring section.

Then lets try to make a Fractal by using the following polynomial :
f(z)=(0.3 + 0.2 I) z2 + (4.2 - 0.9 I) z + (-2.3 + 0.2 I)

These are the thing you should do :
- Set the C(n) value in the Polynomial Section, just like the function described above.
- Set the Coloring to Red
- Set the Multiplier value in Limit section to 60
- Click ADD Generate Button



Then :
- Set the Coloring to Green
- Set the Multiplier value in Limit section to 40
- Click ADD Generate Button



At last :
- Set the Coloring to Blue
- Set the Multiplier value in Limit section to 30
- Click ADD Generate Button



And the picture above is what you would get, after doing the procedures stated above.

How to Clear the Screen ?

Set the coloring to RGB and click Clear Color.



Random function

The purpose of Random button in Polynomial Section, is for generating a random polynomial function. After clicking the Random button and clicking the ADD Generate button, you can get a picture like below.



Matrix Size

Matrix Size is the actual height and width of the generated fractal. By Enlarging the size of the matrix, we can see more detail in the generated fractal.



Polynomial with Higher Order

The Add button in Polynomial section, is used to increase the order of the polynomial function, used to make the fractal. Higher order fractals usually are more complex than lower order fractals.



If you click the Save Julia Set Image button, below the image, you can save the currently shown picture as a bitmap image. The example below have been saved in PNG format.



* Download Geoscene Fractal Generator here
* See some generated fractals in my Deviant Art gallery

Saturday, February 9, 2008

An Example of Orphys Fractal

It is suggested to read Introduction to Orphys Production Line and Shipping Schedule Optimation, before reading this entry.

Heuristic Constants in Optimation Program

The effectiveness of the optimation algorithm used in Orphys Production Line and Shipping Schedule Optimation (OPLSSO) , is affected by a set of heuristics. These measure of effectiveness, is often called fitness in Genetic Algorithm terms. By plotting the value of several objective functions into a two dimensional map, given a set of heuristic values, it is possible to compare the effectiveness of each set of heuristics.

As the number of heuristic values in Orphys PLSSO is more than two, the actual map is multidimensional. Since the computation resources I have is limited, I can only plot some two dimensional manifold inside the multidimensional map. The mathematic detail of what is plotted is given below.

For example an optimation algorithm have a set of objective values : Z1, Z2, Z3, ...... , Zk
The values of these objective values depend on a set of heuristics : h1, h2, h3, ...... , hn
A function F, will map a set of heuristics to the set of objective values as follow : [ Z1..k ] = F( h1..n );

Where k is the number of objective values and n is the number of heuristics used.

Since we have to plot a two dimensional map with two axis x and y, we have to make the value of the set of heuristics to depend on the value of x and y in linear manner :
h1 = a1 x + b1 y + c1
h2 = a2 x + b2 y + c2
h3 = a3 x + b3 y + c3
.
.
.
hn = an x + bn y + cn

Now the function F will map the value of x and y to the value of [ Z1..n ], like below :
[ Z1..k ] = F( a1..n x + b1..n y + c1..n );

The Objective Values of Orphys Production Line and Shipping Schedule Optimation

In case of Orphys PLSSO, the set of objective values are :

1. Total Production Line Time Used

How many Production Line Hour are used if a set of heuristics is used to control the algorithm used in Orphys PLSSO, according to the schedule produced by a set of heuristics ?

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest amount of Production Line Hour used, and purple denoting an area where the sets of heuristics produce a schedule with highest amount of Production Line Hour Used. The less Total Production Line Hour used, the more favourable the schedule produced is.




2. Total Overtime Hour Used

How many hours must the Production Lines in the case must works outside normal workhour, so customer's demand can be fulfilled on time, according to the schedule produced by a set of heuristics ?

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest amount of Total Overtime Hour Used, and purple denoting an area where the sets of heuristics produce a schedule with highest amount of Total Overtime Hour Used. The less Total Overtime Hour used, the more favourable the schedule produced is.




3. Total Production Line Salary

How much money must be spended to pay the salary, according to the schedule produced by a set of heuristics ? This value include the normal workhour salary and overtime payment.

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest Total Production Line Salary, and purple denoting an area where the sets of heuristics produce a schedule with highest Total Production Line Salary. The less Total Production Line Salary is required, the more favourable the schedule produced is.




4. Total Inter-Warehouse Shipping Cost

How much money must be spended to move the products from factories to warehouses or between warehouses, according to the schedule produced by a set of heuristics ?

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest Total Inter-Warehouse Shipping Cost, and purple denoting an area where the sets of heuristics produce a schedule with highest Total Inter-Warehouse Shipping Cost. The less Total Inter-Warehouse Shipping Cost is required, the more favourable the schedule produced is.




5. Total To-Customer Shipping Cost

How much money must be spended to send finished products from company's warehouses to customers on time, according to the schedule produced by a set of heuristics ? This value is affected by the amount of time left ( relative to deadline ) when the products that customers ordered is finished, the cost of the shipping means required to deliver the products on time, and the amount of products delivered.

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest Total To-Customer Shipping Cost, and purple denoting an area where the sets of heuristics produce a schedule with highest Total To-Customer Shipping Cost. The less Total To-Customer Shipping Cost is required, the more favourable the schedule produced is.



6. Order Fulfillment Cost Grand Total

Order Fulfillment Cost Grand Total is the predicted sum of all money used in all activity required to fulfill customer's demand. This cost is the sum of production line salary, inter-warehouse shipping cost, and to-customer shipping cost. So this value is the ultimate objective value of Orphys PLSSO.

The coloring used in the map below is HSV, with red denoting an area where the sets of heuristics produce a schedule with lowest Order Fulfillment Cost Grand Total, and purple denoting an area where the sets of heuristics produce a schedule with highest Order Fulfillment Cost Grand Total. The less Order Fulfillment Cost Grand Total is required, the more favourable the schedule produced is.



By comparing the maps of different objective values to Order Fulfillment Cost Grand Total map, we can understand which cost is dominant in a company. By understanding which cost is dominant in a company, the management team of a company can reduce the total cost by focusing on how to reduce the dominant cost. For example, since the map for Order Fulfillment Cost Grand Total is roughly the same with Total To-Customer Shipping Cost map ( in this example ) , we can infer that To-Customer Shipping Cost is the dominant one, and company's management team can focus their cost cutting efforts, by finding new means for shipping their finished products to customer.

Download an Example of Orphys PLSSO Schedule. ( HTML )