From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17872 Path: main.gmane.org!not-for-mail From: "Laurence Finston" Newsgroups: gmane.comp.tex.context Subject: Re: [metapost] shading in meta[post/play] & PDF Date: Sat, 15 Jan 2005 22:04:56 +0100 Message-ID: <20050115210457.24F53127CC@ronja.ntg.nl> References: <41E8A740.7010703@email.si> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1105951979 872 80.91.229.6 (17 Jan 2005 08:52:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Jan 2005 08:52:59 +0000 (UTC) Cc: mailing list for ConTeXt users , metapost@tug.org Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 17 09:52:52 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CqSd2-00022B-00 for ; Mon, 17 Jan 2005 09:52:52 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50C0F12795; Mon, 17 Jan 2005 09:52:52 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 05633-01; Mon, 17 Jan 2005 09:52:51 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2ABE312799; Mon, 17 Jan 2005 09:50:55 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 91635127D2 for ; Sat, 15 Jan 2005 22:04:57 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21589-05-3 for ; Sat, 15 Jan 2005 22:04:57 +0100 (CET) Original-Received: from mailer.gwdg.de (unknown [134.76.10.26]) by ronja.ntg.nl (Postfix) with ESMTP id 24F53127CC for ; Sat, 15 Jan 2005 22:04:57 +0100 (CET) Original-Received: from mailbox.gwdg.de ([134.76.10.21] helo=gwdg.de) by mailer.gwdg.de with esmtp (Exim 4.42) id 1Cpv6O-0002wN-Np; Sat, 15 Jan 2005 22:04:56 +0100 X-Originating-IP: lfinsto1[134.76.139.103] In-Reply-To: <41E8A740.7010703@email.si> User-Agent: IMHO/0.98.3+G (Webmail for Roxen) Original-To: mojca.miklavec@guest.arnes.si X-Virus-Scanned: (clean) by exiscan+sophie X-Virus-Scanned: by amavisd-new at ntg.nl X-Mailman-Approved-At: Mon, 17 Jan 2005 09:50:53 +0100 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17872 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17872 Mojca Miklavec wrote: > There's a wonderful tutorial on drawing 3D graphics in PostScript on=20 > http://www.math.ubc.ca/~cass/graphics/manual/, specifically > http://www.math.ubc.ca/~cass/graphics/manual/code/doughnut.eps as an=20 > example. Thanks for the reference, it looks very interesting. >=20 > In metapost, "perfect" spheres can be drawn, like on=20 > http://www.gnu.org/software/3dldf/cdsmpls.html. But how can I add > col= our? The spheres in that example are really just circles. The "globe font" wa= s done using Metafont, which doesn't support color at all. The sphere grap= hic at the beginning of that file was done using MetaPost, so the circles cou= ld be drawn in color, but I know this isn't what you mean. =20 The glyphs from the globe font (which I plan to improve) could be colored= , e.g., by using the macros defined in the `colordvi.tex' file supplied wit= h `dvips'. Of course, a given glyph could only be printed or displayed in = a single color. GNU 3DLDF does not yet possess a `sphere' type, but I plan to add one in = the not-too-distant future. I also plan to add shading, but that is in the m= ore distant future. The shading methods I'm (vaguely) familiar with operate = on raster data and I haven't quite decided how to handle rasterization. I'm leaning toward using the PNG format rather than PostScript for this. I believe PostScript can be used for both vector and raster data, but my me= mory of the details is hazy. >=20 > The spheres drawn directly in PostScript as in the examples above still= =20 > have straight lines (well, I agree that with some mathematics it would=20 > be possible to draw them with proper splines as well). >=20 If you mean my spheres, that's an artefact of the PNG graphics. The PostScript versions look nicer. I believe that on commonly available dev= ices, curves are ultimately drawn as short straight-line segments, though. In= the code in that file, the circles have 64 points, and I thought the results = were good enough. Raising it to some value x such that x % 4 =3D=3D 0 and x >= 64 might improve them, I haven't tried it. 32 wasn't enough. Laurence Finston http://www.gnu.org/software/3dldf/LDF.html