开发者

Fastest data structure in Java (Processing for 4D visualization)

I've got an application that i need to use a visualization framework for. I'm currently leaning towards Processing for use in a Java desktop app.

Problem: I've got ~500k+ state vectors i need to visualize. 4D points - XYZ and time (GPS-like)

I need to be able to select time slices fast and easily, also having the capability to play them in time. I have the ability to change the input, using either flat files or a db.

So the question is: what data structure will best accommodate my needs? Do i read the files into an Arraylists? Hashmap? Or an in memory database? Or something else?

Performance is a must for visualizing in 3D. The time period is over 8 hours. So not all 开发者_StackOverflowof them will be displayed at once.

Has anyone attempted to use a creative coding framework for this type of use? Any suggestions?

Thanks!


Processing with OpenGL is an option, but if you run into performance issues, I would recommend having a look at openframeworks or libcinder.

They are c++, not java, but openframeworks for example has a very similar syntax to Processing.

Compare Matt Swoboda's recode entry to the other processing implementations.

The idea is, try Processing with OpenGL to see if you get the framerate you need, otherwise try openframewoks or libcinder.

HTH


jMonkey provides a scene graph that does something like what you describe.

It maintains a representation of 3D space that changes with time. I think normally it measures time with the system clock, meaning you don't manipulate it directly, but I bet you could plug in a component that would allow you to specify time yourself... (i.e. check the state of the graph at a time you specify).


the 2d array sounds like a good idea. With a nice sorting algorithm like quicksort or mergesort, you'll be able to select time slices.


float [][]vectors=new float[4][500000];

Just make sure you sort them from start to end. Keep it simple and test it?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜