High-End 2D Java (SE) Graphics Library [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for a high-end graphics library for Java Standard Edition. I know some fairly low-level libraries: AWT/Swing, JOGL, SDL. Are/is there an alternative?
My requirements are (atleast):
Anti-aliased
Fullscreen support
Alpha channel
Blend modes and Z-depth
Rasterized Effects: (motion) blur, glow, gloom, etc.
And, optionally:
Hardware acceleration
Vector graphics (scale/rotate/translate in floating point precision)
Well documentated, easy to get started.
I understand if there are no libraries/frameworks matching all requirements, if so, can you comment on how well it's extendible?
Edit:
Are there any other alternatives besides Processing? Is Processing usable (and easy?) as a library?

All of the effects you ask for can be done with Java 2D fairly simply and Java2D is to some degree hardware accelerated. The book Filthy Rich Clients shows how to implement all of these effects and many others. Painters in the SwingX has also implemented several of these effects.
Another possibility is JavaFx. It has a lot of effects built in. A year and a half ago when I tried it, it was still a little slow, but at least one version has been released since then. It may be more performant now. It's built on top of Java2D, so it should be able to take advantage of the hardware acceleration in Java2D.
As far as full screen support here's more information.

Maybe Processing (homepage) can be a good tradeoff.
it has 4 kinds of backing, including OpenGL
it has AA
it is 2d or 3d
it supports hw acceleration
it supports transformations
its syntax is quite easy to learn
it's easily embeddable
everything you need to learn is in this page

Not really a graphics library but rather an advanced applet AND graphics library:
PulpCore
Be sure to grab a quite recent version (maybe even fetch the source via mercurial and build it yourself) because the filter effects you mentioned (blur etc.) aren't available in earlier versions.
I know it might not be exactly what you're looking for; it is not a processing alternative, but it might be the better choice, depending on what you're planning to do.

Take a look at http://processing.org

Related

Bayesian networks in Scala [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking for a library to create Bayes nets and perform learning and inference on them in Scala (or Java, in case of lack of a better solution). The library should be actively maintained, performant, preferably easy, definitely well-documented unless the usage is really straightforward. Free, open-source and commercial alternatives are ok, but for commercial solutions a free trial is required.
An ideal solution would be the equivalent of what in the .NET world is Infer.NET by Microsoft Research, but more documented.
Thanks in advance!
FACTORIE is a young project, but it fits the bill and is implemented in Scala:
FACTORIE is a toolkit for deployable probabilistic modeling,
implemented as a software library in Scala. It provides its users with
a succinct language for creating relational factor graphs, estimating
parameters and performing inference.
It's developed by Andrew McCallum and his lab at UMass, who are also responsible for the hugely useful MALLET machine learning toolkit.
You might want to look into SMILE. It is free and has Java API. Other free options in Java are UnBBayes and SamIam.
SMILE
SMILE (Structural Modeling, Inference, and Learning Engine) is a fully
portable library of C++ classes implementing graphical
decision-theoretic methods, such as Bayesian net-works and influence
diagrams, directly amenable to inclusion in intelligent systems.
UnBBayes
UnBBayes is a probabilistic network framework written in Java. It has
both a GUI and an API with inference, sampling, learning and
evaluation. It supports BN, ID, MSBN, OOBN, HBN, MEBN/PR-OWL, PRM,
structure, parameter and incremental learning.
SamIam
Samiam includes two main components: a graphical user interface and a
reasoning engine. The graphical interface lets users develop Bayesian
network models and save them in a variety of formats. The reasoning
engine supports many tasks including: classical inference; parameter
estimation; time-space tradeoffs; sensitivity analysis; and
explanation-generation based on MAP and MPE.
Pure Scala and free options are FACTORIE (already mentioned) and Figaro. But Figaro currently lacks learning part.
Figaro - Probabilistic Modeling
Figaro models are data structures in the Scala programming language,
which is interoperable with Java, and can be constructed, manipulated,
and used directly within any Scala or Java program.
Perhaps Banjo fits the bill? I'm not sure how actively it is developed, but I know it has been around for at least a few years ... (never used it myself).
Banjo: Bayesian Network Inference with Java Objects
Some Java alternatives to Infer.NET were presented as answers to this question. So, I think basically you're asking about either a follow up to that question (it was asked during the second half of 2010) with respect to Java or fully Scala-based solution.
There is a Scala lib out there by now:
https://github.com/danielkorzekwa/bayes-scala

Java GPU programming [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Is it possible to do GPU programming in Java ?
I mean without using native libraries.
And how much of a performance improvement can one expect when we switch over to gpu's ?
Edit:
I am not looking at game programming, I want to do hard core number crunching.
Yes. Java3D, LWJGL and JOGL support GLSL (OpenGL Shading Language).
Edit:
You can use OpenCL if you want to do platform-neutral, general-purpose computation on GPUs. This framework lets you write code that treats all processing units identically, despite wildly varying feature sets and execution environments. Though, this is very low level programming compared with Java.
It seems your ideal would be a JVM written with OpenCL support. Searching online, I found a little bit of interest in the idea but no evidence of any major backing.
how much of a performance improvement can one expect
That depends on the system you're running on and what sort of data you're processing (Matrix and vector math is extremely efficient on GPUs). You'd likely get some major gains on a system like mine with two powerful GPUs and a modest single-core CPU. However on a computer with a modest GPU and a quad-core CPU, the performance gains might have a hard time overcoming the overhead.
Rootbeer1 has just been released on github: https://github.com/pcpratts/rootbeer1
With Rootbeer you can program using almost any Java except the following:
native methods and fields
reflection
dynamic method invocation
garbage collection
sleeping inside a monitor
This means you can use arbitrary object graphs with composite types.
If you are still considering hard core number crunching in Java on GPU without using native libraries, you might be interested by this blog article http://ateji.blogspot.com/2011/02/java-on-gpu-with-ateji-px.html
We (I am part of the Ateji team) have seen performance of up to 60x so far on Java applications that can be massively parallelized.
def check out rootbeer1, but you need to make sure you have a CUDA accepted GFX card first before you start on it and have done all of the NVIDIA setup etc
download Link:
google CUDA download
getting started guide
http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Getting_Started_Windows.pdf

Starting out NLP - Python + large data set [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I've been wanting to learn python and do some NLP, so have finally gotten round to starting. Downloaded the english wikipedia mirror for a nice chunky dataset to start on, and have been playing around a bit, at this stage just getting some of it into a sqlite db (havent worked with dbs in the past unfort).
But I'm guessing sqlite is not the way to go for a full blown nlp project(/experiment :) - what would be the sort of things I should look at ? HBase (.. and hadoop) seem interesting, i guess i could run then im java, prototype in python and maybe migrate the really slow bits to java... alternatively just run Mysql.. but the dataset is 12gb, i wonder if that will be a problem? Also looked at lucene, but not sure how (other than breaking the wiki articles into chunks) i'd get that to work..
What comes to mind for a really flexible NLP platform (i dont really know at this stage WHAT i want to do.. just want to learn large scale lang analysis tbh) ?
Many thanks.
NLTK is where you should start from (it's Python-based -- not sure why you're already thinking about parallelizing your processing at such an early stage... start with a more flexible experimental setup, is my advice). sqlite should be fine for a few GB -- if you need more advanced and standard SQL power you could consider postgresql.
There is a related talk on PyCon 2010 "The Python and the Elephant: Large Scale Natural Language Processing with NLTK and Dumbo".
The link has introductory information, slides and video.
I think sqlite is still a good choice for 12G size data. I have a text classification training set which has the similar size, both sqlite and plain text is fine as long as just iterator it line by line.
It is most likely that you are going to use Vector Space Model to represent the text while doing the anlaysis.
In which case, you should look at platforms that can help you store term vectors with term frequencies. It makes your life so much easier.
Have a look at Apache Lucene which has a python library to access Java Lucene. Elasticsearch is also a good alternative, which uses Apache Lucene underneath and has a really good python package. Elasticsearch also exposes a REST API.
Postgresql is also really good at storing tokens. Check out this article to learn more.
I have worked with sizable language data before and I personally prefer Lucene/Elasticsearch for analysis projects.
Cheers.
Summary from the internet:
Spacy is a natural language processing (NLP) library for Python designed to have fast performance, and with word embedding models built in, it’s perfect for a quick and easy start.
Gensim is a topic modelling library for Python that provides access to Word2Vec and other word embedding algorithms for training, and it also allows pre-trained word embeddings that you can download from the internet to be loaded.
NLTK details already given above.
Standford NLP has recently launched 50+ langauge supported python framework. You should check it out for sure.
There are many others but the above 4 are most usable in the sense of community support and latest features
I personally prefer Spacy.
Spacy is one of fastest of all and can use gensim/other APIs integrated into its model.
Moreover, Spacy models has a lots of languages in its alpha stage making it a perfect choice for multilingual apps.
Scaling is whole different thing[you can use alot of tools].But lets stick to scaling in NLP: Spacy gives so much control over different pipelines that you can disable unwanted pipelines making it faster.
Look into it try yourself and explore.

OpenGL for space simulators [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
with a few friends we started this amateur platform-independent java-based project for a space combat simulator game (something like the long dead saga of wing commander). None of us though is a 3D programmer, so the road is gonna be long.
My question is: in our place would you start learning OpenGL (maybe via GLUT) or is there a better possibility today? What about Direct3D? Any books you may suggest? We ordered a couple, specifically
Dave Shriner's OpenGL Programming Guide
Luke Benstead's Beginning OpenGL Game Programming
Consider using an open source 3d engine like Ogre3D or Irrlicht. This way you can focus on making a game: content, gameplay.
Both engines define an abstraction layer that can map to Direct3D or OpenGL backends.
EDIT: at first I didn't notice you mentioned Java, anyway both engines support Java bindings.
If you decide to learn the low level graphics programming instead of using a higher level 3d engine like Ogre3D or Irrlicht, I recommend starting with OpenGL ES 2.X, which is a subset of OpenGL.
OpenGL ES 2.X is a simplified subset of OpenGL for embedded systems with programmable hardware such as phones. For example, in OpenGL there may be multiple ways to accomplish tasks, but in Open GL ES 2.X, there's only one way. Because there's less choice in OpenGL ES 2.X, there's so much less to learn to master OpenGL ES 2.X. The OpenGL ES 2.0 Programming Guide is 480 pages, and the OpenGL Programming Guide, Seventh Edition is 936 pages.
Furthermore, using OpenGL ES 2.X will give you a wider hardware audience for your game. Because it is a subset of OpenGL, code written for OpenGL ES 2.X will work on a full OpenGL system with little or no modification. Your game's graphics can work on a range of target machines from desktops to smart phones.
You could choose an open source 3D engine like Ogre3D.
But if you really want to write the graphics engine on your own (quite interesting), start by learning linear algebra. Not the quite advanced stuff, but you should be very comfortable with expressing yourself in translation vectors, rotation matrices and the like.
If you already familiar with those concepts, choose either Direct3D or OpenGL - this depends more on the available platform. If you like to code in a Mircosoft Environment, choose Direct3D, everything else, choose OpenGL.
The choice of additional libraries depends on the programming language. Better alternatives than GLUT are probably SDL (C) or Qt(C++).
Well, if you've never done 3D graphics programming before, go for simplicity and learn-as-you-go.
There used to be a set of really nice tutorials by NeHe (Neon Helium) for OpenGL, which was the route I took.
I found OpenGL easier to start with as learning curve is not so steep. You can get quick results which helps a lot with initial frustration/motivation. Tons of help etc. Words of warning though - 3D programming is inherently complex and you'll spend more energy on building graphics technology than game itself. Consider adopting Ogre3D if you really want to see the game finished :o) (disclaimer: I know there are also other engines but Ogre is stable, proven and comes with good documentation)
If you want to stay platform-independent DirectX won't do as it is restricted to Microsoft Windows Platforms

Best 3D Java Engine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Looking for an easy to use 3D Java Engine API (i.e. not wrapper) that has a good community and good development. Extra features (i.e. audio, input, etc.) are not necessary but nice.
List of the most popular Java 3D graphics APIs I found:
Wrappers / Low Level
JOGL - Strong community / Good support / Active
Java3D - Abandoned (or slowly dying), phased out Scene Graph (or re-tooling into JavaFX?)
lwjgl - Open GL wrapper, with audio and input handling / Active
Engines
jMonkey Engine - Wikipedia - Active
Branching between version 3.0 and 2.0 (may hurt community)
ogre4j - Wikipedia - Active
Parent project OGRE - Active - C++
Bindenlicht - No Wikipedia! - Not active
Parent project Irrlicht - Wikipedia - Active - C++
High Level (Not designed for gaming)
Processing - Doesn't seem suited for gaming but for graphics visualizations and demos
Jzy3d - An easy to use Java API for 3d charts (surfaces, scatters, bar charts, etc). Built on top of JOGL
Update: Please pick a JAVA engine and explain why its your choice! Thanks!
I would look at Ardor3D and have another look at JMonkeyEngine.
Ardor3D
UPDATE: Ardor3D's developer ceased the project, but a subset of it continues to exist
Created by the original JMonkeyEngine developer(s) who decided a clean break was required so they could start over and use all the experience gained to create a better API and platform.
The people I know who have used Ardor3D have very positive things to say about its design and API. It is actively maintained and has a good community and good API documentation, although tutorials are a little short in supply and generally you'll have to be familiar with 3D programming concepts to be able to pick it up.
JMonkeyEngine 3
A community-led rewrite of JMonkeyEngine 2, driven by dissatisfaction with JME2 design and related issues caused by said design, it has gone from strength to strength since its release.
There is ample documentation including tutorials and plenty of projects using it. If you had issues with JMonkeyEngine 2 or earlier, it is well worth another look at version 3.
Others
Env3D
jPCT
3dzzd
Jake2
Xith3D
You are mixing libraries and levels of libraries, Jogl and lwjgl are both pretty thin wrappers around OpenGl (IIRC lwjgl has more wrappers for OpenAL i.e. audio). While you can write a game using pure opengl you will probably spend a lot of time managing geometry, building (or reinventing) a scenegraph and other management functionality.
Processing is mostly 2D oriented.
I don't have any experience with ogre4j, but the last time I looked JMonkey was under current development looking at the 2.0 repository there is a long list of changes that are current.
If you are not too set on using Java consider some of the alternatives Torque (private Scripting Language) Panda3d (python) or the aforementioned OGRE using C++. I don't know what classes and constructs you are talking about in your first paragraph, but having a library or backend that takes care of the scene management, visibility calculations, sound management, game loop, possibly even networking might be a better driver for your decision than a specific language feature.

Categories