Pandora A Fractal Generator For Pandora


centus

Member
Joined
Oct 6, 2008
Messages
211
Location
Suzhou, China
Hello all,

screen.jpg


It's 800x480, can't seem to get it to show up in full size... here's a link to the original location:
My link

Here's a screenshot made with the small application I'm working on which draws the most famous fractal the Mandelbrot set.
It currently supports zooming in and out, panning, changing the number of iterations and saving BMP screenshots and is written entirely using SDL.

Currently, since I don't have a Pandora yet (who does?) I'm working on my Linux box using SDL,
hopefully it shouldn't be too difficult to convert to the Pandora once I have it.

A few questions though, I'm using mouse events on the PC, how difficult would it be to use the touch screen instead of the mouse?
What would be the SDL events I should expect when the screen is touched?

I can provide the Linux executable if anyone is interested to play around with, no Windows yet, I need to setup a development environment on my XP for that... with SDL... don't really want to...

Hope you like it..
 
Should just work, as long as clicking and holding doesn't do anything funny. The Pandora treats the touchscreen as a typical HID. SDL should behave as expected.
 
What do you mean clicking and holding doesn't do anything funny?
I initially planned on using dragging to make a zoom box, I've since changed it so that now a single click zooms and pans the clicked location (on button up) and a right-click does the same but zooms out.
I also use the middle click for simple panning, but I guess I'll have to replace that since I know tap = left click, tap+hold = right click but I haven't heard of anything that does a middle click...
 
In order for a touch screen to register movement the stylus must contact the screen, obviously. Touching the screen also equals clicking. So, clicking and dragging would be out as a mechanism. Clicking and dragging should be for panning, in a touch screen usage scenario.
 
Sorry if I seem thick, but doesn't panning require the same mechanism? you touch the screen, it registers as a button_down, then you drag, which is mouse movement with button_down, then you let go which is button_up, right?
If that is true, my zoombox would have worked fine, I just assumed it would be problematic as I haven't seen the output of the events from the screen and if there is any jitter (button_down/up/down/up) while dragging, it would have been annoying...
 
Really cool. I really can't answer any of your questions concerning compatibility with the Pandora, but I am interested in messing around with it. I actually have been recently messing around with a different mandelbrot fractal generator, but it doesnt support any file saving(it actually was part of a class assignment). I'm interested in seeing how you structured your program and how easy it would be to add a few of my favorite fractals. I'm still very new to programming but like any opportunity to learn more.

Edit: Perhaps if dragging is a problem you can use the first click to select bottom left corner and a 2nd click to select top right.
 
Hey there lizard, good idea with the zoom box, thanks!

As for the code, it is still very messy but I would be happy to help a fellow beginner ;)
PM me with your email and I'll mail you the source code, I'll post the final thing when I feel it is clean enough and optimized enough...
 
Hi,

I'm drunk and I'm playing with XAOS on Debian 5, this is a weird experience ;)

Bye, Sam

Edit: sorry for that uninteresting post...
 
All I am saying is try to keep a touchscreen interface in mind for any programs you intend to port to the Pandora. That's not to say that you couldn't write your mouse code between #IFDEFs one way for WIN32 and LINUX, and another modus for Pandora, WIZ, and other touchscreen based devices.
 
You can probably use R-trigger + click* as a right-click once you start coding on the Pandora. If I recall correctly, and if OP have done all their software work, the Pandora's controls will show up as a joystick in SDL.

You should try to link in pnglib so you can save as PNGs. They're lossless like BMP, but compressed.
Also, when you say "Linux executable", is it 32-bit? I'm using 64-bit Arch on both systems here, so I'd need a recompile or something.

*ha, of course I meant either trigger, because some of you are right-handed, and would hold the stylus with the right hand and the trigger with the left..
 
lulzfish said:
You can probably use R-trigger + click* as a right-click once you start coding on the Pandora. If I recall correctly, and if OP have done all their software work, the Pandora's controls will show up as a joystick in SDL.

You should try to link in pnglib so you can save as PNGs. They're lossless like BMP, but compressed.
Also, when you say "Linux executable", is it 32-bit? I'm using 64-bit Arch on both systems here, so I'd need a recompile or something.

*ha, of course I meant either trigger, because some of you are right-handed, and would hold the stylus with the right hand and the trigger with the left..

Actually, I think I'm using 64-bit Arch... ;) don't remember which one I installed last time I did...
Anyway, where can I upload the executable for you guys to play with? anyone have an idea of a free simple file hosting service which (unlike RapidShare) doesn't suck?

As for the interface, I think I'll play around with it once I get the Pandora to get it simple and easy to use, no use in trying to guess what would be convenient to use...
 
Last edited by a moderator:
I think the beta forum here might work:

http://www.gp32x.de/board/index.php?/forum/71-beta-testing-pandora/

It's limited to 1MB each, and they have a sticky for 'real' file hosting sites:

http://www.gp32x.de/board/index.php?/topic/45302-free-file-hosting/
 
Last edited by a moderator:
Thanks for the tip lulz!
opened a new thread over there:
Beta thread

Anyone interested in trying it out, there are both a 64-bit linux and a 32-bit XP version in there...

Have fun.
 
Last edited by a moderator:
Back
Top