Homebrew [Homebrew] 3dsmandelbrot

xantoz

Well-Known Member
OP
Newcomer
Joined
Nov 28, 2014
Messages
73
Trophies
0
Age
33
XP
100
Country
No homebrew scene is complete without a gazillion mandelbrot zoomers, so here is another one.

zoom in by selecting an area (drawing a rectangle) on the touchscreen and lifting the pen (currently missing a useful indicator, so please imagine a red rectangle or something similar) Press A to reset zoom to standard level. Press START to quit

First homebrew release (ever) I guess. Code is available at: https://github.com/xantoz/3dsmandelbrot
Text drawing routine shamelessly stolen from lua player project. Uses the C99 complex number support if that is interesting or anything (might explain why it's so damn slow...).

This is an early version so it lacks a bit in the UI department (mostly the rectangles).
Note that I've compiled two versions. One that is slow, with grayscale, and one that is even slower with more interesting colors. The reason the nicer color version is slower is that it has a larger iteration depth.

Feel free to stalk me on github as I might throw up more 3ds related stuff there in the future.



EDIT: Oops, seems I still left the 3D setting on in these builds even though they have no 3D functionality... Oh well... Just don't use the 3D slide. On the plus side you can now use it as a calibration for your position relative the 3D screen. Just close your left eye and move until the screen looks black :D

UPDATE1:
New version: 3dsmandelbrot_finalish_version.zip
This can cycle between three rendering modes with the B button. One of them is a silly 3D-like thing.
I leave the others ones up if anyone wants to use the inferior version for some reason.
 

Attachments

  • 3dsmandelbrot_fast.zip
    157 KB · Views: 415
  • 3dsmandelbrot_nice_colors.zip
    157 KB · Views: 377
  • 3dsmandelbrot_finalish_version.zip
    197.7 KB · Views: 434

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,858
Trophies
2
XP
28,905
Country
United Kingdom
Awesome, gotta have fractals. Will give it a go. You should try adding a 3d effect of some sort just for novelty - different depths per colour maybe?
 

xantoz

Well-Known Member
OP
Newcomer
Joined
Nov 28, 2014
Messages
73
Trophies
0
Age
33
XP
100
Country
I've had plans to update this, but real life sort of happened and I haven't been able to keep up with the HB scene. In particular my toolchain is horribly out of date and fails on errors in the library (maybe I should just downgrade libctru).

I already fixed a simple hackish indicator of what area you are zooming into while sliding which helps immensly. I was able to do this without introducing double-buffering using cheap little xor-hacks (It seems to work so long as I only draw a small amount of pixels, but lines seems to be out of the question...).

I might make a button cycle through the modes. Actually I have a 3D mode that can be conditionally compiled in already in the code at github, but I should probably make it all switchable at run-time. The 3D stuff isn't as impressive as one might think though, it's based on the color values and the color values are rather badly posterized so...

Oh well I needed an excuse to get my toolchain up to date.

EDIT:
Could maybe speed it up some too with the support for different bitdepths and stuff, but the main problem lies in the slow fp computations, but I'm too lazy for that right now.

There was something about doing -mfloat-abi=hard instead of the -mfloat-abi=softfp in ctrulib many weeks ago but it was instantly reverted, maybe it was buggy. But having that should theoritically speed things up... except ctrulib needs to be built with it too I think (I might be wrong).
 

xantoz

Well-Known Member
OP
Newcomer
Joined
Nov 28, 2014
Messages
73
Trophies
0
Age
33
XP
100
Country
Ah there we go, NEW RELEASE. WOOP WOOP.

Quick fix when I got around to it.
Pressing B now cycles between the three rendering modes. Nice colors, silly 3d and B/W.

Maybe I should get around to that HB game I was working on.
I would... but I have a thesis to work on too ;_;
I hate when that happens...

EDIT:
I call this finalish because I might still add stuff/fix bugs. I would like to add a screenshot feature but not right now.
 

Attachments

  • 3dsmandelbrot_finalish_version.zip
    197.7 KB · Views: 240

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr