7

What is the best way to generate fractal curves on android?

Should I use NDK?

and if not

What is the right class to extend View or SurfaceView

I've generated two fractals extending View and overriding onDraw(), when the iteration count is big and curve ratio is too small, generation is too slow

Tiko
  • 990
  • 7
  • 18
  • NDK might be the best solution if you choose to draw them using Java paint methods. But it's also rather "common" to use OpenGL ES 2.0 pixel shaders for creating fractals these days. – harism Feb 03 '12 at 15:06

2 Answers2

3

You're wondering how to get more speed in the drawing. There is much information about that on this site (for example here you have some charts).

Basically, you'll get better performance extending SurfaceView than extending View and better by using GLSurfaceView.

You can read here that using NDK will not benefit most applications. I think you shouldn't use it.

If you already know OpenGL I recommend to use GLSurface. If not, try if SurfaceView get enough FPS before learning OpenGL

Community
  • 1
  • 1
Rafaesp
  • 613
  • 6
  • 17
1

Recently I stumbled on an Android tutorial at www.bringback.com which seems to contain a bunch of YouTube episodes each about 5-6 minute in length. If you want to jump straight into the SurfaceView tutorial go to part Learn Android Tutorial 1.28- Introduction to the SurfaceView.

Stephen Quan
  • 21,481
  • 4
  • 88
  • 75