From - Mon Dec  1 17:32:16 2003
Return-Path: <beebe@sunshine.math.utah.edu>
Received: from sunshine.math.utah.edu (sunshine.math.utah.edu [128.110.198.2])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hB1GWBaW075693
          for <metafont@ens.fr>; Mon, 1 Dec 2003 17:32:11 +0100 (CET)
Received: from plot79.math.utah.edu (IDENT:3f7/pwBZtEFWp81nTAviNuxTBRduUV3i@plot79.math.utah.edu [128.110.198.20])
	by sunshine.math.utah.edu (8.12.10/8.12.10) with ESMTP id hB1GVuhx009899;
	Mon, 1 Dec 2003 09:31:57 -0700 (MST)
Received: from plot79.math.utah.edu (IDENT:/GyzjVFquERmgtdxK+CUD9NLw9YnYQjH@localhost [127.0.0.1])
	by plot79.math.utah.edu (8.12.10/8.12.10) with ESMTP id hB1GVueV019463;
	Mon, 1 Dec 2003 09:31:56 -0700 (MST)
Received: (from beebe@localhost)
	by plot79.math.utah.edu (8.12.10/8.12.10/Submit) id hB1GVs55019461;
	Mon, 1 Dec 2003 09:31:55 -0700 (MST)
Date: Mon, 1 Dec 2003 09:31:55 -0700 (MST)
From: "Nelson H. F. Beebe" <beebe@math.utah.edu>
To: metafont@ens.fr, tex-fonts@math.utah.edu
Cc: beebe@math.utah.edu
X-US-Mail: "Center for Scientific Computing, Department of Mathematics, 110
        LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT
        84112-0090, USA"
X-Telephone: +1 801 581 5254
X-FAX: +1 801 585 1640, +1 801 581 4148
X-URL: http://www.math.utah.edu/~beebe
Subject: News: GNU package for 3-D drawing with Metapost
Message-ID: <CMM.0.92.0.1070296314.beebe@plot79.math.utah.edu>

This interesting item appears on the info-gnu mailing list:

>> ...
>> From: Laurence Finston <lfinsto1@gwdg.de>
>> Subject: 3DLDF: 3D drawing with MetaPost output
>> Date: Sun, 30 Nov 2003 16:58:22 +0100 (MET)
>> To: info-gnu@gnu.org
>> 
>> 3DLDF is a new GNU package for three-dimensional drawing with MetaPost
>> output. It is written in C++ using CWEB and includes the _3DLDF User and
>> Reference Manual_ written using Texinfo, and documented program
>> code in book form (_3DLDF: The Program_), which was created using cweave.
>> 
>> 3DLDF is intended, among other things, to provide a convenient way of
>> creating 3D graphics for inclusion in TeX files.
>> 
>> 3DLDF 1.1.2 (the current version) is currently available for
>> downloading from:
>> http://wwwuser.gwdg.de/~lfinsto1
>> 
>> The _3DLDF User and Reference Manual_ and _3DLDF: The Program_ are
>> downloadable
>> separately.
>> 
>> 3DLDF will be made available at
>> http://ftp.gnu.org/gnu/3DLDF
>> as soon as possible.
>> The official 3DLDF website will be
>> http://www.gnu.org/software/3DLDF
>> but it hasn't been set up yet.
>> 
>> The following mailing lists should be made available soon:
>> 
>> info-3DLDF@gnu.org        For announcements.
>> help-3DLDF@gnu.org        For users to help one another
>> bug-3DLDF@gnu.org         For bug reports.
>> 
>> Until they are available, please contact the author (see below).
>> 
>> 3DLDF does not currently include an input routine, so that user code must
>> be written in C++, compiled, and linked with the rest of the program.
>> The files README and INSTALL, and the _3DLDF User and Reference Manual_
>> contain detailed instructions for doing this.
>> 
>> Laurence Finston is the maintainer and, so far, the only developer of
>> 3DLDF.
>> He can be contacted at:
>> lfinsto1@gwdg.de
>> ...

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 581 4148                  -
- University of Utah                    Internet e-mail: beebe@math.utah.edu  -
- Department of Mathematics, 110 LCB        beebe@acm.org  beebe@computer.org -
- 155 S 1400 E RM 233                                                         -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------

From - Tue Dec  9 21:46:34 2003
Return-Path: <a.delmotte@largevision.com>
Received: from smtp-out.tiscali.be (spoolo1.tiscali.be [62.235.13.210])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hB9KkVaW028699
          for <metafont@ens.fr>; Tue, 9 Dec 2003 21:46:31 +0100 (CET)
Received: from [62.235.116.57] (helo=adelmotte.largevision.com)
	by smtp-out.tiscali.be with esmtp (Tiscali.be http://www.tiscali.be)
	id 1ATokX-0005Qv-Iq
	for <metafont@ens.fr>; Tue, 09 Dec 2003 21:46:31 +0100
Message-Id: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
X-Sender: tpm17153@pop3.pro.tiscali.be (Unverified)
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Tue, 09 Dec 2003 21:38:26 +0100
To: liste metafont <metafont@ens.fr>
From: Alain Delmotte <a.delmotte@largevision.com>
Subject: Accent
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef.ens.fr id hB9KkVaW028699

Hello,

In the Metafont/(La)TeX system, where are the accent defined?

They are created by metafont, but are they normal characters with
a normal width? And if yes how are they correctly placed atop of any
other character?

What about the vertical position, it should not be the same for a
lowercase letter and for a capital?

Is it possible to imagine to create a character without width so that it
overlap the preceding or following characters?

Thanks,

Alain Delmotte


avenue du Marathon, 6
B 1348 Louvain-la-Neuve
Belgique
tél./fax 00 (32) 10 45 44 44
tél. privé 00 (32) 10 45 11 92



From - Tue Dec  9 22:15:41 2003
Return-Path: <bdesgraupes@easyconnect.fr>
Received: from smarthost1.mail.easynet.fr (smarthost1.mail.easynet.fr [212.180.1.68])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hB9LFcaW041250
          for <metafont@ens.fr>; Tue, 9 Dec 2003 22:15:38 +0100 (CET)
Received: from [212.180.15.41] (helo=easyconnect.fr)
	by smarthost1.mail.easynet.fr with esmtp (Exim 3.35 #1 (Debian))
	id 1ATpCk-0003tE-00; Tue, 09 Dec 2003 22:15:38 +0100
Message-ID: <3FD63B79.4070402@easyconnect.fr>
Date: Tue, 09 Dec 2003 22:15:37 +0100
From: Bernard Desgraupes <bdesgraupes@easyconnect.fr>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Alain Delmotte <a.delmotte@largevision.com>
CC: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] Accent
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
In-Reply-To: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



>
> In the Metafont/(La)TeX system, where are the accent defined?

In the fonts.

>
> They are created by metafont, but are they normal characters with
> a normal width? And if yes how are they correctly placed atop of any
> other character?

It depends on the encoding you are using, on the accent itself etc.
In OT1 encoding (128 code values) accents are separate characters and 
are placed on the top of characters thanks to adhoc macros defined in 
the specifictation of the encoding (file .enc read by TeX)
In T1 (256 code values) you have both accents and accented letters.
There are other encodings, other scripts (cyrillic, greek etc.), so that 
one can find quite a wide variety of situations.

>
> What about the vertical position, it should not be the same for a
> lowercase letter and for a capital?
>
> Is it possible to imagine to create a character without width so that it
> overlap the preceding or following characters?

Yes it is easy to do in Metafont.

>


From - Wed Dec 10 11:46:32 2003
Return-Path: <raichle@isis.informatik.uni-stuttgart.de>
Received: from ifi.informatik.uni-stuttgart.de (ifi.informatik.uni-stuttgart.de [129.69.211.1])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBAAkSaW080554
          for <metafont@ens.fr>; Wed, 10 Dec 2003 11:46:28 +0100 (CET)
Received: from isar.informatik.uni-stuttgart.de (isar [129.69.215.232]) by ifi.informatik.uni-stuttgart.de (8.9.3p2/2.2) with ESMTP id LAA08688; Wed, 10 Dec 2003 11:46:27 +0100 (MET)
Received: (from raichle@localhost) by isar.informatik.uni-stuttgart.de (8.9.3p2/2.2) id LAA01406; Wed, 10 Dec 2003 11:46:26 +0100 (MET)
From: Bernd Raichle <raichle@Informatik.Uni-Stuttgart.DE>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <16342.63874.140712.413114@is.informatik.uni-stuttgart.de>
Date: Wed, 10 Dec 2003 11:46:26 +0100
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] Accent
In-Reply-To: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
X-Mailer: VM 7.17 under Emacs 21.2.2

On Tuesday, 9 December 2003 21:38:26 +0100,
Alain Delmotte <a.delmotte@largevision.com> writes:
 > Hello,
 > 
 > In the Metafont/(La)TeX system, where are the accent defined?

In the font and/or in TeX, the program.


Depending on the font encoding, fonts can contain accented characters,
e.g. an e accent grave in an T1 encoded font.  These characters are
created by Metafont and are "normal" glyphs.

For fonts (e.g. OT1 encoded) which do not have these accented
characters you need an accent glyph and a "base" character glyph to
built them.

 > They are created by metafont, but are they normal characters with
 > a normal width? And if yes how are they correctly placed atop of any
 > other character?

TeX provides the \accent primitive to put an accent glyph over another
glyph.  (It is possible that these two characters are from different
font).

 > What about the vertical position, it should not be the same for a
 > lowercase letter and for a capital?

The accent glyph is a "normal" glyph character in the font.  It should
be created in such a way that its placement is correct for an
non-slanted font and an lowercase character without ascenders,
i.e., the height of the base characters is equal to 1ex (e.g. "x" :-).

If the height of the base character differs from 1ex, \accent raises
(or lowers) the accent glyph accordingly by height_basechar - 1ex.

The horizontal placement is done in such a way that the accent glyph
is centered over the base glyph. Thus both characters should have a
proper width.  If a font is slanted, the horizontal placement is fixed
accordingly using the distance by which the accent is raised (or
lowered).

All these computations are done by TeX's \accent primitive and can not
be changed.  If you want to change the accent placement, you have to
do it by changing the glyph dimensions ... or by fooling TeX about the
height of 1ex (this trick is used by "german.sty"/Babel's "german" to
lower the umlaut accents a little bit).


 > Is it possible to imagine to create a character without width so that it
 > overlap the preceding or following characters?

Yes, this is possible.  TeX only uses the glyph dimensions to place
them.  TeX does not know where a (Meta)font designer puts the ink on
the paper.

Btw. overlapping can be done using TeX's macros, too (cf. the cedille
macro \c in plain.tex).


Best wishes,
  -bernd
_____________________________________________________________________
Bernd Raichle                                  "Le langage est source
Autor des `german.sty' (aktuell: v2.5e)         de malentendus"
DE-TeX-FAQ: http://www.dante.de/faq/de-tex-faq/ (A. de Saint-Exupery)

From - Wed Dec 10 18:05:07 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBAH54aW099792
          for <metafont@ens.fr>; Wed, 10 Dec 2003 18:05:04 +0100 (CET)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197])
 by mailhost.uark.edu
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTPS id <0HPO00GLVUY5AV@mailhost.uark.edu> for metafont@ens.fr; Wed,
 10 Dec 2003 10:54:05 -0600 (CST)
Date: Wed, 10 Dec 2003 10:54:05 -0600 (CST)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] Accent
In-reply-to: <3FD63B79.4070402@easyconnect.fr>
To: liste metafont <metafont@ens.fr>
Message-id: <Pine.GSO.4.58.0312101042500.16127@comp.uark.edu>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
 <3FD63B79.4070402@easyconnect.fr>

On Tue, 9 Dec 2003, Bernard Desgraupes wrote:

>
>
> >
> > In the Metafont/(La)TeX system, where are the accent defined?
>
> In the fonts.
>
> >
> > They are created by metafont, but are they normal characters with
> > a normal width? And if yes how are they correctly placed atop of any
> > other character?
>
> It depends on the encoding you are using, on the accent itself etc.
> In OT1 encoding (128 code values) accents are separate characters and
> are placed on the top of characters thanks to adhoc macros defined in
> the specifictation of the encoding (file .enc read by TeX)

As far as LaTeX is concerned, no .enc files are read. LaTeX's fontenc
package reads *enc.def.  Plain TeX has fixed encodings, based on the
actual positions in the cm fonts.

> In T1 (256 code values) you have both accents and accented letters.
> There are other encodings, other scripts (cyrillic, greek etc.), so that
> one can find quite a wide variety of situations.
>
> >
> > What about the vertical position, it should not be the same for a
> > lowercase letter and for a capital?
> >
> > Is it possible to imagine to create a character without width so that it
> > overlap the preceding or following characters?
>
> Yes it is easy to do in Metafont.

In the cm fonts, the only place (that I know of) where this is used
is for \not (the slash making \not= work). TeX has \accent and
\mathaccent primatives that behave as Bernd Raichle describes in another
post.

Regards,

-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101

From - Wed Dec 10 18:35:16 2003
Return-Path: <bdesgraupes@easyconnect.fr>
Received: from smarthost1.mail.easynet.fr (smarthost1.mail.easynet.fr [212.180.1.68])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBAHZFaW009636
          for <metafont@ens.fr>; Wed, 10 Dec 2003 18:35:15 +0100 (CET)
Received: from [212.180.15.203] (helo=easyconnect.fr)
	by smarthost1.mail.easynet.fr with esmtp (Exim 3.35 #1 (Debian))
	id 1AU8Ex-00086b-00
	for <metafont@ens.fr>; Wed, 10 Dec 2003 18:35:11 +0100
Message-ID: <3FD7594F.8040607@easyconnect.fr>
Date: Wed, 10 Dec 2003 18:35:11 +0100
From: Bernard Desgraupes <bdesgraupes@easyconnect.fr>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] Accent
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be> <3FD63B79.4070402@easyconnect.fr> <Pine.GSO.4.58.0312101042500.16127@comp.uark.edu>
In-Reply-To: <Pine.GSO.4.58.0312101042500.16127@comp.uark.edu>
Content-Type: multipart/alternative;
 boundary="------------090204060409040101000409"

This is a multi-part message in MIME format.
--------------090204060409040101000409
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



Daniel H. Luecking wrote:


>As far as LaTeX is concerned, no .enc files are read. LaTeX's fontenc
>package reads *enc.def.  Plain TeX has fixed encodings, based on the
>actual positions in the cm fonts.
>  
>

This is what I wanted to say. I was thinking of ot1enc.def et al. but my 
fingers typed too fast. Thanks for the correction.

>>>Is it possible to imagine to create a character without width so that it
>>>overlap the preceding or following characters?
>>>      
>>>
>>Yes it is easy to do in Metafont.
>>    
>>
>
>In the cm fonts, the only place (that I know of) where this is used
>is for \not (the slash making \not= work). TeX has \accent and
>\mathaccent primatives that behave as Bernd Raichle describes in another
>post.
>  
>
I think the original message was asking about creating a char with zero 
width with Metafont, not hacking cm.

Cheers

Bernard

--------------090204060409040101000409
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
<br>
Daniel H. Luecking wrote:<br>
<br>
<br>
<blockquote type="cite"
 cite="midPine.GSO.4.58.0312101042500.16127@comp.uark.edu">
  <pre wrap="">As far as LaTeX is concerned, no .enc files are read. LaTeX's fontenc
package reads *enc.def.  Plain TeX has fixed encodings, based on the
actual positions in the cm fonts.
  </pre>
</blockquote>
<br>
This is what I wanted to say. I was thinking of ot1enc.def et al. but
my fingers typed too fast. Thanks for the correction.<br>
<br>
<blockquote type="cite"
 cite="midPine.GSO.4.58.0312101042500.16127@comp.uark.edu">
  <blockquote type="cite">
    <blockquote type="cite">
      <pre wrap="">
Is it possible to imagine to create a character without width so that it
overlap the preceding or following characters?
      </pre>
    </blockquote>
    <pre wrap="">Yes it is easy to do in Metafont.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
In the cm fonts, the only place (that I know of) where this is used
is for \not (the slash making \not= work). TeX has \accent and
\mathaccent primatives that behave as Bernd Raichle describes in another
post.
  </pre>
</blockquote>
I think the original message was asking about creating a char with zero
width with Metafont, not hacking cm.<br>
<br>
Cheers<br>
<br>
Bernard<br>
</body>
</html>

--------------090204060409040101000409--


From - Wed Dec 10 21:56:02 2003
Return-Path: <a.delmotte@largevision.com>
Received: from smtp-out.tiscali.be (spoolo2.tiscali.be [62.235.13.211])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBAKtuaW070608
          for <metafont@ens.fr>; Wed, 10 Dec 2003 21:55:57 +0100 (CET)
Received: from [62.235.116.5] (helo=adelmotte.largevision.com)
	by smtp-out.tiscali.be with esmtp (Tiscali.be http://www.tiscali.be)
	id 1AUBMx-0000TA-SU
	for <metafont@ens.fr>; Wed, 10 Dec 2003 21:55:41 +0100
Message-Id: <5.0.2.1.2.20031210214525.00a51230@pop3.pro.tiscali.be>
X-Sender: tpm17153@pop3.pro.tiscali.be (Unverified)
X-Mailer: QUALCOMM Windows Eudora Version 5.0.2
Date: Wed, 10 Dec 2003 21:53:35 +0100
To: liste metafont <metafont@ens.fr>
From: Alain Delmotte <a.delmotte@largevision.com>
Subject: Re: [metafont] Accent
In-Reply-To: <16342.63874.140712.413114@is.informatik.uni-stuttgart.de>
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
 <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef.ens.fr id hBAKtuaW070608

Thanks to everybody for the answers given.

A 11:46 10/12/2003 +0100, vous avez écrit :
>For fonts (e.g. OT1 encoded) which do not have these accented
>characters you need an accent glyph and a "base" character glyph to
>built them.
>
>  > They are created by metafont, but are they normal characters with
>  > a normal width? And if yes how are they correctly placed atop of any
>  > other character?
>
>TeX provides the \accent primitive to put an accent glyph over another
>glyph.  (It is possible that these two characters are from different
>font).

So, if I understand well for the OT1: the accent is a glyph on its own
and it should have a small height as it will go above another character
(if it were of the height of the font, it would go far above the character!!)

I also think of putting the accents I'll need at the position of the normal
accents in cm fonts to benefit of the existing macros \'x, ... Correct?
(this is for a thai font and the accent are in fact the voyelles put above
the other letters, sometimes in two levels - unless somebody knows
of a full operational system, I went to CTAN and downloaded the
usl-thai.mf file).

Thanks again,

Alain Delmotte


avenue du Marathon, 6
B 1348 Louvain-la-Neuve
Belgique
tél./fax 00 (32) 10 45 44 44
tél. privé 00 (32) 10 45 11 92



From - Wed Dec 10 22:13:06 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mailhost.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBALD0aW075910
          for <metafont@ens.fr>; Wed, 10 Dec 2003 22:13:03 +0100 (CET)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197])
 by mailhost.uark.edu
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTPS id <0HPP00EE669S9N@mailhost.uark.edu> for metafont@ens.fr; Wed,
 10 Dec 2003 14:58:41 -0600 (CST)
Date: Wed, 10 Dec 2003 14:58:40 -0600 (CST)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] Accent
In-reply-to: <3FD7594F.8040607@easyconnect.fr>
To: liste metafont <metafont@ens.fr>
Message-id: <Pine.GSO.4.58.0312101442270.15454@comp.uark.edu>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
 <3FD63B79.4070402@easyconnect.fr>
 <Pine.GSO.4.58.0312101042500.16127@comp.uark.edu>
 <3FD7594F.8040607@easyconnect.fr>

On Wed, 10 Dec 2003, Bernard Desgraupes wrote:

>
> >>>Is it possible to imagine to create a character without width so that it
> >>>overlap the preceding or following characters?
> >>>
> >>Yes it is easy to do in Metafont.
> >>
> >In the cm fonts, the only place (that I know of) where this is used
> >is for \not (the slash making \not= work). TeX has \accent and
> >\mathaccent primatives that behave as Bernd Raichle describes in another
> >post.
> >
> I think the original message was asking about creating a char with zero
> width with Metafont, not hacking cm.

I only meant to expand on your words by giving an example of a font
created with Metafont that actually used the idea. And to suggest that
it is not very common as the rather standard cm fonts don't employ it
much, and certainly not for accents.

If a zero width character were used to create an accent, the glyph
would need a different position (in its 0-width box) for each possible
height and width of characters that needed the accent. It is probably
for this reason that Knuth gave TeX the \accent primitive.

Regards,

-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101

From - Wed Dec 10 22:25:43 2003
Return-Path: <bdesgraupes@easyconnect.fr>
Received: from smarthost2.mail.easynet.fr (smarthost2bis.mail.easynet.fr [212.180.1.37])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBALPcaW081565
          for <metafont@ens.fr>; Wed, 10 Dec 2003 22:25:38 +0100 (CET)
Received: from [212.180.15.203] (helo=easyconnect.fr)
	by smarthost2.mail.easynet.fr with esmtp (Exim 3.35 #1 (Debian))
	id 1AUBpy-0004vn-00
	for <metafont@ens.fr>; Wed, 10 Dec 2003 22:25:38 +0100
Message-ID: <3FD78F52.9070702@easyconnect.fr>
Date: Wed, 10 Dec 2003 22:25:38 +0100
From: Bernard Desgraupes <bdesgraupes@easyconnect.fr>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] Accent
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be> <3FD63B79.4070402@easyconnect.fr> <Pine.GSO.4.58.0312101042500.16127@comp.uark.edu> <3FD7594F.8040607@easyconnect.fr> <Pine.GSO.4.58.0312101442270.15454@comp.uark.edu>
In-Reply-To: <Pine.GSO.4.58.0312101442270.15454@comp.uark.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



Daniel H. Luecking wrote:

>I only meant to expand on your words by giving an example of a font
>created with Metafont that actually used the idea. And to suggest that
>it is not very common as the rather standard cm fonts don't employ it
>much, and certainly not for accents.
>
>If a zero width character were used to create an accent, the glyph
>would need a different position (in its 0-width box) for each possible
>height and width of characters that needed the accent. It is probably
>for this reason that Knuth gave TeX the \accent primitive.
>  
>
Right. I fully agree.

Bernard

>
>  
>


From - Thu Dec 11 14:21:06 2003
Return-Path: <raichle@isis.informatik.uni-stuttgart.de>
Received: from ifi.informatik.uni-stuttgart.de (ifi.informatik.uni-stuttgart.de [129.69.211.1])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBBDL2aW049699
          for <metafont@ens.fr>; Thu, 11 Dec 2003 14:21:02 +0100 (CET)
Received: from isar.informatik.uni-stuttgart.de (isar [129.69.215.232]) by ifi.informatik.uni-stuttgart.de (8.9.3p2/2.2) with ESMTP id OAA27949; Thu, 11 Dec 2003 14:20:59 +0100 (MET)
Received: (from raichle@localhost) by isar.informatik.uni-stuttgart.de (8.9.3p2/2.2) id OAA03071; Thu, 11 Dec 2003 14:20:58 +0100 (MET)
From: Bernd Raichle <raichle@Informatik.Uni-Stuttgart.DE>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Message-ID: <16344.28474.125448.213433@is.informatik.uni-stuttgart.de>
Date: Thu, 11 Dec 2003 14:20:58 +0100
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] Accent
In-Reply-To: <5.0.2.1.2.20031210214525.00a51230@pop3.pro.tiscali.be>
References: <5.0.2.1.2.20031209213419.009efd70@pop3.pro.tiscali.be>
	<5.0.2.1.2.20031210214525.00a51230@pop3.pro.tiscali.be>
X-Mailer: VM 7.17 under Emacs 21.2.2
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef.ens.fr id hBBDL2aW049699

On Wednesday, 10 December 2003 21:53:35 +0100,
Alain Delmotte <a.delmotte@largevision.com> writes:
 > Thanks to everybody for the answers given.
 > 
 > A 11:46 10/12/2003 +0100, vous avez écrit :
 > >For fonts (e.g. OT1 encoded) which do not have these accented
 > >characters you need an accent glyph and a "base" character glyph to
 > >built them.
 > >
 > >  > They are created by metafont, but are they normal characters with
 > >  > a normal width? And if yes how are they correctly placed atop of any
 > >  > other character?
 > >
 > >TeX provides the \accent primitive to put an accent glyph over another
 > >glyph.  (It is possible that these two characters are from different
 > >font).
 > 
 > So, if I understand well for the OT1: the accent is a glyph on its own
 > and it should have a small height as it will go above another character
                      ^^^^^^^^^^^^^^
 > (if it were of the height of the font, it would go far above the character!!)

No, it should be positioned in such a way that its place is ok when
overprinting an "x" with this accent.  This means that its height is
usually greater than 1ex.  Please have a look into "cmr10" (or Volume
E of "Computers&Typesetting" :-) as an example how it is done by Knuth.


 > I also think of putting the accents I'll need at the position of the normal
 > accents in cm fonts to benefit of the existing macros \'x, ... Correct?

Yes.

 > (this is for a thai font and the accent are in fact the voyelles put above
 > the other letters, sometimes in two levels - unless somebody knows
 > of a full operational system, I went to CTAN and downloaded the
 > usl-thai.mf file).

The \accent primitive does not support more than one accents... but
there are tricks how to achieve it (there are some packages for double
accent support on CTAN).


Best wishes,
  -bernd


From - Thu Dec 11 15:45:52 2003
Return-Path: <cthiele@ccs.carleton.ca>
Received: from ccs.carleton.ca (driftwood.ccs.carleton.ca [134.117.1.49])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBBEjkaW076311
          for <metafont@ens.fr>; Thu, 11 Dec 2003 15:45:46 +0100 (CET)
Received: from rideau.YP.nobel (daemon@rideau [134.117.1.17])
	by ccs.carleton.ca (8.12.10/8.12.10) with ESMTP id hBBEjkM8007809
	for <metafont@ens.fr>; Thu, 11 Dec 2003 09:45:46 -0500 (EST)
From: Christina Thiele <cthiele@ccs.carleton.ca>
Received: (from cthiele@localhost)
	by rideau.YP.nobel (8.11.6+Sun/8.9.1) id hBBEjjc22619
	for metafont@ens.fr; Thu, 11 Dec 2003 09:45:45 -0500 (EST)
Message-Id: <200312111445.hBBEjjc22619@rideau.YP.nobel>
Subject: Re: [metafont] Accent
To: metafont@ens.fr
Date: Thu, 11 Dec 2003 09:45:45 -0500 (EST)
In-Reply-To: <no.id> from "Bernd Raichle" at Dec 11, 2003 02:20:58 PM
X-Mailer: ELM [version 2.5 PL5]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Bernd Raichle writes:
> 
> ...
>  > (this is for a thai font and the accent are in fact the voyelles put above
>  > the other letters, sometimes in two levels - unless somebody knows
>  > of a full operational system, I went to CTAN and downloaded the
>  > usl-thai.mf file).
> 
> The \accent primitive does not support more than one accents... but
> there are tricks how to achieve it (there are some packages for double
> accent support on CTAN).
> 
> Best wishes,
>   -bernd
> 


One of these is a very old macro we devised for CJL back in the 1980s
(first published in _TeXniques_ No. 5, 1987 TUG conf.). I believe it's
also available to wsuipa users and probably also tipa (Fukui?). But
you can copy this one -- still works for me ;-)

\def\diatop[#1|#2]{\leavevmode{\setbox1=\hbox{{#1{}}}%
                     \setbox2=\hbox{{#2{}}}%
                     \dimen0=\ifdim\wd1>\wd2\wd1\else\wd2\fi%
                     \dimen1=\ht2\advance\dimen1by-1ex%
                     \setbox1=\hbox to1\dimen0{\hss#1\hss}%
                     \rlap{\raise1\dimen1\box1}%
                     \hbox to1\dimen0{\hss#2\hss}}}%
 
Usage is then:

   \diatop[<1st accent>|<2nd accent + char.>]

Occasionally, the results aren't good ;-) so the first strategy is to
just reverse the order of the accents. I think that Phil Taylor once
told me why this was so but I've of course forgotten ;-)  -- not
because it was Phil ;-) but because I'm not very good at understanding
TeX's inner workings ;-))

I also recall that Yannis used \diatop is some of his SE Asian
language stuff -- it's on one of his TUGboat articles, probably a
proceedings issue, perhaps early 90s? -- and I pointed out that I'd
found that adding \leavevmode (first line of the def) was a useful
refinement (again, I was looking at the results, not the reasons
... ).

And I do think that on at least one occasion I've embedded a \diatop
within a \diatop to get a third diacritic -- probably would've been a
combination of two on top, and one below ...

Anyone else with \diatop experiences or workarounds for problem
combinations? 

Ch.


From - Fri Dec 12 20:25:14 2003
Return-Path: <lfinsto1@gwdg.de>
Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBCJPBaW045952
          for <metafont@ens.fr>; Fri, 12 Dec 2003 20:25:11 +0100 (CET)
Received: from gwdu71.gwdg.de ([134.76.8.21])
	by mailer.gwdg.de with esmtp (Exim 4.20)
	id 1AUsuQ-0008Ru-Rl
	for metafont@ens.fr; Fri, 12 Dec 2003 20:25:06 +0100
Received: from localhost by gwdu71.gwdg.de (8.11.1/1.1.29.3/16Jun03-0924AM)
	id hBCJP6r0000296506; Fri, 12 Dec 2003 20:25:06 +0100 (MET)
X-Authentication-Warning: gwdu71.gwdg.de: lfinsto1 owned process doing -bs
Date: Fri, 12 Dec 2003 20:25:06 +0100 (MET)
From: Laurence Finston <lfinsto1@gwdg.de>
To: liste metafont <metafont@ens.fr>
Subject: 3DLDF 1.1.4 Release (fwd)
Message-ID: <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Level: /
X-Spam-Report: Content analysis: 0.0 points, 6.0 required
X-Virus-Scanned: (clean) by exiscan+sophie

3DLDF 1.1.4 has been released.
3DLDF 1.1.4 is a GNU package for three-dimensional drawing with MetaPost
output.

**********************************

Dear Metafont users,

It would be fairly easy to get 3DLDF to output Metafont code as well as
MetaPost code. I've been thinking about a possible application, namely
fonts consisting of characters that are perspective projections of
three-dimensional characters. This effect is sometimes used in movie and
TV titles, e.g., Monty Python. I believe it would be most appropriate for
display fonts, so ``meta-ness'' would not necessarily be required.

Would anybody be interested in this sort of font? If so, I'll give a
higher priority to making 3DLDF output Metafont code. It would be even
nicer if someone was interested in working on it with me. For example,
if someone else coded a set of letters, I could write the
code for making Metafont output possible. (The letters need to be
coded in C++, using the functions of 3DLDF.)

Another thing that might be of interest to Metafont and MetaPost users is
the input routine. As you may know, 3DLDF doesn't have one yet. I'm about
to start work on it. I intend that 3DLDF should behave like Metafont from
a user's point of view. The messages it prints to standard output and its
error handling should be similar to Metafont's. Ideally, any valid
Metafont or Metapost input should be valid 3DLDF input. However, this is a
non-trivial task, given the complexity of Metafont's syntax.
What makes it easier, or even possible, is that _The METAFONTbook_
explains the syntax very clearly, using tables. It shouldn't be necessary
to refer to _METAFONT: The Program_.
Another difficulty is that
Metafont and 3DLDF are quite different. Knuth programmed Metafont's
scanning and parsing routines from scratch, and I plan to use Bison and
Flex. However, I believe it should be possible with a reasonable amount
of effort, and that it is definitely worth doing.

If anyone's interested in helping with either of these tasks, or
with 3DLDF in general, please contact me.

Sincerely,

Laurence Finston
3DLDF maintainer

**************************************************************


3DLDF can be downloaded from
http://ftp.gnu.org/gnu/3dldf

New in version 1.1.4:

The Texinfo manual can now be generated in Info and HTML formats.

Bug fix in the shell script 3DLDF-1.1.4/CWEB/tsthdweb that's used by
3DLDF-1.1.4/CWEB/Makefile to control rebuilding. Previously, files were
sometimes retangled and recompiled unnecessarily. I believe I've fixed the
problem now, but it's tricky, so I'll have to keep an eye on it.

Added the function Rectangle::is_rectangular() and made mediate() a member
function in class Point.

MAX_REAL is now really the second largest float,
but only on 32-bit, little-endian architectures. On other architectures,
3dldf will exit with an error message. I plan to make this work on other
architectures soon.

Laurence Finston
3DLDF maintainer
lfinsto1@gwdg.de
http://wwwuser.gwdg.de/~lfinsto1

From - Fri Dec 12 22:17:42 2003
Return-Path: <bdesgraupes@easyconnect.fr>
Received: from smarthost1.mail.easynet.fr (smarthost1.mail.easynet.fr [212.180.1.68])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBCLHaaW087871
          for <metafont@ens.fr>; Fri, 12 Dec 2003 22:17:36 +0100 (CET)
Received: from ipdynerx74-107.clients.easynet.fr ([195.114.74.107] helo=easyconnect.fr)
	by smarthost1.mail.easynet.fr with esmtp (Exim 3.35 #1 (Debian))
	id 1AUufG-0000nW-00
	for <metafont@ens.fr>; Fri, 12 Dec 2003 22:17:34 +0100
Message-ID: <3FDA306D.7060302@easyconnect.fr>
Date: Fri, 12 Dec 2003 22:17:33 +0100
From: Bernard Desgraupes <bdesgraupes@easyconnect.fr>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
References: <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
In-Reply-To: <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit



Laurence Finston wrote:

>Would anybody be interested in this sort of font? If so, I'll give a
>higher priority to making 3DLDF output Metafont code. 
>
Great idea !

>It would be even
>nicer if someone was interested in working on it with me. For example,
>if someone else coded a set of letters, I could write the
>code for making Metafont output possible. (The letters need to be
>coded in C++, using the functions of 3DLDF.)
>
>Another thing that might be of interest to Metafont and MetaPost users is
>the input routine. As you may know, 3DLDF doesn't have one yet. I'm about
>to start work on it. I intend that 3DLDF should behave like Metafont from
>a user's point of view. 
>
Do you mean so that people can write 3DLDF fonts with source code files 
"à la Mf" ?

>The messages it prints to standard output and its
>error handling should be similar to Metafont's. Ideally, any valid
>Metafont or Metapost input should be valid 3DLDF input. However, this is a
>non-trivial task, given the complexity of Metafont's syntax.
>What makes it easier, or even possible, is that _The METAFONTbook_
>explains the syntax very clearly, using tables. It shouldn't be necessary
>to refer to _METAFONT: The Program_.
>Another difficulty is that
>Metafont and 3DLDF are quite different. Knuth programmed Metafont's
>scanning and parsing routines from scratch, and I plan to use Bison and
>Flex. However, I believe it should be possible with a reasonable amount
>of effort, and that it is definitely worth doing.
>  
>
Maybe you can have a look at the mfpic package which spews Mf code too 
(it is written in TeX but it is interesting to see what kind of files it 
outputs and what kind of macros it defines for this purpose).

Chhers

Bernard


From - Sat Dec 13 11:12:58 2003
Return-Path: <lfinsto1@gwdg.de>
Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBDACuaW044719
          for <metafont@ens.fr>; Sat, 13 Dec 2003 11:12:56 +0100 (CET)
Received: from gwdu71.gwdg.de ([134.76.8.21])
	by mailer.gwdg.de with esmtp (Exim 4.20)
	id 1AV6lV-0006AJ-To
	for metafont@ens.fr; Sat, 13 Dec 2003 11:12:49 +0100
Received: from localhost by gwdu71.gwdg.de (8.11.1/1.1.29.3/16Jun03-0924AM)
	id hBDACn40000315130; Sat, 13 Dec 2003 11:12:49 +0100 (MET)
X-Authentication-Warning: gwdu71.gwdg.de: lfinsto1 owned process doing -bs
Date: Sat, 13 Dec 2003 11:12:49 +0100 (MET)
From: Laurence Finston <lfinsto1@gwdg.de>
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-Reply-To: <3FDA306D.7060302@easyconnect.fr>
Message-ID: <Pine.OSF.4.58.0312131051010.313053@gwdu71.gwdg.de>
References: <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN
X-Spam-Level: /
X-Spam-Report: Content analysis: 0.0 points, 6.0 required
X-Virus-Scanned: (clean) by exiscan+sophie
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by nef.ens.fr id hBDACuaW044719

On Fri, 12 Dec 2003, Bernard Desgraupes wrote:

> >Another thing that might be of interest to Metafont and MetaPost users is
> >the input routine. As you may know, 3DLDF doesn't have one yet. I'm about
> >to start work on it. I intend that 3DLDF should behave like Metafont from
> >a user's point of view.
> >
> Do you mean so that people can write 3DLDF fonts with source code files
> "à la Mf" ?
>

It would be more precise to say that I want people to be able to use 3DLDF
to generate Metafont fonts.

I would like 3DLDF to behave in a way familiar to users of TeX
and Metafont:

1. It should be callable from the command line of a shell, taking input
   either from standard input or a file. Making this
   work is more important than writing a GUI.

2. When called interactively, `**' should appear, and typing `\relax'
   should cause `*' to appear.  The meaning of `**' of `*' should be the
   same as in MF.

3. Errors should cause similar messages to be printed to standard error,
   and context should appear in the same way. It should be possible to
   delete and insert tokens as in TeX and MF.

   This may actually be a bit tricky to code. Per default Flex returns
   information about the line and column numbers of tokens, but I
   don't think I have direct access to the buffer where it keeps its
   input.  In particular, I think it discards the lines it's already
   processed, so I'll have to maintain a second input stream in order
   to display the context.

4. Ideally, when valid Metafont or Metapost is fed to 3DLDF, it should
   output identical MF or MP code.  This in itself will probably serve no
   useful purpose, but will make it possible to use MF or MP code as
   the basis of three-dimensional drawings or fonts. It will also be a
   useful test of whether I manage to implement MF/MP's syntax in
   3DLDF.

My purpose is to make 3DLDF fit in well with TeX, MF, MP, and the
tools associated with them, dvips, kpathsea, etc.


> Maybe you can have a look at the mfpic package which spews Mf code too
> (it is written in TeX but it is interesting to see what kind of files it
> outputs and what kind of macros it defines for this purpose).

Thanks for the suggestion.


Laurence Finston
3DLDF maintainer


From - Sun Dec 14 20:31:06 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mailhost.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBEJV2aW001981
          for <metafont@ens.fr>; Sun, 14 Dec 2003 20:31:02 +0100 (CET)
Received: from mathfolk.uark.edu ([130.184.197.23])
 by mailhost.uark.edu (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8
 2003)) with ESMTPSA id <0HPW003PHGKFGG@mailhost.uark.edu> for metafont@ens.fr;
 Sun, 14 Dec 2003 13:24:15 -0600 (CST)
Date: Sun, 14 Dec 2003 13:22:13 -0600
From: Dan Luecking <luecking@uark.edu>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-reply-to: <3FDA306D.7060302@easyconnect.fr>
X-Sender: luecking@mail.uark.edu
To: liste metafont <metafont@ens.fr>
Message-id: <5.2.1.1.0.20031214131052.00b48ad0@mail.uark.edu>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version 5.2.1
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
References: <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>

At 10:17 PM 12/12/2003 +0100, you wrote:

>Laurence Finston wrote:
>
>>The messages it prints to standard output and its
>>error handling should be similar to Metafont's. Ideally, any valid
>>Metafont or Metapost input should be valid 3DLDF input. However, this is a
>>non-trivial task, given the complexity of Metafont's syntax.
>>What makes it easier, or even possible, is that _The METAFONTbook_
>>explains the syntax very clearly, using tables. It shouldn't be necessary
>>to refer to _METAFONT: The Program_.
>>Another difficulty is that
>>Metafont and 3DLDF are quite different. Knuth programmed Metafont's
>>scanning and parsing routines from scratch, and I plan to use Bison and
>>Flex. However, I believe it should be possible with a reasonable amount
>>of effort, and that it is definitely worth doing.
>>
>Maybe you can have a look at the mfpic package which spews Mf code too (it 
>is written in TeX but it is interesting to see what kind of files it 
>outputs and what kind of macros it defines for this purpose).

Mfpic's methods are not particularly revealing: Apart from handling
optional arguments, its commands simply write a MF (or MP) command
that is defined in an auxiliary file grafbase.mf (or .mp) which must
be input by the file that mfpic writes. For example, \circle{(0,0),2}
simply writes "circle((0,0),2)" and grafbase contains:
   vardef circle(expr p, r)=
     fullcircle scaled 2r shifted p
   enddef
Mfpic handles raw MF (or MP) code by a command  that writes its contents
unchanged. I don't see why 3DLDF couldn't do the equivalent.

Dan


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas 


From - Sun Dec 14 21:00:07 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBEK02aW009794
          for <metafont@ens.fr>; Sun, 14 Dec 2003 21:00:05 +0100 (CET)
Received: from mathfolk.uark.edu ([130.184.197.23])
 by mailhost.uark.edu (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8
 2003)) with ESMTPSA id <0HPW003CJHHHGG@mailhost.uark.edu> for metafont@ens.fr;
 Sun, 14 Dec 2003 13:44:06 -0600 (CST)
Date: Sun, 14 Dec 2003 13:42:04 -0600
From: Dan Luecking <luecking@uark.edu>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-reply-to: <Pine.OSF.4.58.0312131051010.313053@gwdu71.gwdg.de>
X-Sender: luecking@mail.uark.edu
To: liste metafont <metafont@ens.fr>
Message-id: <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
MIME-version: 1.0
X-Mailer: QUALCOMM Windows Eudora Version 5.2.1
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
References: <3FDA306D.7060302@easyconnect.fr>
 <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr>

At 11:12 AM 12/13/2003 +0100, Laurence Finston  wrote:

>I would like 3DLDF to behave in a way familiar to users of TeX
>and Metafont:
>
>1. It should be callable from the command line of a shell, taking input
>    either from standard input or a file. Making this
>    work is more important than writing a GUI.

This would be good. In fact, I wouldn't put a GUI on my list of priorities
at all.

>2. When called interactively, `**' should appear, and typing `\relax'
>    should cause `*' to appear.  The meaning of `**' of `*' should be the
>    same as in MF.
>
>3. Errors should cause similar messages to be printed to standard error,
>    and context should appear in the same way. It should be possible to
>    delete and insert tokens as in TeX and MF.

TeX and MF are uniformly disliked for their error messages. I would urge a
more parsable style: An error message should be clearly designated as such,
contain the file name and line of the error, and the error message.

However the MF/TeX method of showing the actual code where the error
was detected, and allowing interactive insertion of tokens would be nice.


>4. Ideally, when valid Metafont or Metapost is fed to 3DLDF, it should
>    output identical MF or MP code.  This in itself will probably serve no
>    useful purpose,

Actually, it is a very useful thing. No matter how one designs a high level
language, an escape to the lower level always seems to be needed. LaTeX
style writer frequently resort to TeX primitives and C programmers often
embed assembly code.

>  but will make it possible to use MF or MP code as
>    the basis of three-dimensional drawings or fonts. It will also be a
>    useful test of whether I manage to implement MF/MP's syntax in
>    3DLDF.

Do you really need to implement the syntax? If your program outputs MF code,
what prevents you from simply having a command that instructs 3DLDF to pass
along some text verbatim?


> > Maybe you can have a look at the mfpic package which spews Mf code too
> > (it is written in TeX but it is interesting to see what kind of files it
> > outputs and what kind of macros it defines for this purpose).
>
>Thanks for the suggestion.

I wouldn't think mfpic would provide any deep insight. It is hardly more
than a 1-1 translation: TeX marcros write similar MF macros. The
accompanying definitions of the MF macros do all the drawing.
(And I know, a large part of them were written by me following the lead of
the previous maintainers.)

Dan


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas 


From - Mon Dec 15 13:39:17 2003
Return-Path: <lfinsto1@gwdg.de>
Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBFCdEaW022176
          for <metafont@ens.fr>; Mon, 15 Dec 2003 13:39:14 +0100 (CET)
Received: from gwdu71.gwdg.de ([134.76.8.21])
	by mailer.gwdg.de with esmtp (Exim 4.20)
	id 1AVs0H-0003Ac-Tp
	for metafont@ens.fr; Mon, 15 Dec 2003 13:39:13 +0100
Received: from localhost by gwdu71.gwdg.de (8.11.1/1.1.29.3/16Jun03-0924AM)
	id hBFCdDp0000380997; Mon, 15 Dec 2003 13:39:13 +0100 (MET)
X-Authentication-Warning: gwdu71.gwdg.de: lfinsto1 owned process doing -bs
Date: Mon, 15 Dec 2003 13:39:11 +0100 (MET)
From: Laurence Finston <lfinsto1@gwdg.de>
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-Reply-To: <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
Message-ID: <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>
References: <3FDA306D.7060302@easyconnect.fr> <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr> <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Level: /
X-Spam-Report: Content analysis: 0.0 points, 6.0 required
X-Virus-Scanned: (clean) by exiscan+sophie

On Sun, 14 Dec 2003, Dan Luecking wrote:

> TeX and MF are uniformly disliked for their error messages. I would urge a
> more parsable style:

One reason I want 3DLDF to act like Metafont is so that it will seem
familiar to users of TeX, MF, and MP. They shouldn't have to learn a whole
new set of conventions.

> An error message should be clearly designated as such,
> contain the file name and line of the error, and the error message.
>
I agree completely, I'll do that.


> At 11:12 AM 12/13/2003 +0100, Laurence Finston  wrote:
>
> >  but will make it possible to use MF or MP code as
> >    the basis of three-dimensional drawings or fonts. It will also be a
> >    useful test of whether I manage to implement MF/MP's syntax in
> >    3DLDF.
On Sun, 14 Dec 2003, Dan Luecking wrote:
>
> Do you really need to implement the syntax? If your program outputs MF code,
> what prevents you from simply having a command that instructs 3DLDF to pass
> along some text verbatim?
>

What I mean is that the syntax of the 3DLDF language should be similar
to that of the Metafont language. It should be so similar that valid
Metafont code will cause 3DLDF to output identical Metafont code _after
processing it_.

This is an example of input that 3DLDF should be able to parse:

z0 = origin;
z1 = (1cm, 2in, 3pt);
z2 = (5, 7, 19.32pt);
z3 = z2 shifted z1;
draw z0 .. tension 1.5 and 2.. z1{curl0} ... z2 .. z3 --cycle;

I haven't tested these values, so it might be appropriate for them
to signal an error because of an invalid turning number.

`zscaling' is clearly a problem, since it already has a meaning in
Metafont. However, I refuse to call the z-axis something else just because
of this. I could have called the axes `x_1', `x_2', and `x_3', but I
decided to stick with the most familiar names. I may regret this if I
decide to implement projections of hypercubes and Klein bottles (this
isn't a joke).

>
On Sun, 14 Dec 2003, Dan Luecking wrote:
>
> I wouldn't think mfpic would provide any deep insight. It is hardly more
> than a 1-1 translation: TeX marcros write similar MF macros. The
> accompanying definitions of the MF macros do all the drawing.
> (And I know, a large part of them were written by me following the lead of
> the previous maintainers.)
>

3DLDF already outputs Metapost code, so it shouldn't be too difficult to
make it output Metafont code. I'll need  `beginchar()' and `endchar()'
functions in addition to the `beginfig()' and `endfig()' functions, and a
means of switching between `Metafont_mode' and `Metapost_mode'.
I will have to change the `output()' functions so that they behave
properly, and make various other changes.

The real difficulty is that 3DLDF currently does no scan converting. It
operates on the assumption that the two-dimensional projection of a path
will look okay as long as there are enough points on it. Paths consisting
of straight segments are no problem.

I have books that describe how to implement Bezier curves in
three-dimensions, and I plan to start doing this soon. I need to find one
thing out: If I project the control points of a 3D Bezier curve, is the 2D
Bezier curve defined by the projected points the projection of the 3D
curve? If it is, this means less work for me, but I suspect it isn't. Does
anybody know of the top of his or her head?

Once I get this to work, it will be possible to specify 2D Metafont/Metapost
paths that represent true projections of the 3D 3DLDF Paths. Then, it
would be possible to program a ``3D font'', as long as all paths either
consist of straight segments only, or are specified using
`.. controls p and q ..', where p and q are points.
Metafont can output this information for paths
specified in other ways, so this might be useful for the first attempt at
making a 3D font.

However, ultimately I would like to implement `curl' and `tension'. I know
that John Hobby has published a paper about the algorithm that implements
these features, but I haven't read it. I don't know whether he extends it
to three-dimensions, or if I'll understand it if he does.

I'm pretty sure that I will try to program a 3D font myself eventually;
probably when I want to use this feature in a drawing.
However, as you probably all know, programming even a simple font with no
meta-ness is a lot of work.

I've gotten to a point with 3DLDF that I can't do
everything myself, at least, not as quickly as I'd like. Therefore,
I'm actively looking for volunteers.

I'm much more likely to implement support for 3D fonts sooner rather
than later if I know that people are going to want to use it, and
especially if someone else wanted to code the input for the font itself.

Laurence Finston
3DLDF Maintainer
Home page: http://wwwuser.gwdg.de/~lfinsto1/LDF.html
email: lfinsto1@gwdg.de

From - Mon Dec 15 16:44:46 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mailhost.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBFFifaW084849
          for <metafont@ens.fr>; Mon, 15 Dec 2003 16:44:41 +0100 (CET)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197])
 by mailhost.uark.edu
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTPS id <0HPY007300LONI@mailhost.uark.edu> for metafont@ens.fr; Mon,
 15 Dec 2003 09:34:36 -0600 (CST)
Date: Mon, 15 Dec 2003 09:34:36 -0600 (CST)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-reply-to: <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>
To: liste metafont <metafont@ens.fr>
Message-id: <Pine.GSO.4.58.0312150917230.20029@comp.uark.edu>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <3FDA306D.7060302@easyconnect.fr>
 <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr>
 <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
 <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>

On Mon, 15 Dec 2003, Laurence Finston wrote:

>
> What I mean is that the syntax of the 3DLDF language should be similar
> to that of the Metafont language. It should be so similar that valid
> Metafont code will cause 3DLDF to output identical Metafont code _after
> processing it_.
>
> This is an example of input that 3DLDF should be able to parse:
>
> z0 = origin;
> z1 = (1cm, 2in, 3pt);
> z2 = (5, 7, 19.32pt);
> z3 = z2 shifted z1;
> draw z0 .. tension 1.5 and 2.. z1{curl0} ... z2 .. z3 --cycle;
>
> I haven't tested these values, so it might be appropriate for them
> to signal an error because of an invalid turning number.
>
> `zscaling' is clearly a problem, since it already has a meaning in
> Metafont. However, I refuse to call the z-axis something else just because
> of this. I could have called the axes `x_1', `x_2', and `x_3', but I
> decided to stick with the most familiar names. I may regret this if I
> decide to implement projections of hypercubes and Klein bottles (this
> isn't a joke).

This sounds like a resonable idea. How do you intend to distinguish.
3d points from color? It would seem that one has to make the languages
(3DLDF vs MetaPost) pretty different in some respects.

> The real difficulty is that 3DLDF currently does no scan converting. It
> operates on the assumption that the two-dimensional projection of a path
> will look okay as long as there are enough points on it. Paths consisting
> of straight segments are no problem.
>
> I have books that describe how to implement Bezier curves in
> three-dimensions, and I plan to start doing this soon. I need to find one
> thing out: If I project the control points of a 3D Bezier curve, is the 2D
> Bezier curve defined by the projected points the projection of the 3D
> curve? If it is, this means less work for me, but I suspect it isn't. Does
> anybody know of the top of his or her head?

If the projection is a linear projection or an affine projection
(linear+shift), then yes, the projection of the curve coincides with
the Bezier with the projected control points. Not true for perspective
projections. It is also not true that a standard path like
  A'..B'..C'
(where A' is the projection of A, etc., and the control points are
calculated by MF/MP) is the correct projection of A..B..C (where 3DLDF
would have to calculate the controls in 3D). Not even with linear
projections. A smooth curve can have a projection with cusps and
A'..B'..C' will always be smooth.

I've thought about a few of these things in trying to work up a 3D
version of mfpic.

>
> Once I get this to work, it will be possible to specify 2D Metafont/Metapost
> paths that represent true projections of the 3D 3DLDF Paths. Then, it
> would be possible to program a ``3D font'', as long as all paths either
> consist of straight segments only, or are specified using
> `.. controls p and q ..', where p and q are points.
>
> However, ultimately I would like to implement `curl' and `tension'. I know
> that John Hobby has published a paper about the algorithm that implements
> these features, but I haven't read it. I don't know whether he extends it
> to three-dimensions, or if I'll understand it if he does.

The algorithms, as Knuth explains things in the MFbook, acts on
direction angles, which don't have an obvious 3D counterpart.


-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101

From - Mon Dec 15 19:55:20 2003
Return-Path: <lfinsto1@gwdg.de>
Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBFItEaW044231
          for <metafont@ens.fr>; Mon, 15 Dec 2003 19:55:14 +0100 (CET)
Received: from gwdu71.gwdg.de ([134.76.8.21])
	by mailer.gwdg.de with esmtp (Exim 4.20)
	id 1AVxs9-0004V4-A0
	for metafont@ens.fr; Mon, 15 Dec 2003 19:55:13 +0100
Received: from localhost by gwdu71.gwdg.de (8.11.1/1.1.29.3/16Jun03-0924AM)
	id hBFItAG0000394499; Mon, 15 Dec 2003 19:55:10 +0100 (MET)
X-Authentication-Warning: gwdu71.gwdg.de: lfinsto1 owned process doing -bs
Date: Mon, 15 Dec 2003 19:55:10 +0100 (MET)
From: Laurence Finston <lfinsto1@gwdg.de>
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-Reply-To: <Pine.GSO.4.58.0312150917230.20029@comp.uark.edu>
Message-ID: <Pine.OSF.4.58.0312151924330.392962@gwdu71.gwdg.de>
References: <3FDA306D.7060302@easyconnect.fr> <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr> <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
 <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>
 <Pine.GSO.4.58.0312150917230.20029@comp.uark.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Level: /
X-Spam-Report: Content analysis: 0.0 points, 6.0 required
X-Virus-Scanned: (clean) by exiscan+sophie

On Mon, 15 Dec 2003, Daniel H. Luecking wrote:

>
> How do you intend to distinguish.
> 3d points from color? It would seem that one has to make the languages
> (3DLDF vs MetaPost) pretty different in some respects.
>
I don't understand your question. Inside 3DLDF, Color and Point are both
classes. When I implement the scanner and parser, a declaration like
`color c(255, 255, 255);'
in the input file
will cause an object of type Color to be allocated and stored in a data
structure (probably a map), together with the string "c".
`point p(1.5, 2, 33);'
will be treated analogously.

3DLDF does not build on MP the way MP builds on MF.
I'm only interested
in simulating MF/MP's behavior in certain clearly defined areas.

Clearly, the 3DLDF language will have to differ from the Metapost
language in some respects. For example, in 3DLDF, `point' will play the
role of `pair' in Metapost. `pair' will be
equivalent to `point' and have three coordinates. This is necessary, in
order for 3DLDF to handle Metapost code properly.
I like this, because it appeals to my sense of the absurd.

It may be a little unclear why I've said both `Point' and `point' above.
`Point' is a data type in 3DLDF. 3DLDF is usable now, it just doesn't have
an input routine. User code must be written in C++, and `Point' is one
of the data types that are defined in 3DLDF. `point' will be the name of a
data type in what I've been calling the ``3DLDF language''.
It will be
one of the tokens recognized by the scanner, and will cause the parser to
perform appropriate actions.
Once the scanner and parser are implemented, 3DLDF will then be
a compiler in the same way that TeX, MF, and MP are, and it will make
sense to speak of a ``3DLDF language''.

I don't want to limit the syntax of the 3DLDF language to that of MF/MP's;
I just want it to handle MF and MP code correctly.

>
> If the projection is a linear projection or an affine projection
> (linear+shift), then yes, the projection of the curve coincides with
> the Bezier with the projected control points. Not true for perspective
> projections. It is also not true that a standard path like
>   A'..B'..C'
> (where A' is the projection of A, etc., and the control points are
> calculated by MF/MP) is the correct projection of A..B..C (where 3DLDF
> would have to calculate the controls in 3D). Not even with linear
> projections. A smooth curve can have a projection with cusps and
> A'..B'..C' will always be smooth.
>
>
Thanks for the information. It would have been too good to be true, the
other way.

Laurence Finston
3DLDF maintainer
website: http://wwwuser.gwdg.de/~lfinsto1/LDF.html
email: lfinsto1@gwdg.de

From - Mon Dec 15 23:35:12 2003
Return-Path: <luecking@uark.edu>
Received: from mailhost.uark.edu (mail.uark.edu [130.184.5.66])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBFMZ9aW005568
          for <metafont@ens.fr>; Mon, 15 Dec 2003 23:35:09 +0100 (CET)
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197])
 by mailhost.uark.edu
 (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
 with ESMTPS id <0HPY00781K2KS2@mailhost.uark.edu> for metafont@ens.fr; Mon,
 15 Dec 2003 16:35:09 -0600 (CST)
Date: Mon, 15 Dec 2003 16:35:08 -0600 (CST)
From: "Daniel H. Luecking" <luecking@uark.edu>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-reply-to: <Pine.OSF.4.58.0312151924330.392962@gwdu71.gwdg.de>
To: liste metafont <metafont@ens.fr>
Message-id: <Pine.GSO.4.58.0312151619260.19130@comp.uark.edu>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <3FDA306D.7060302@easyconnect.fr>
 <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr>
 <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
 <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>
 <Pine.GSO.4.58.0312150917230.20029@comp.uark.edu>
 <Pine.OSF.4.58.0312151924330.392962@gwdu71.gwdg.de>

On Mon, 15 Dec 2003, Laurence Finston wrote:

> On Mon, 15 Dec 2003, Daniel H. Luecking wrote:
>
> >
> > How do you intend to distinguish.
> > 3d points from color? It would seem that one has to make the languages
> > (3DLDF vs MetaPost) pretty different in some respects.
> >
> I don't understand your question. Inside 3DLDF, Color and Point are both
> classes. When I implement the scanner and parser, a declaration like
> `color c(255, 255, 255);'

I only meant that valid MP code can contain color assignments, in
which rgb triples appear. If, as you said before, you want to
handle MP code properly, you have to either disallow certain constructs
or change the way they are entered. The above, for example, is not how
MP would declare a color variable.

> 3DLDF does not build on MP the way MP builds on MF.
> I'm only interested
> in simulating MF/MP's behavior in certain clearly defined areas.

And color isn't necessarily one of them. OK.

>
> Clearly, the 3DLDF language will have to differ from the Metapost
> language in some respects. For example, in 3DLDF, `point' will play the
> role of `pair' in Metapost. `pair' will be
> equivalent to `point' and have three coordinates. This is necessary, in
> order for 3DLDF to handle Metapost code properly.
> I like this, because it appeals to my sense of the absurd.

That's the sort of thing I meant. As to color, I just wondered if
you were going to try to make code like the following work.
  color X;
  X := (.5,.6,.3);
  path P; P := (0,0,0)..(1,1,2)..(0,1,1);
  draw P withcolor ((1,1,1)-X);

Triples could be parsed to mean colors where colors are needed and
points where points are needed, much like TeX allows skips to be
dimensions and dimensions to be numbers. Or one could use a different
syntax for entering and using colors.

-- 
Dan Luecking                           Dept. of Mathematical Sciences
luecking@uark.edu                      University of Arkansas
http://comp.uark.edu/~luecking/        Fayetteville, AR 72101

From - Tue Dec 16 13:02:06 2003
Return-Path: <lfinsto1@gwdg.de>
Received: from mailer.gwdg.de (mailer.gwdg.de [134.76.10.26])
          by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id hBGC22aW024570
          for <metafont@ens.fr>; Tue, 16 Dec 2003 13:02:04 +0100 (CET)
Received: from gwdu71.gwdg.de ([134.76.8.21])
	by mailer.gwdg.de with esmtp (Exim 4.20)
	id 1AWDtq-00032d-An
	for metafont@ens.fr; Tue, 16 Dec 2003 13:02:02 +0100
Received: from localhost by gwdu71.gwdg.de (8.11.1/1.1.29.3/16Jun03-0924AM)
	id hBGC21B0000425524; Tue, 16 Dec 2003 13:02:01 +0100 (MET)
X-Authentication-Warning: gwdu71.gwdg.de: lfinsto1 owned process doing -bs
Date: Tue, 16 Dec 2003 13:02:00 +0100 (MET)
From: Laurence Finston <lfinsto1@gwdg.de>
To: liste metafont <metafont@ens.fr>
Subject: Re: [metafont] 3DLDF 1.1.4 Release (fwd)
In-Reply-To: <Pine.GSO.4.58.0312151619260.19130@comp.uark.edu>
Message-ID: <Pine.OSF.4.58.0312161252070.424868@gwdu71.gwdg.de>
References: <3FDA306D.7060302@easyconnect.fr> <Pine.OSF.4.58.0312121949430.295182@gwdu71.gwdg.de>
 <3FDA306D.7060302@easyconnect.fr> <5.2.1.1.0.20031214132228.00b609e8@mail.uark.edu>
 <Pine.OSF.4.58.0312151206210.378825@gwdu71.gwdg.de>
 <Pine.GSO.4.58.0312150917230.20029@comp.uark.edu>
 <Pine.OSF.4.58.0312151924330.392962@gwdu71.gwdg.de>
 <Pine.GSO.4.58.0312151619260.19130@comp.uark.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Level: /
X-Spam-Report: Content analysis: 0.0 points, 6.0 required
X-Virus-Scanned: (clean) by exiscan+sophie

On Mon, 15 Dec 2003, Daniel H. Luecking wrote:

> On Mon, 15 Dec 2003, Laurence Finston wrote:
>
> > >
> > `color c(255, 255, 255);'
>
> The above, for example, is not how
> MP would declare a color variable.
>
Oops.

>
> That's the sort of thing I meant. As to color, I just wondered if
> you were going to try to make code like the following work.
>   color X;
>   X := (.5,.6,.3);
>   path P; P := (0,0,0)..(1,1,2)..(0,1,1);
>   draw P withcolor ((1,1,1)-X);
>

Yes. The parser (or a function called by it) will allocate memory for a
Color and store a pointer to it in a map with the string "X" as its key.
When the parser reads `X:=(.5, .6, .3);', it will look in the map for "X".
Then, it will call the function that represents the assignment operation.
Since C++ allows overloading of functions, the proper function can be
found at run-time. The same applies to Path.

Laurence Finston
3DLDF Maintainer
website: http://wwwuser.gwdg.de/~lfinsto1/LDF.html
email:   lfinsto1@gwdg.de

