Logo by Maya - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. October 04, 2022, 06:30:35 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1] 2   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Evil queen and some other fractals  (Read 2396 times)
0 Members and 1 Guest are viewing this topic.
Iariak
Alien
***
Posts: 26



« on: January 08, 2016, 09:06:06 PM »

Queen Fractal



http://www.fractalforums.com/index.php?action=gallery;sa=view;id=18558

I wanted to render a Mandelbrot Set but because I am a terrible programmer, I got this instead. Not What I wanted but still pretty cool. I did eventually figure out what I did wrong. Rendered with MS Excel  cheesy
« Last Edit: January 11, 2016, 09:38:11 PM by Iariak » Logged
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #1 on: January 08, 2016, 11:54:24 PM »

How does one render a fractal in MS Excel?

Ok, I know it's Visual Basic, but do you use the cells to calculate values and then plot them into a graph, or what???

Haven't played with VB inside Excel for a good number of years.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #2 on: January 09, 2016, 06:34:26 AM »

are those apostrophes?   afro
Logged
hermann
Iterator
*
Posts: 181



WWW
« Reply #3 on: January 09, 2016, 07:23:21 AM »

The picture looks like a julia set of tippets variation fractals!
Logged

Iariak
Alien
***
Posts: 26



« Reply #4 on: January 09, 2016, 09:20:32 AM »

How does one render a fractal in MS Excel?

Ok, I know it's Visual Basic, but do you use the cells to calculate values and then plot them into a graph, or what???

Haven't played with VB inside Excel for a good number of years.
OK I hope this is not against some kinda rules here but I will post the code so you can try rendering it yourself smiley
Just post this into the VBA editor, first run Grid, this will reduce the size of the cells to 1x1 pixel. Then run drawMandelbrot. It may take a while to render, depending on how fast your PC is.

Code:
Sub Grid()
With Range(Cells(1, 1), Cells(1900, 1900))
    .ColumnWidth = 0.08
    .RowHeight = 0.75
End With
End Sub
Function iterateQueen(ByVal i As Double, j As Double)
Dim ien, jen, ienz, jenz, mag As Double
Dim patri As Integer
ien = i * i - j * j
jen = 2 * i * j
patri = 1
For k = 1 To 1000
    ien = ien * ien - jen * jen + i
    jen = 2 * ien * jen + j
    mag = Sqr(ien * ien + jen * jen)
    If mag > 2 Then
        patri = 0
        Exit For
    End If
Next k
iterateQueen = patri
End Function
Sub drawMandelbrot()
Dim pocitadloi, pocitadloj As Integer
Dim i, j As Double
' pro mandelbrotovu mnozinu i od -1 do 1, j od -2 do 1
For i = -2 To 2 Step 0.003
    pocitadloi = pocitadloi + 1
    pocitadloj = 0
    For j = -1 To 1 Step 0.003
        pocitadloj = pocitadloj + 1
        If iterateQueen(i, j) = 1 Then Cells(pocitadloi, pocitadloj).Interior.ColorIndex = 3
        DoEvents
    Next j
Next i
End Sub
After this, I managed to fix the code so that it actually draws a Mandelbrot Set.
 I also tried making some more deliberate 'mistakes' in the iterate function and I got a bunch more different fractals which I would like to post. Some of them look even cooler than this one.
By the way, would there be a way to upload an image and post it in this thread without creating another one? Because I thought that when I upload an image to a gallery, I would have to make my own thread in this section of the forums and link it but it turns out the thread is created automatically. Thanks smiley
« Last Edit: January 10, 2016, 01:10:19 PM by Iariak » Logged
Iariak
Alien
***
Posts: 26



« Reply #5 on: January 09, 2016, 09:54:15 PM »

I ended up uploading some of the pictures to flickr so I could post them here without actually uploading them here, here they are. All of these are another of my mistakes while trying to get Mandelbrot set cheesy
Urchin fractal
Mandelbrot set variation
Another Fractal
« Last Edit: January 09, 2016, 10:21:04 PM by Iariak » Logged
hermann
Iterator
*
Posts: 181



WWW
« Reply #6 on: January 10, 2016, 11:51:50 AM »

Hallo,

it is possible to make a lot of variations of the basic mandelbrot algorithm.
One of your pictures looks like an Mandelbar Fractal.
An famous example is the Burning Ship fractal:
http://www.wackerart.de/burning-ship.html

For each of this kind of Fractal it is also possible to define a Julia set.

I also have made a little catalog of some fractal algorithms:
http://www.wackerart.de/fractal_catalogue.html
http://www.wackerart.de/fractal_catalogue_2.html
http://www.wackerart.de/fractal_catalogue_3.html

How to activate the Java Applet is descript on my Java page:
http://www.wackerart.de/java.html#probleme

Hermann
Logged

simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #7 on: January 10, 2016, 12:10:14 PM »

For anyone who hasn't managed to get it working, here's the corrected code to make a mandelbrot:

Code:
Sub Grid()
With Range(Cells(1, 1), Cells(1900, 1900))
    .ColumnWidth = 0.08
    .RowHeight = 0.75
End With
End Sub

Function iterateQueen(ByVal i As Double, j As Double)
Dim ien, jen, ienz, jenz, xmag, ymag As Double
Dim patri As Integer
xmag = i * i
ymag = j * j
ien = i
jen = j
patri = 1
For k = 1 To 1000
    jen = 2 * ien * jen + j
    ien = xmag - ymag + i
    xmag = ien * ien
    ymag = jen * jen
    If xmag + ymag > 4 Then
        patri = 0
        Exit For
    End If
Next k
iterateQueen = patri
End Function

Sub drawMandelbrot()
Dim pocitadloi, pocitadloj As Integer
Dim i, j As Double
' pro mandelbrotovu mnozinu i od -1 do 1, j od -2 do 1
For i = -2 To 2 Step 0.003
    pocitadloi = pocitadloi + 1
    pocitadloj = 0
    For j = -1 To 1 Step 0.003
        pocitadloj = pocitadloj + 1
        If iterateQueen(i, j) = 1 Then Cells(pocitadloi, pocitadloj).Interior.ColorIndex = 3
        DoEvents
    Next j
Next i
End Sub
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #8 on: January 10, 2016, 01:23:16 PM »

I guess the next logical step is to make a Mandelbulb path tracer in Excel  afro
Logged

Iariak
Alien
***
Posts: 26



« Reply #9 on: January 10, 2016, 01:55:53 PM »

Thanks for fixing the code simon.snake, I did it slightly differently but whatever works  cheesy.
Also thanks for the links hermann, Burning ship looks absolutely incredible! I gotta try to render that myself.
edit: K so I managed to render Burning ship, although I don't have those cool tower-like structures on top. I thought I would get that just be decreasing the number of iterations but that doesn't do it  sad How do you get those structures?
edit again: Got it, I just needed to zoom in to another area    smiley
And here it is, again rendered using VBA in Excel. I LOVE this one, my favourite so far thanks so much for the links again Hermann  cheesy
Burning Ship at night
I'll add some more that I discovered today, one is a zoom in of a fractal with very similar formula as Mandelbrot set. In fact, it's the same formula only the first iteration is changed slightly. And the other one is the same formula as the concentric circle thing only, again, the first iteration is changed. It's really quite interesting that by changing the first iteration you get a drastically different results.
Rabbit Ears
3 Circles
And one more, this is the same fractal as the 'rabbit ears', just different coordinates and different zoom. You can actually see this area on the upper picture in the top left corner.
Fireworks

Same fractal again, different zoom and improved coloring.
Radioactive weed
And here is some more weed...I experimented a little bit with the one on the left. Only points that diverge after even number of iterations are rendered. Points that never diverge are not rendered at all.
More Weed
« Last Edit: January 12, 2016, 10:35:21 PM by Iariak » Logged
Iariak
Alien
***
Posts: 26



« Reply #10 on: January 13, 2016, 07:48:42 PM »

I feel like this one deserves it's own post. I finally got the coloring right cheesy
Improved Fireworks

This queen looks even more evil...it's a zoom in of one of the fractals I posted earlier, rotated 90°.
Burning Queen
« Last Edit: January 13, 2016, 11:43:52 PM by Iariak » Logged
Ryche
Explorer
****
Posts: 44


His Royal Pixellency


OnSeedArtistCollective @onseedonline
WWW
« Reply #11 on: January 14, 2016, 08:32:46 PM »

Very nice work on the Red Queens & everything here.. I'm going to simply ignore the fact that youre doing all this in Excel. That is beyond my comprehension.   huh?

::edit: actually ive done a decent amount of work on VB. and i know a fair bit of coding in Javascript & Processing. But still.................... My head explodes just thinking about doing fractals in Excel.
Logged

Iariak
Alien
***
Posts: 26



« Reply #12 on: January 14, 2016, 08:39:56 PM »

Heh thanks, excel is really slow but it can create almost just as beautiful images as any other (2D)fractal program if you know what you're doing...Which I really don't but I'm getting there cheesy
* here is a better version of burning ship. Called it ghost fleet, I think it's quite appropriate smiley

Ghost Fleet

And one more, doing the odd/even thing again.

Trippy

I am such a monster...Poor Mandelbrot set sad
Mangled Mandelbrot set
« Last Edit: January 15, 2016, 10:28:23 PM by Iariak » Logged
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #13 on: January 15, 2016, 11:33:32 PM »

I'd love to see a zoomed image of the bottom middle section of that mangled mandelbrot (the bottom picture in your latest reply).  It almost resembles a pair of front legs.

Also, I guess it is possible to allow the user to select a range of cells and then use the coordinates they represent for the next zoomed image, but how would you achieve that within Excel?  I guess a new toolbar with a button on it which calls the appropriate macro?

Might have to re-load my attempt and have a go.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
Iariak
Alien
***
Posts: 26



« Reply #14 on: January 16, 2016, 12:51:07 AM »

Yea zooming in the way I do it now is incredible pain, it's basically trial and error where I play with the coordinates trying to find the area I want. It would be possible to save the initial area and zoom that you render, then select an area and recalculate new coordinates and zoom for that area. The problem is that you would have to store the values somewhere...cells seem good at first glance but from what I understand, excel only counts first 15 decimal places so you would run out of space rather quickly. Now that I think about it though, it might be possible to store the values in a text file and read them from there, I might try to do that.


Edit: Storing the values in a text file works, but it's kinda pointless because it doesn't display more than 15 decimal places either way so storing them in cells would probably make more sense cheesy But damn! Zooming in on stuff is a breeze now. Rendering is still slow but whatever cheesy


I was also wondering if it was possible to speed up the rendering somehow. It might be possible to make a huge variant array that represents the rendered area and store the iteration count for each pixel there, then assign that array to a range of cells and use conditional formatting to actually visualize the image. Getting into each cell and coloring it one by one is what takes most time. Not sure if you could get the coloring flexibility I have now that way though.

* If you like, you can try finding that area yourself. Here is the code for the mangled mandelbrot set. Zoomed in on that black hole thingy
Code:
Sub drawMNoAxis()
Dim pocitadloi, pocitadloj, iterate As Integer
Dim i, j As Double

' pro mandelbrotovu mnozinu i od -1 do 1, j od -2 do 1
For i = -0.45 To -0.4 Step 0.00006
    pocitadloi = pocitadloi + 1
    pocitadloj = 0
    For j = 0.32 To 0.38 Step 0.00006
        pocitadloj = pocitadloj + 1
        iterate = iterateM22(i, j)
            If iterate > 20 Then Cells(pocitadloi, pocitadloj).Interior.Color = RGB((iterate - 5) * 5, iterate, 255 / iterate)
        DoEvents
    Next j
Next i
       

End Sub
Function iterateM22(ByVal j As Double, i As Double)
Dim ien, jen, ienz, jenz, mag As Double
Dim patri As Integer


ien = i * i - j * j + i
ien = Sqr(Abs(ien))
jen = 2 * i * j + j
jen = Sqr(Abs(jen))
ienz = ien
jenz = jen
patri = 1

For k = 1 To 1000
    ien = ienz * ienz - (jenz * jenz) + i
    jen = 2 * ienz * jenz + j
    ienz = ien
    jenz = jen
    mag = Sqr(ien * ien + jen * jen)
    If mag > 2 Then
        patri = k
        Exit For
    End If
    patri = k
Next k
iterateM22 = patri
       
End Function



Oh and I did 2 zooms of the weird mandelbrot set, one of them looks like a dragon and the other one looks almost like the fractal is getting sucked into a black hole or something  shocked
Distorted fireworks
Fractal Dragon

I did some zoom-ins with my improved "program", one is Mandelbrot set and the other one is the same fractal as the Weed pictures. The mandelbrot one took over half an hour to render, no jokes -.-
Vortex
Another Zoom into Mandelbrot

Burning Ship is awesome!
Golden Cage
Golden Cage Nr. 2

This is an interesting one...While browsing these forums I found a picture of a fractal where the description said they used log during the iteration. I tried natural log (because apparently VBA can't do any other? Sceptical)  And found this one. The smaller one in top left is just the big one, zoomed out.

Space Octopus
*I animated it tongue stuck out This is how the fractal reacts to adding small portions of |c| every iteration.
Animated Space Octopus
« Last Edit: January 18, 2016, 07:25:53 PM by Iariak » Logged
Pages: [1] 2   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Evil Rabinovich castle Mandelbulb3D Gallery DarkBeam 0 327 Last post February 19, 2011, 01:53:08 PM
by DarkBeam
Evil Pig 2d Art Kali 0 1508 Last post April 22, 2011, 09:26:54 PM
by Kali
Unknown Evil Images Showcase (Rate My Fractal) Kali 1 790 Last post October 21, 2011, 11:45:38 AM
by cKleinhuis
Flock of Evil Images Showcase (Rate My Fractal) Fractal Ken 0 450 Last post November 02, 2011, 08:51:10 AM
by Fractal Ken
Evil Roots Mandelbulb3D Gallery Tahyon 0 346 Last post January 31, 2012, 06:08:42 PM
by Tahyon

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.197 seconds with 27 queries. (Pretty URLs adds 0.01s, 2q)