From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 7BAE9BC69 for ; Fri, 13 Apr 2007 02:30:39 +0200 (CEST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3D0Ucfp007071 for ; Fri, 13 Apr 2007 02:30:39 +0200 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 8AE9B215408; Thu, 12 Apr 2007 20:30:44 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 12 Apr 2007 20:30:39 -0400 X-Sasl-enc: XkQAJQL+p9NWJX1EdDHqpLiXPmNnFvVRA8RhqAhQ6/gv 1176424239 Received: from munge.burnham.org (burnham.ljcrf.edu [192.231.106.2]) by mail.messagingengine.com (Postfix) with ESMTP id F16CF12D12; Thu, 12 Apr 2007 20:30:38 -0400 (EDT) Date: Thu, 12 Apr 2007 17:30:31 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@localhost To: Jon Harrop Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Example slowing down... (OpenGL/lablgl) In-Reply-To: <200704122319.51034.jon@ffconsultancy.com> Message-ID: References: <20070411222521.GA1603@first.in-berlin.de> <200704122046.18632.jon@ffconsultancy.com> <200704122319.51034.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at discorde with ID 461ECF2E.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 lablgl:01 sqrt:01 2007,:98 26,:98 3600:98 0.01:98 wrote:01 wrote:01 caml-list:01 jambon:01 jambon:01 floats:02 opengl:02 seems:03 On Thu, 12 Apr 2007, Jon Harrop wrote: > On Thursday 12 April 2007 21:26, Martin wrote: > > No, it seems to be related to the matrix accumulating numerical errors. > > No. It is the time function. > > You can check the numerical error by computing the determinant, which remains > accurate to 1 part in 10^5 after 3600 frames. The mean numerical error > probably scales as sqrt n because the floats are "random". Actually it's just that the angle is not only a function of time, but also of the period T between two frames: angle(t+T) = angle(t) + 0.01 * t For example, if you interrupt the program and restart it a few seconds later, the rotation will restart where it left (plus one tiny increment) even though time is still running. So there's probably no big trouble with the time function or the rotation matrix. Martin -- Martin Jambon http://martin.jambon.free.fr