ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [MP] labels of points on a circle
@ 2009-10-19 12:48 dalyoung
  2009-10-19 13:19 ` Boštjan Vesnicer
  0 siblings, 1 reply; 2+ messages in thread
From: dalyoung @ 2009-10-19 12:48 UTC (permalink / raw)
  To: ntg-context

Hi all,

To draw 9 points with labels, I used the following code.

\startbuffer[point2]
path p;
numeric i; i=1;
for j =0.5,1.3,2.5,3,4,4.8,6,7.2,7.9:
z[i] = dir(j*45) scaled 4cm;
i:= i+1;
endfor;
p := z1..z2..z3..z4..z5..z6..z7..z8..z9..cycle;
draw p;
drawpoints p;
drawpointlabels p;
\stopbuffer
\placefigure[middle][]{}{\processMPbuffer[point2]}

Then it draw everything well except writing labels inside the circle.  
How can I write the labels of the  points outside of the circle?

I'd like to draw 9 points randomly on a circle. Is there a nice way to  
do it?

Thank you.

Best regards,

Dalyoung 
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: [MP] labels of points on a circle
  2009-10-19 12:48 [MP] labels of points on a circle dalyoung
@ 2009-10-19 13:19 ` Boštjan Vesnicer
  0 siblings, 0 replies; 2+ messages in thread
From: Boštjan Vesnicer @ 2009-10-19 13:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Dalyoung,

You can try to adapt the following snippet:

numeric i;
pickup pencircle scaled 4pt;
for i = 1 upto 10:
	z[i] = dir(uniformdeviate 360);
	drawdot z[i] scaled 4cm;
	label(decimal(i), z[i] scaled 4.3cm);
endfor;

Best regards,
Bostjan


On Mon, Oct 19, 2009 at 2:48 PM, dalyoung <haksan@me.com> wrote:
> Hi all,
>
> To draw 9 points with labels, I used the following code.
>
> \startbuffer[point2]
> path p;
> numeric i; i=1;
> for j =0.5,1.3,2.5,3,4,4.8,6,7.2,7.9:
> z[i] = dir(j*45) scaled 4cm;
> i:= i+1;
> endfor;
> p := z1..z2..z3..z4..z5..z6..z7..z8..z9..cycle;
> draw p;
> drawpoints p;
> drawpointlabels p;
> \stopbuffer
> \placefigure[middle][]{}{\processMPbuffer[point2]}
>
> Then it draw everything well except writing labels inside the circle. How
> can I write the labels of the  points outside of the circle?
>
> I'd like to draw 9 points randomly on a circle. Is there a nice way to do
> it?
>
> Thank you.
>
> Best regards,
>
> Dalyoung___________________________________________________________________________________
> 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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-10-19 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-19 12:48 [MP] labels of points on a circle dalyoung
2009-10-19 13:19 ` Boštjan Vesnicer

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