Neo TeAm Forum

NEO Coding Competitions => NEO Summer Compo 2007 for PSP division => NEO Summer Coding Compo 2007 => NEO Compo 2007 => The past Neo Coding Compos => the PSP APP zone => Topic started by: gambiting on August 16, 2007, 04:15:35 AM

Title: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 16, 2007, 04:15:35 AM
MANDELBROT FRACTAL GENERATOR
My nickname: Gambiting
Project name : Mandelbrot Fractal Generator
Division: PSP APP
Original enter : YES
In last NEO Compo this project won in the top 10 : NO
Discription:
This is my attempt to make a fast mandelbrot fractal rendering program with zoom feature.It's using fastest bruteforce rendering method,so unless someone use asembler programming or Xaos algorithm it's the fastest rendering possible for psp.This actual version has three fractal sizes: Fullscreen(480x272),medium(250x200),small(120x100).Bigger fractal means longer rendering time.Also,you can set number of orbit checks per loop - more checks means more details and longer rendering time.Default is 100 and with this setting you can reach 60-70x zoom,with ~30sec rendering time.With 300 checks per loop you can reach as far as 500x zoom,but rendering of single zoom can take even up to 5 minutes.And yes,the zoom here is finite.With very good pc software you can reach even 10000x magnification,but this would require setting a 2000checks per loop,and then one frame would render ~2h,so I limited possible number of checks to 300. This application isn't really practical in any way,but it's really fun to watch zooming of the fractal,and seeing as it replicates itself.Also,you can impress your math teacher that your psp can do that  ~sm-43.gif~

UPDATE LOG:
-Added 6 new colors
-Added Fullscreen 4:3 resolution(363x272)
-now you can go back to menu without quiting the game
-Added colored background feature(only for red,green,yellow,blue colors)
-You can take screenshots and save coordinates now.It works like that:
You press select,then screenshot is saved in /psp/photo/.Screenshot names are incrementing,so these will be screenshot0.png screenshot1.png ect.Coordinates are saved in /psp/game/mandelbrot/coordinates/ with name connected with screenshot,so if name of your screen shot was screenshot21.png,then coordinates will be saved as screenshot21_coordinates.txt.In this file there will be saved every point you clicked,so if you zoomed for example 4 times,then in this file will be:
342,98
213,231
476,123
387,250
So you can always replicate the same fractal with other color for example.
Gold:
(http://xs218.xs.to/xs218/07333/zoom2.PNG)

(http://xs218.xs.to/xs218/07333/zoom1.PNG)

Red:
(http://xs218.xs.to/xs218/07335/red.PNG)
Green:
(http://xs218.xs.to/xs218/07335/green.PNG)
Violet:
(http://xs218.xs.to/xs218/07335/violet.PNG)
Yellow:
(http://xs218.xs.to/xs218/07335/yellow.PNG)
Pink:
(http://xs218.xs.to/xs218/07335/pink.PNG)
Blue:
(http://xs218.xs.to/xs218/07335/blue.PNG)
Example of backgrounds:
(http://xs218.xs.to/xs218/07335/gradient3.PNG)

(http://xs218.xs.to/xs218/07335/gradient2.PNG)

(http://xs218.xs.to/xs218/07330/screenshot7.png)

(http://xs218.xs.to/xs218/07330/screenshot9.png)

(http://xs218.xs.to/xs218/07330/screenshot14.png)
Screenshots made with 480x272 resolution.

If you like it,please vote ~sm-44.gif~

Download:
http://www.neoflash.com/forum/index.php?action=dlattach;topic=4548.0;attach=1608
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: Loonix on August 17, 2007, 05:13:50 AM
This is beautyful =)

But it lacks a few features i would love to see ^^

Wishlist:
Option to abort Calculation
Option to cycle Colors of the Fractal
Option to re display help screen
Adaption of the Resolution (Fractal looks squezed)
Option to change CPU Frequency
Option for other fractals like Mandelbrot
Option to take Screenshots
(Option to save as Background/monthly picture?)

Bug:
Change of level display  is displayed as up/down, its left/right trigger)

Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: gambiting on August 17, 2007, 01:57:06 PM
Hi! Thanks for the info.I'll try to implement it before 20th august,with few exceptions -

Adaption of the Resolution (Fractal looks squezed)-Do you mean fullscreen mode or one of the smaller modes?If fullscreen,then I can't scale it to 4:3 proportion(so resolution would be 362x272).Belive me,squezzed fullscreen mandelbrot is better that non-squezzed but smaller one.

Option to change CPU Frequency - this program already runs at 333/333/166.Sure,I can implement option to change fraquencies,but why?So someone could slow down rendering even further?

Option for other fractals like Mandelbrot-no,that's not possible,not before 20th. It takes too much time to optimize one algorithm to work smoothly on psp.MAYBE I'll implement rendering of Julia Fractal,as it's similar to mandelbrot.

Change of level display  is displayed as up/down, its left/right trigger-yeah,thanks I didn't noticed that,I changed keys in the last moment and I forget to change the main screen.
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: Loonix on August 17, 2007, 05:58:47 PM
Hi Gambiting :)

Yes, i did mean the Full screen resolution and had hoped that it might save some calculation power not to resize it. The smaller ones look fine but maybe you could center them on the screen ':)

The option to change the clockspeed would only help to 'show' how much the calculation is boosted by the change. (i had hoped it might run on the standard clockspeed^^)
Maybe you should mention that so every one knows, its a feature worth knowing.

I agree that the time is a bit short, and hopy ou will develop this further when the competition is over :)

Loonix
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: gambiting on August 17, 2007, 10:06:16 PM
Ok,I will change the modes,there will be both fullscreen(16:9) and fullscreen(4:3).And by the way,do you like new colors ?  ::sm-24.gif::
MOVED TO MAIN POST
Those colors will be available in the new realease,hope you like them  :)
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: Loonix on August 17, 2007, 10:42:23 PM
Those are beautyful!

Maybe you could also add an option to change the BG color?
And an option to maybe Invert the colors or change the gradient?  ::sm-25.gif::

I know, i ask too much ^^
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: gambiting on August 17, 2007, 11:43:07 PM
You name it,you have it  ::sm-29.gif::
BACKGROUNDS MOVED TO MAIN POST
Tell me what you think about it :D
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: Loonix on August 18, 2007, 02:14:38 AM
Uh, oh.
Dont say anything you will regret ;)

I my self wont chose that colors, but it looks better with each look ^^

But i belive an options menu would be more important then different colors atm ':-)
some place where you can save a current .bmp / fractal coordinates
where you can change colors, view an about screen and return to the XMB
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: gambiting on August 18, 2007, 03:31:42 AM
Sure,sure it will be done, in the final version everything will be in place :D
Title: Re: [PSP APP] Mandelbrot Fractal Generator
Post by: Loonix on August 18, 2007, 05:50:43 AM
 ::sm-18.gif:: cant Wait for the new release ;D
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 19, 2007, 06:18:14 PM
It's the final version now,look in the main post for details :D
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: Loonix on August 19, 2007, 08:58:44 PM
And again its me  ^-^

This is much better :)
even if i hoped for:
- a chance to change the colors later while zoomed in,
- a cursor that shows me which part of the fractal i will see after the zoom ':) (a box instead of a dot)
- a possibility to see the helpscreen wile 'working' with a fractal (without to have to start all over again
- Would it be posible to create on installation a folder in MS0:\Pictures\ in wich the screenies would be saved
- A readme.txt would be great ^^


'Bugs' i found: (no extensive testing thou)
- The new archive is named exactly as the first release, but in a different packing format. that made it a bit difficult to say which was which  :'(
- A nice small eboot picture would be cool instead of the standard one.
- The analog nub wakes the brighnes only to stand by level, not to 'normal' brightness.
- Rendereing a not fullscreen fractal does not clear the Background during the first calculation.
- 'Home' button seems to be broken on 3.52 M33-2 (i have just one plugin installed which should not affect homebrew)
- i cant find the Screenshots on my MS (maybe its broken again, will try to reformat)

over all i like this much better then the first release!!
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 19, 2007, 09:40:31 PM
You ask for too much  ~sm-39.gif~
- a chance to change the colors later while zoomed in - not possible with this algorithm,would have to redraw everything again
- a possibility to see the helpscreen wile 'working' with a fractal (without to have to start all over again-previous reason
- Would it be posible to create on installation a folder in MS0:\Pictures\ in wich the screenies would be saved-I think that ms0:/psp/photo is fine,so you can browse your screenshots from xmb

- The new archive is named exactly as the first release, but in a different packing format. that made it a bit difficult to say which was which -the first one is already removed from this site
- A nice small eboot picture would be cool instead of the standard one.-nah,fullscreen background with big title is better
- The analog nub wakes the brighnes only to stand by level, not to 'normal' brightness-blame sony for that
- 'Home' button seems to be broken on 3.52 M33-2 (i have just one plugin installed which should not affect homebrew)-sorry,can't help it,I'm using 3.40OE,so I can't test it on 3.52

As I said,not much time was left when I started,so not everything is perfect,but I find this release good enough for the competition,I will try to develop it further when compo ends,keep looking for that. And thanks for the all the help  ::sm-29.gif::



Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: Loonix on August 19, 2007, 10:29:18 PM
Well ^^
i told you that i eventualy would ask too much  :-*

Screenshots realy dont seem to work with m33-2
and i tried every thing i could think of, (i even created a game340 folder ^^)

I think this project can eat up a giantic amounts of time and i hope you wont get bored too soon =)

*maybe you should remove the 'Thumbs.db' file from the archive thou.
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 20, 2007, 12:57:44 AM
Well ^^
i told you that i eventualy would ask too much  :-*

Screenshots realy dont seem to work with m33-2
and i tried every thing i could think of, (i even created a game340 folder ^^)

I think this project can eat up a giantic amounts of time and i hope you wont get bored too soon =)

*maybe you should remove the 'Thumbs.db' file from the archive thou.

I know it's strange,but try to change folder names to lowercase(so not PSP/PHOTO,but psp/photo).Let me know if it works then.
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: Loonix on August 20, 2007, 01:43:04 AM
Ah yes.
there we have one solution to the problem ^^

a /psp/photo folder did not exist on my MS ':)
now screenshots are stored in that directory
(I wonder why that did not exist i thought i had the MS formated by the PSP) :-[

thanks for the tip!
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: Sterist on August 20, 2007, 05:43:51 AM
i am curious as to know what method you used to generate the random numbers

could it be taking up valuable computing time?
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 20, 2007, 01:04:00 PM
i am curious as to know what method you used to generate the random numbers

could it be taking up valuable computing time?
There is absolutely no need for random numbers in this algorithm,it's as simple as possible.
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: gambiting on August 23, 2007, 02:22:39 AM
I have found a way to add a julia fractal into my program,so keep looking for an update after compo ends :D
Title: Re: [PSP APP] Mandelbrot Fractal Generator - FINAL VERSION!
Post by: antisocialist on August 30, 2007, 10:52:07 AM
k