I have an application that has a fractal already drawn, but I have three JSliders that allow the user to zoom in out, shift the x axis, and shift the y axis. I think it's plotting around 160,000 points, and the refresh is quit noticible. I was wondering if there was a way to make this faster....And if so, how?

I'll post a few pictures seperate.

This is zooming in...On my computer you can notice the refresh, but it's not bad. On other computers, it's EXTREMELY slow.

that's one of the biggest drawbacks with java is speed. If you want speed you need to go over to c++ or some other language. But this will only lead to many other issues, particularly in the gui department. Correct me if i'm wrong, but from what I've heard java really isn't the route to go if speed is your thing.

Yeah I don't think it's a refresh rate issue as much as it is a math problem for java. Here is the bug report, maybe this will explain your dismal performance.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5005861

A DESCRIPTION OF THE REQUEST :
The transcedental functions in java.lang.Math, like trigonometric or
exponential methods, have dismal performance when compared to similar
functions from C/C++ libraries (or virtually any compiled language).
Java's performance is limited by the stringent requirements of IEEE
adherence, but this should impose only a modest overhead over other
languages. Investigating the SCSL sources, it's easy to see that the root of
all slowness lies in the fldlibm native library, which implements the
native methods from java.lang.StrictMath with an approach that compares
to emulated FP; that is, the libray doesn't exploit the FP opcodes of
FPUs, not even for the "kernel" of the calculation that FPUs could do.

while the full bug report seems to focus more on tan(x) that anything else, it also points out that it's entire math class needs an overhaul

There is A LOT of trigonomic functions in this program. I'm having to calculate complex numbers, so this is probably a big part.

Thanks for the feedback.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.