ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jairo A. del Rio" <jairoadelrio6@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fuzzy lines
Date: Tue, 11 May 2021 07:56:37 -0500	[thread overview]
Message-ID: <CAKyqqaZbh9rKkQa6kCyr16CXJ1vZu___jW=jfJ-YUkpQPYjk8A@mail.gmail.com> (raw)
In-Reply-To: <CAHy-LL9aATfUgxQT=URy6YhJ3dZe-eYWFSysaWpDXHMd03_KUA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2769 bytes --]

For simple pens, you may define your own (section 9.7 of MetaPost manual).
For complicated strokes, something along these lines could be useful as a
starting point (I'm not taking cyclic paths in consideration, btw). I did
something similar with duck footprints some weeks ago:

%Sorry for the ugly code...

\starttext

\startMPpage
%Unit size

numeric u; u := 1mm;

%In a picture you are able to include everything, kinda

picture Pluma;

Pluma := image(

for i = 1 upto 5:

for j = 1 upto 5:

draw (i,j) randomized 1;

endfor

endfor

);


%Simple curve

path Camino;

Camino := origin for i = 1 upto 30: .. (u*i, u*sind (12i mod 360)) endfor;


%Strokes

for i = 0 step 1/2 until length Camino:

draw Pluma rotated (90 + angle direction i of Camino)

shifted point i of Camino;

endfor

\stopMPpage

\stoptext


Not sure if that's what you need...

Regards,


Jairo

El mar, 11 de may. de 2021 a la(s) 06:31, Mikael Sundqvist (mickep@gmail.com)
escribió:

> Hi!
>
> Not really what you ask for, perhaps, but this could be interesting
> for you: https://tex.stackexchange.com/q/39296/52406
>
> /Mikael
>
> On Tue, May 11, 2021 at 12:58 PM Henning Hraban Ramm <texml@fiee.net>
> wrote:
> >
> > Hi MetaFans,
> >
> > is it possible to get lines with Metapost that look like they were drawn
> with a pencil or brush?
> >
> > Some vector graphics apps (in my case: Affinity Designer) can use such
> naturally looking brushes for vector graphics (and I don’t know how they do
> it), but I’d like to automate/parametrize some designs, and that would
> finally be a reason to learn Metapost...
> >
> > Hraban
> >
> ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> >
> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 5858 bytes --]

[-- Attachment #2: 163.pdf --]
[-- Type: application/pdf, Size: 25029 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2021-05-11 12:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 10:58 Henning Hraban Ramm
2021-05-11 11:30 ` Mikael Sundqvist
2021-05-11 12:33   ` Henning Hraban Ramm
2021-05-11 12:56   ` Jairo A. del Rio [this message]
2021-05-11 16:02     ` Aditya Mahajan
2021-05-12 18:07       ` Henning Hraban Ramm
2021-05-13 13:08       ` Henning Hraban Ramm
2021-05-13 16:36         ` Aditya Mahajan
2021-05-13 16:55           ` Henning Hraban Ramm
2021-05-13 17:17             ` Aditya Mahajan
2021-05-13 18:02               ` Henning Hraban Ramm
2021-05-13 18:26                 ` Thomas A. Schmitz
2021-05-13 19:42                   ` Henning Hraban Ramm
2021-05-14 15:08                     ` Thomas A. Schmitz
2021-05-13 22:39                 ` Aditya Mahajan
2021-05-14  9:43                   ` Hans Hagen
2021-05-14 20:33                   ` Henning Hraban Ramm
2021-09-03 16:04                 ` Henning Hraban Ramm via ntg-context
2022-01-21 18:00                   ` Iterating over MP paths (was: Fuzzy lines) Henning Hraban Ramm via ntg-context
2021-05-14 10:05           ` Fuzzy lines Hans Hagen
2021-05-12 17:55     ` Henning Hraban Ramm
     [not found]       ` <CAKyqqaaosis=BjOD_mArY5VM+bzcj-ar4uMtnt8SRJ2WLL9ykw@mail.gmail.com>
2021-05-12 21:21         ` Fwd: " Jairo A. del Rio
2021-05-13 13:23           ` Henning Hraban Ramm

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='CAKyqqaZbh9rKkQa6kCyr16CXJ1vZu___jW=jfJ-YUkpQPYjk8A@mail.gmail.com' \
    --to=jairoadelrio6@gmail.com \
    --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).