Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Fractals : Mandelbrot and three others

Author
Message
Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 29th Jan 2005 03:49
Hmm.. I didn't know what to do these evenings, so I wrote a prog that draw fractals. I know, a lot of such programs already exist, but ... It's always more interresting to do that oneself
You can change the screen resolution at the two first lines.

I also have a question... How do you color it with other than grey levels ? I tried a lot of way to do that, but they were all ugly - very ugly

The sleeper must awaken !
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Jan 2005 04:00
They look like someone's butt on a copy machine

"eureka" - Archimedes
harggood
21
Years of Service
User Offline
Joined: 9th Apr 2003
Location: the forest
Posted: 29th Jan 2005 06:51
interesting program Random colors?....


Awfuldark Forest
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 30th Jan 2005 08:04
If you are interested, take a look on my website for a mandelbrot fractal generator with mouse zoom facility.

Boo!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 30th Jan 2005 09:28
Quote: "They look like someone's butt on a copy machine"


You must have one weird looking butt.

@ Atreides: Nice work. I did one of these once too - I think it's in the 20 line challenge under 'frosty the snowman'. Also has point and click zoom. I chose the colour balance by trial and error, and ended up with 12:4:7 as a combination I liked for the relative amounts of red, green and blue. Also, I prefer the look of the Mandelbrot when it's black in the middle - in other words, if the number of iterations of the equation exceed the set limit, then the colour value is set to zero. This is how it would look in your code:




Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 30th Jan 2005 17:13
thank for your answers
I updated it : it's now colored, the center is black and you can zoom
when the fractal is drawn, right click if you want to draw another one, or left click if you want to zoom (left click, hold the button down and select the area you want to see by moving the mouse)

The sleeper must awaken !
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 31st Jan 2005 07:52
Much nicer!
How did you arrive at those colour values in your data statements?
Also, I'm not sure it's zooming in where I'm pointing the mouse....


Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 2nd Feb 2005 01:09 Edited at: 2nd Feb 2005 01:12
the color was easy to make : I made a n*256 pixels bitmap with The Gimp and I colored it like a rainbow. Then, I took the pixels colors and saved them in data

and about the zoom.. I don't know why it wouldn't work, I looked again at the code and I didn't found any error... It is maybe because if you zoom on mandelbrot - or some other fractal - the things you see won't be the same if you don't have the same zoom

edit>> I didn't see spooki's answer ... his generator is better than mine :p
but mine does more fractals ^_^

The sleeper must awaken !
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 3rd Feb 2005 02:09
Thanks for the compliment!

If you followed link on my website it would take you to original 20 line challenge post ( http://forum.thegamecreators.com/?m=forum_view&t=1886&b=11 ). I wrote that in November 2002 and was one of my very first proggies. Maybe I should redo it and allow different fractals to be drawn.

Interestingly a user called 'Attreid' posted on that thread.

Boo!
Atreides
21
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 3rd Feb 2005 21:39
that was me :p
the name modification is from a long time ago ... I wanted to have the name Atreides on a forum, but it was already taken and the user was inactive... so I took it, but with two t. But later, I removed the second t, because I really disliked to see two t

I tried for about two houres several equations, but ... only a few were interresting - do you know good ones ?

The sleeper must awaken !
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 4th Feb 2005 21:43
Spooky I got this (download box) with your code

Attachments

Login to view attachments
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th Feb 2005 05:39
Very nice! An unfortunate side efeect of zooming in too much and DBPros failure to cope with very small numbers.

Boo!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 5th Feb 2005 09:23
Quote: "I tried for about two houres several equations, but ... only a few were interresting - do you know good ones ?"


I stumbled across this one - kinda scary looking ...... (see the spooky little green face at the top?)




Login to post a reply

Server time is: 2024-11-23 17:06:36
Your offset time is: 2024-11-23 17:06:36