From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 83A797EE51 for ; Thu, 9 May 2013 12:23:26 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIBAIx4i1FKN1ZKnGdsb2JhbABSgz6DPLxDgRMOAQEBAQEICwkJFCiCHwEBBAEjVgULCxoCJgICRxAGG4d+BgQIr3WRD4EmjgIHgkIyYQOYUoRdE44v X-IPAS-Result: AqIBAIx4i1FKN1ZKnGdsb2JhbABSgz6DPLxDgRMOAQEBAQEICwkJFCiCHwEBBAEjVgULCxoCJgICRxAGG4d+BgQIr3WRD4EmjgIHgkIyYQOYUoRdE44v X-IronPort-AV: E=Sophos;i="4.87,639,1363129200"; d="scan'208";a="16620053" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail2-smtp-roc.national.inria.fr with ESMTP; 09 May 2013 12:23:25 +0200 Received: from [10.80.118.32] (firewall.ctxuk.citrix.com [46.33.159.2]) by smtp.webfaction.com (Postfix) with ESMTP id BC74320D75F7; Thu, 9 May 2013 10:23:23 +0000 (UTC) Date: Thu, 9 May 2013 11:23:22 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Francois Berenger Cc: caml-list@inria.fr, ocaml-opengl , =?utf-8?Q?T=C3=B6r=C3=B6k_Edwin?= Message-ID: In-Reply-To: References: <5WRK1WTA-CFLT-K2D2-HI4C-UBS0MHNSFIAY@cs.ucy.ac.cy> <5189B929.2030808@riken.jp> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Caml-list] standard 3d vector library in OCaml > 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