Send Beginners mailing list submissions to
[email protected]
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
[email protected]
You can reach the person managing the list at
[email protected]
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 <[email protected]>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
Engine in Haskell
To: Stephen Tetley <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
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
<[email protected]> wrote:
> On 17 June 2010 16:12, Patrick LeBoutillier
> <[email protected]> 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
> [email protected]
> 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 <[email protected]>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
Engine in Haskell
To: Patrick LeBoutillier <[email protected]>
Cc: [email protected]
Message-ID:
<[email protected]>
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 <[email protected]>
Subject: Re: [Haskell-cafe] Re: [Haskell-beginners] Re: Accounting
Engine in Haskell
Cc: [email protected]
Message-ID:
<[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On 17 June 2010 19:58, Stephen Tetley <[email protected]> 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
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 24, Issue 20
*****************************************