ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: shading in metapost
Date: Thu, 24 Jan 2008 04:03:27 -0400 (AST)	[thread overview]
Message-ID: <alpine.DEB.0.9999.0801240358570.19128@nqv-yncgbc> (raw)
In-Reply-To: <E0EF1C54-F1A0-4D97-A7CB-17D619E70BCC@uni-bonn.de>

Hi Thomas,

On Thu, 24 Jan 2008, Thomas A. Schmitz wrote:

> On Jan 24, 2008, at 1:28 AM, Mojca Miklavec wrote:
>>
>> In theory possible, but in practice not implemented in metafun. But
>> see
>>    http://www.fauskes.net/media/pgf/pgfmanualCVS2008-01-23.pdf
>> It might satisfy your needs. (Impressive!)
>>
>> Mojca
>
> Thanks, Mojca, that's what I suspected. For the time being, I prefer
> metafun just because I know a little bit about it (and almost nothing
> about tikz).

TikZ has a nice interface. The only drawback right now is the speed. 
Hopefully sometime in the near future, some of the backend of tikz will be 
written in lua and mplib, which will make things much faster.

> I have solved the problem at hand by drawing ten
> instances of a very transparent black circle on top of each other and
> increasing the scale of the pencircle slightly at every run. Which
> leads me to one last question: I wanted to be clever and do it in a
> for-loop like this:
>
>  for i=1 upto 10:
>  	pickup pencircle scaled (i*0.5) pt ;
>  	draw fullcircle scaled 5mm withcolor transparent (1,0.04,black) ;
>  endfor ;
>
> Is this because the expression "pencircle scaled" expects a "numeric
> primary" as argument? And is there any way around this?

scaled expects a dimension. (i*0.5)pt is not a dimension. You need to 
either write (i*0.5pt) or ((i*0.5)*1pt). The extra parenthesis are needed 
to keep the metapost parser happy.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-01-24  8:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-16 19:07 Thomas A. Schmitz
2008-01-16 22:22 ` John Luciani
2008-01-24  8:15   ` Thomas A. Schmitz
2008-01-24  8:03     ` Aditya Mahajan [this message]
2008-01-24  9:26       ` Thomas A. Schmitz
2008-01-24  9:59     ` Hans Hagen
2008-01-24  0:28 ` Mojca Miklavec

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=alpine.DEB.0.9999.0801240358570.19128@nqv-yncgbc \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /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 NNTP newsgroup(s).