clj3D: The first (serious as a Monkey) Clojure 3D library


As we should know, a language can’t be neither omni-comprehensive nor usable in every situation. There are some kind of areas (e.g. graphics and speed-critical software) where Java sucks badly. Yeah, there are some interesting projects but they aren’t nearly comparable to the C or C++ ones. The world of 3D graphics is very fascinating and it’s my primary goal trying to find a satisfying job into it. But, what all this stuff have to do with Clojure?
Well, a Clojure flaw was a lack of 3D graphics library. I’m not talking about idiomatic wrappers (like the awesome penumbra) around OpenGL calls, since these kind of library are too low level (in my opinion). We need something to  easily create and transform 2D and 3D objects using some solid foundations.

In my free time I’m working on this kind of library, my project was called clj-3D (not too much original, I know :D). As the documentation says “Clj3D is a Clojure graphic library for manipulating 3D and 2D objects. It aims to be the Clojure standard in 3D and 2D rendering”: I think that every attempt to enrich the awesome language Clojure is, worth the effort.
Clj3D mesh together to worlds: the former is the JMonkeyEngine, a wonderful project that is trying to make Java less horrible into 3D Graphic field; the latter is PLaSM, a geometric language developed within my university.

With clj3D you are able to display something with few lines of code: you can write your own 3D models and display it directly with clj3D! Check this out:

(use '(clj3D fenvs viewer) :reload)
(view (cube 1))

This display a light gray 1x1x1 cube. clj3D is under massive development, so only few subsets of PLaSM and JMonkey have been wrapped/coded. I hope that this project will be embraced by the Clojure community, and made better as well. For the usage and installation the github page is always “work in progress”, but you can use leiningen to satisfy the dependencies and for compile the java extra classed needed. Actually clj3D is tested only under Mac OS X, so feedbacks are welcome! I will push monthly releases on Clojars, so stay tuned!

Bye!

Alfredo

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...