caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Francois Berenger <berenger@riken.jp>
Cc: caml-list@inria.fr, ocaml-opengl <opengl@lists.ocaml.org>,
	"Török Edwin" <edwin@etorok.net>
Subject: Re: [Caml-list] standard 3d vector library in OCaml
Date: Thu, 9 May 2013 11:23:22 +0100	[thread overview]
Message-ID: <F510569F0D0C4C20909DBE5AB732DFD5@erratique.ch> (raw)
In-Reply-To: <CAE1DttARsrCZTF4FPj5Hzu1tjFiMEqj94rgYzFqfTacmLo5B+w@mail.gmail.com>

> 2013/5/8, Francois Berenger:
> > Hello,
> > 
> > Is there a standard library for this purpose?
It's not standard, unreleased and I hate to pre-announce but in the following months I plan to release Gg, a module that gives you basic types for 2D and 3D computer graphics; vectors, matrices, quaternions, axis-aligned boxes, colors and raster data.

Vectors and matrices are abstract but represented internally as records of floats. This allows to pass them directly to C functions that take double arrays and avoids bounds checking in OCaml code. The memory layout of matrices is also the one expected by OpenGL.

Except for the Raster module --- metadata for bigarrays to allow libraries to share raster data without depending on each other e.g. an OpenCV or image loading library and an OpenGL library --- the module is pretty stable now, it still needs a final code review though and one or two function names may change.

The current documentation of gg can be found here [1], the code can be browsed here [2]. It can also be installed via the erratique-unstable opam repo:

    opam repo add erratique-unstable http://erratique.ch/software/opam-unstable
    opam update 
    opam install gg

But I'd advise you not to that until the next release of opam because of this bug [3] which while harmless makes your `opam update` experience become unpleasant (you have to do a `opam remove gg`, before being able to `opam update`). 

Comments are welcome. 

Best,

Daniel


[1] http://erratique.ch/software/gg/doc/Gg.html
[2] https://github.com/dbuenzli/gg/
[3] https://github.com/OCamlPro/opam/issues/552




  reply	other threads:[~2013-05-09 10:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  7:04 [Caml-list] ECSCW 2013: Call for Work-in-Progress Announce Announcements
2013-05-08  2:32 ` [Caml-list] standard 3d vector library in OCaml Francois Berenger
2013-05-08 13:55   ` Florent Monnier
2013-05-09 10:23     ` Daniel Bünzli [this message]
2013-05-09 20:27       ` [ocaml-opengl] " Florent Monnier
2013-05-09 22:01         ` Daniel Bünzli
2013-05-10 15:48           ` Florent Monnier
2013-05-10 17:01             ` Daniel Bünzli
2013-05-10 17:11               ` Anthony Tavener
2013-05-10 10:15       ` rixed
2013-05-15  1:08     ` Francois Berenger
2013-05-10  2:10   ` Francois Berenger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F510569F0D0C4C20909DBE5AB732DFD5@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    --cc=edwin@etorok.net \
    --cc=opengl@lists.ocaml.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).