public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: "Sudarshan S Chawathe" <chaw@eip10.org>
To: Per Bothner <per@bothner.com>
Cc: kawa <kawa@sourceware.org>
Subject: Re: (kawa pictures) square-limit pictures
Date: Mon, 31 Oct 2016 22:11:00 -0000	[thread overview]
Message-ID: <2373.1477951896@vereq.eip10.org> (raw)
In-Reply-To: Your message of "Sun, 30 Oct 2016 12:10:28 -0700."             <07c5b6ff-e52b-7869-6761-29138d840456@bothner.com>

> I've considered adding a procedure to help bridge the SICP
> model and the Kawa model.  Something like:
> 
> (transform-to RECT PICTURE)
> 
> This would be equivalent to some (with-transform TRANSFORM PICTURE)
> such that the bounds of the result matches RECT.

This procedure would be nice to have.

> More generally RECT could be a parallelogram.  (Note a rotated rectangle is
> a parallelogram but is not considered a rectangle.) In that case the
> bounds of the transform would not match RECT, but would have the
> same bounds as RECT.
> 
> The RECT corresponds to the "frame" of SICP.

On a related note, regarding Racket's sicp-pict package you noted
earlier: Based on a quick look at the source code, it seems to use a
bitmapped drawing canvas as the basis for segments->picture from SICP,
with the other SICP procedures being mostly verbatim (with some flipped
names, such as frame-edge1 instead of edge1-frame, I assume to conform
to current Scheme naming conventions).

I'm thinking of writing something similar with Kawa.  Actually I have a
lot of it done, but I'm working on how best to hook things into the Kawa
graphics interface.  (The way I did it earlier was a bad hack.)

Regards,

-chaw

      reply	other threads:[~2016-10-31 22:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 15:56 Sudarshan S Chawathe
2016-10-30 16:39 ` Per Bothner
2016-10-30 18:54   ` Sudarshan S Chawathe
2016-10-30 19:10     ` Per Bothner
2016-10-31 22:11       ` Sudarshan S Chawathe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2373.1477951896@vereq.eip10.org \
    --to=chaw@eip10.org \
    --cc=kawa@sourceware.org \
    --cc=per@bothner.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).