Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
      Engine in         Haskell (Patrick LeBoutillier)
   2. Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
      Engine in         Haskell (Stephen Tetley)
   3. Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
      Engine in         Haskell (Stephen Tetley)


----------------------------------------------------------------------

Message: 1
Date: Thu, 17 Jun 2010 14:40:14 -0400
From: Patrick LeBoutillier <patrick.leboutill...@gmail.com>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
        Engine in       Haskell
To: Stephen Tetley <stephen.tet...@gmail.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktil7klytchr3pv0alltp29en-cov76bdszkhp...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Thanks, I'll try to look it up.

I have a question about the representation. In the paper, the authors
define a Region as:

type Region = Point -> Bool
type Point = (Float,Float)

I understand the idea that representing Regions as functions is quite
interesting when it comes to combining and manipulating them.
But what if one wants to calculate the area of a Region or render it
in some fashion?


Thanks,

Patrick




On Thu, Jun 17, 2010 at 11:24 AM, Stephen Tetley
<stephen.tet...@gmail.com> wrote:
> On 17 June 2010 16:12, Patrick LeBoutillier
> <patrick.leboutill...@gmail.com> wrote:
>
>> This paper was very interesting to me. Does anyone know if the full source 
>> code
>> for the Haskell prototype is available somewhere?
>
> Chapter 8 of Paul Hudak's School of Expression contains a version of
> the "region algebra", there's also an ML version by Samuel Kamin where
> the region combinators generate C++ code:
>
> Samuel Kamin - Standard ML as a Meta-Programming Language:
>
> http://loome.cs.uiuc.edu/pubs.html
> http://loome.cs.uiuc.edu/pubs/ml-meta.pdf
> _______________________________________________
> Haskell-Cafe mailing list
> haskell-c...@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada


------------------------------

Message: 2
Date: Thu, 17 Jun 2010 19:58:36 +0100
From: Stephen Tetley <stephen.tet...@gmail.com>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
        Engine in       Haskell
To: Patrick LeBoutillier <patrick.leboutill...@gmail.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktilgwpoeyxagzaixr7jom9ext7uvah1ozie1n...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi Patrick

Rendering is easy - Region is a characteristic function - so apply it
to all the coordinates in a bitmap (i.e. indexes in a 2D array) -
you'll get a black-and-white picture.

Conal Elliott's Pan and Jerzy Karczmarczuk's Clastic do this with an
extend "colour characteristic" function -@ type Picture = Point -> RGB
@- to make colour bitmaps rather than b&w ones.

Area, I'm not sure about. Maybe you good integrate the function
through a space, but this might not be a good idea.

Best wishes

Stephen


------------------------------

Message: 3
Date: Thu, 17 Jun 2010 20:12:04 +0100
From: Stephen Tetley <stephen.tet...@gmail.com>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
        Engine in       Haskell
Cc: beginners@haskell.org
Message-ID:
        <aanlktilcjscjhqvhacyvexe43gkwqc8xce1tn3x14...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 17 June 2010 19:58, Stephen Tetley <stephen.tet...@gmail.com> wrote:
...
> Area, I'm not sure about. Maybe you **good** integrate the function
> through a space, but this might not be a good idea.

Ahem, swap 'good' for 'could' in that bit...

Antony Courtney used a dual representation for his vector graphics
program - Haven. Images were both a "colour characteristic function"
and proper/plain characteristic function for regions. I think this was
so that "point in polygon" calculations could be made easily.

type Image = (Point -> Color, Region)

Perhaps, it might not be too much of a stretch to model regions both
with a characteristic function and a more concrete representation that
allows area to be taken more easily. The region combinators would
become more complicated though.


------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 24, Issue 20
*****************************************

Reply via email to