开发者

Graphic library for plot/drow fractal on Java

I'm looking for a graphic library that allow me to plot a pixel point in a specific color with the purpose of draw a fractal (mandelbrot set). I've read the basic math behind fractal and I understand it, the algorithm is not difficult.

But I don't know what graphic library could I use, I don't need anything sofisticated and complex, just print a pixel set with colors. What do you suggest me? Cairo? OpenGl?.

Note: I only have experience with pygtk. I was reading the Java API and found the the fillRect method and BufferedImages but it seem开发者_StackOverflow a little complicate.

Thanks ;)


Unless you want to compute 3D fractals (in which case a library like JOGL Java OpenGL can help), a simple java.awt.Graphics.setColor( java.awt.Color aColor) is enough.
(as show in this program).

In other word, the default awt library in Java should be up to the task: see "Graphics: setColor(Color c)".


I have implemented both mandelbrot and the flame fractal algorithm in native java (no openGL).

The most efficient way is to just store color in an int array or similar, and then save it as an image file (png or jpg). It is much quicker than using Graphics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜