ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to randomize points in a given area?
@ 2008-11-15  3:10 Yue Wang
  2008-11-15 13:57 ` Wolfgang Schuster
  2008-11-16 14:57 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Yue Wang @ 2008-11-15  3:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, Hans,

In your "metapost graphics" pdf document, I can find a card which
randomizes points in a path of Christmas tree, how to do that? thanks.

Yue Wang
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to randomize points in a given area?
  2008-11-15  3:10 How to randomize points in a given area? Yue Wang
@ 2008-11-15 13:57 ` Wolfgang Schuster
  2008-11-16 14:57 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2008-11-15 13:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 15.11.2008 um 04:10 schrieb Yue Wang:

> Hi, Hans,
>
> In your "metapost graphics" pdf document, I can find a card which
> randomizes points in a path of Christmas tree, how to do that? thanks.


You could try to make something with this example code.

\setupcolors[state=start]

\starttext

\startMPpage[offset=1cm]
for i=1 upto 5000:
     v := uniformdeviate(100) + 1 ;
     h := uniformdeviate(v) / 5 * normaldeviate ;
     l := uniformdeviate(5) ;
     draw ((-l,0)--(l,0)) rotated uniformdeviate(180) shifted (h,-v)  
withcolor transparent(1,.5,green) ;
endfor
\stopMPpage

\stoptext

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to randomize points in a given area?
  2008-11-15  3:10 How to randomize points in a given area? Yue Wang
  2008-11-15 13:57 ` Wolfgang Schuster
@ 2008-11-16 14:57 ` Hans Hagen
  2008-11-17  5:28   ` Yue Wang
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2008-11-16 14:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Yue Wang wrote:
> Hi, Hans,
> 
> In your "metapost graphics" pdf document, I can find a card which
> randomizes points in a path of Christmas tree, how to do that? thanks.

just use 'uniformdevisate' or metafun operators like 'ramdomized'


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to randomize points in a given area?
  2008-11-16 14:57 ` Hans Hagen
@ 2008-11-17  5:28   ` Yue Wang
  2008-11-17  8:30     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Yue Wang @ 2008-11-17  5:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi, Hans:

On Sun, Nov 16, 2008 at 10:57 PM, Hans Hagen <pragma@wxs.nl> wrote:
> Yue Wang wrote:
>> Hi, Hans,
>>
>> In your "metapost graphics" pdf document, I can find a card which
>> randomizes points in a path of Christmas tree, how to do that? thanks.
>
> just use 'uniformdevisate' or metafun operators like 'ramdomized'

How to ensure the point is in your christmas tree path?

>
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>

Yue Wang
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to randomize points in a given area?
  2008-11-17  5:28   ` Yue Wang
@ 2008-11-17  8:30     ` Hans Hagen
  2008-11-17 12:13       ` Yue Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2008-11-17  8:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Yue Wang wrote:
> Hi, Hans:
> 
> On Sun, Nov 16, 2008 at 10:57 PM, Hans Hagen <pragma@wxs.nl> wrote:
>> Yue Wang wrote:
>>> Hi, Hans,
>>>
>>> In your "metapost graphics" pdf document, I can find a card which
>>> randomizes points in a path of Christmas tree, how to do that? thanks.
>> just use 'uniformdevisate' or metafun operators like 'ramdomized'
> 
> How to ensure the point is in your christmas tree path?

if i remember right, by following the path of the tree

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to randomize points in a given area?
  2008-11-17  8:30     ` Hans Hagen
@ 2008-11-17 12:13       ` Yue Wang
  0 siblings, 0 replies; 6+ messages in thread
From: Yue Wang @ 2008-11-17 12:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Oh! Cool! Thank you, Hans, you really help!

On Mon, Nov 17, 2008 at 8:30 AM, Hans Hagen <pragma@wxs.nl> wrote:
> Yue Wang wrote:
>> Hi, Hans:
>>
>> On Sun, Nov 16, 2008 at 10:57 PM, Hans Hagen <pragma@wxs.nl> wrote:
>>> Yue Wang wrote:
>>>> Hi, Hans,
>>>>
>>>> In your "metapost graphics" pdf document, I can find a card which
>>>> randomizes points in a path of Christmas tree, how to do that? thanks.
>>> just use 'uniformdevisate' or metafun operators like 'ramdomized'
>>
>> How to ensure the point is in your christmas tree path?
>
> if i remember right, by following the path of the tree
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-11-17 12:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-15  3:10 How to randomize points in a given area? Yue Wang
2008-11-15 13:57 ` Wolfgang Schuster
2008-11-16 14:57 ` Hans Hagen
2008-11-17  5:28   ` Yue Wang
2008-11-17  8:30     ` Hans Hagen
2008-11-17 12:13       ` Yue Wang

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).