Project: Kaos Generator
#1
Posted 18 September 2005 - 06:49 PM
I am actually working on a fractal explorer which can display the Mandelbrot fractal with 9 variants, the Julia fractal and the Henon Attractor. Unfortunately, I can't solve the zoom problem, and I would like someone to help me, please !!! I worked on it all the holyday, and I didn't foind the solution yet.
Here is the source code
And here are some screenshots :
And if you know the Lyapunov's and Newton's fractals, and Clifford A.Pickover and Gumowski-Mira attractors, please tell it to me.
Good bye, and spend a great time in these beautiful fractals.
#2
Posted 18 September 2005 - 10:08 PM
#3
Posted 19 September 2005 - 03:37 AM
So exactly which zoom problems are you talking about? I did notice the scan lines that don't always draw. It looks like its a truncation problem when converting from float to SIGNED. Try this...
SIGNED FractalWindow::toPxlX(float x) { return (x - xmin) / dot + 0.5; } SIGNED FractalWindow::toPxlY(float y) { return mReal.wBottom - ((y - ymin) / dot +0.5); }
#4
Posted 19 September 2005 - 09:28 AM
Note:I managed to solve the Lambda fractal and its variants' problem.
Are my English translations correct ? If no, please tell me the mistakes I did in the menus.
And if there are Spanish, German or Portuguese people here, it would be great that they make a translation in their native language.
Bye!
#5
Posted 19 September 2005 - 03:57 PM
Your English is good. I am glad that you are using the multi-language feature. Let me know if you have a difficult problem solving a bug and maybe I can help.Are my English translations correct ? If no, please tell me the mistakes I did in the menus.
And if there are Spanish, German or Portuguese people here, it would be great that they make a translation in their native language.
Also, I noticed you can do a few things to improve the speed...
1) You call Invalidate for the entire window. This will update the entire display. If you use a PegRect you can update only that rectangle.
2) You update the statusbar in an inner loop. You should move the "update status bar" to just above the EndDraw.
3) It looks like you are doing a full screen scan most of the time (i.e. for(y=ymin;y<=ymax;y+=dot) .. for (x=xmin,x<=xmax; x+= dox) ). This means you are drawing or clearing every pixel. You are drawing in world coordinates (floats). Since you are visiting every pixel you can draw in screen coordinate (SIGNEDs) which will be faster.
If you want I can give you an example in your code.
Thanks for all the work on the nice add-in.
#6
Posted 20 September 2005 - 08:31 PM
I use gaim so you can contact me via MSN, AIM, ICQ, Y!, google talk...
#7
Posted 21 September 2005 - 04:14 PM
SoftCalc >> I added the tips you gave me. I don't know yet if it is faster, because I don't have time to try it.
Pleaaaase!!!! Help me to solve the zoom problem!!
#8
Posted 21 September 2005 - 10:43 PM
void FractalWindow::Capture()
{
PegRect block = mClient;
PegCapture* capt = new PegCapture();
Screen()->Capture(capt, block);
pict = capt->Bitmap();
BeginDraw(pict);
Line(1, 0, 1, 192, WHITE);
Line(158, 0, 158, 192, WHITE);
EndDraw(pict);
win->pict = pict;
You are creating a new capture which then creates a new bitmap, but the old ones are never deleted.
My suggestion....
* Save the PegCapture object pointer in a member variable.
* Decide which parent object will own this
* Initialize the variable to NULL in the constructor.
* In the FractalWindow::Capture() method check if the variable is NULL. If not, then delete the old version before creating and assigning a new one.
* Finally, in the destructor if the variable is not NULL then delete it.
#9
Posted 22 September 2005 - 05:43 PM
And do someone know how to draw Markus-Lyapunov's fractal? I find these fractals really beautiful!
#10
Posted 22 September 2005 - 05:45 PM
I've fixed the zoom/pan bug, and I fixed the "zoom in" bug. I also fixed the memory leak.Here is the corrected version KaosGenerator_English.rar
SoftCalc >> I added the tips you gave me. I don't know yet if it is faster, because I don't have time to try it.
Pleaaaase!!!! Help me to solve the zoom problem!!
You were also using mReal in some places and mClient in others. These are almost the same, but not exactly the same. mReal is the actual size of the PegThing, including any borders. mClient is the rectangle that can be draw in, which does not include the borders. If there are no borders then they will be the same, but you should always use mClient if you ae drawing in the window.
I made changes through out the source, so it isn't easy to give you only the different. Do you use CVS? If you do, then it is easy to merge changes. If not, you can send me your latest source and I will merge in my changes into your latest source.
#11
Posted 23 September 2005 - 12:39 AM
And do someone know how to draw Markus-Lyapunov's fractal? I find these fractals really beautiful!
There: Introduction to Markus-Lyapunov fractals
#12
Posted 23 September 2005 - 05:44 AM
I put the add-in with the fix to the zoom here. I fixed the zoom by writing a few functions to convert between world and screen coordinates. This made life much easier.I've fixed the zoom/pan bug, and I fixed the "zoom in" bug. I also fixed the memory leak.
I made changes through out the source, so it isn't easy to give you only the different. Do you use CVS? If you do, then it is easy to merge changes. If not, you can send me your latest source and I will merge in my changes into your latest source.
http://www.cpsdk.com...lish_floats.rar
Let me know if you have changed your source code since you gave it to me. If you did, send me your new source and I can merge in my changes very easily.
I also noticed when you zoom way in it becomes boxy. I think this is due to round-off errors. Why did you use float instead of doubles or OBCD? I think using either of these will help.
#13
Posted 23 September 2005 - 06:37 AM
OK, I don't know when to stop. I figured, why fix zoom if you can't zoom in very far? I updated your code so it now uses doubles instead of floats, and you can zoom in extremely far now. If you were to change it to OBCDs you can probably zoom in even farther.I also noticed when you zoom way in it becomes boxy. I think this is due to round-off errors. Why did you use float instead of doubles or OBCD? I think using either of these will help.
The updated code is...
http://www.cpsdk.com...tor_English.rar
#14
Posted 25 September 2005 - 04:26 PM
#15
Posted 25 September 2005 - 05:42 PM
Thanks to your help, but I solve the zoom problem before reading this topic!
I deleted xorg and yorg.
First I posted the source code on the French forum, and two months later, nobody helped me. And there, I've just posted the program, that you go immediately help me!!
I am writing the manual, when I'll finish it, I will put it on www.casiocalc.org
P.S. : I never use OBCD's because they are too slow.
I someone has suggestions, please tell me them.
#16
Posted 30 October 2005 - 03:59 PM
#17
Posted 31 October 2005 - 03:19 AM
Which is your new proyect? you have talent to make very cool add-ins...
#18
Posted 31 October 2005 - 07:42 AM
I began this game: http://kilburn.free.fr/mrworm.cpa
It's a snake game, but a bit particular. Use <- and -> only.
#19
Posted 01 November 2005 - 05:05 AM
#20
Posted 01 November 2005 - 04:25 PM
...so you will help me to translate all that in spanish.
And if someone know how to trace Markus-Lyapunov fractals, please tell me...
(I am 14, so don't talk too much about limits, derivatives, etc... although I have a bit knowledge about that )
#21
Posted 02 November 2005 - 10:32 AM
you're quite good at programming im starting to learn at the moment
#22
Posted 05 November 2005 - 04:46 PM
#23
Posted 06 November 2005 - 01:27 AM
About Mr worm it would be better if the counter of things tha t the worm eat is on the status bar because at some point in the game you can't see it anymore
#24
Posted 06 November 2005 - 03:39 PM
#25
Posted 22 December 2005 - 12:23 PM
I think if you add an option to display more colors (e.g black, white, and a gray color) Fractals will look more beautiful.
Thanks.
#26
Posted 22 December 2005 - 12:57 PM
Hello, about your Fractal program:
I think if you add an option to display more colors (e.g black, white, and a gray color) Fractals will look more beautiful.
Thanks.
I already had this idea but, grayscales are not supported yet. I'm still waiting for Gaumerie who started to write a grayscale library
#27
Posted 19 November 2023 - 05:40 AM
Is there any way i can download this anymore? i have been trying to find a way for ages.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users