[Haskell-cafe] approximating pi

Benjamin L. Russell dekudekuplex at yahoo.com
Wed Apr 30 22:41:17 EDT 2008


Thank you; that is exactly the information that I was looking for.

Benjamin L. Russell

--- On Thu, 5/1/08, Steve Schafer <steve at fenestra.com> wrote:

> From: Steve Schafer <steve at fenestra.com>
> Subject: Re: [Haskell-cafe] approximating pi
> To: haskell-cafe at haskell.org
> Date: Thursday, May 1, 2008, 12:31 AM
> On Tue, 29 Apr 2008 22:12:28 -0700 (PDT), you wrote:
> 
> >I was thinking of how to represent this process
> graphically on a
> >computer screen.
> 
> The way to do this is to keep in mind that the display is
> only a
> _representation_ of the algorithm in action, it is not
> involved in the
> actual algorithm. The screen resolution is immaterial to
> the operation
> of the algorithm, which is just dealing with numbers. For
> every
> iteration of the algorithm, there should be a notification
> sent to the
> code that controls the display, and that code needs to know
> how to
> update the screen accordingly.
> 
> For example, it could be that the algorithm point
> (0.31416,0.27183) maps
> to pixel (45,127) on the screen. The update code might
> examine that
> pixel and increment its intensity, or change its color, or
> any of a
> number of other things that would indicate that the pixel
> had been
> "hit." Note that multiple algorithm points will
> necessarily map to the
> same screen pixel.
> 
> Steve Schafer
> Fenestra Technologies Corp.
> http://www.fenestra.com/
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list