* Keeping it single valued
@ 2007-04-19 6:01 David Arnold
2007-04-19 7:09 ` Mikael Persson
0 siblings, 1 reply; 2+ messages in thread
From: David Arnold @ 2007-04-19 6:01 UTC (permalink / raw)
To: Context Mailing List List
All,
This example from the Metapost manual is beyond my expertise. The
second figure is sweet, just what I would want. Can anyone wax
philosophic for a bit and explain why the y-scaling keeps the second
function single valued?
starttext
\startbuffer[figure]
numeric scf, t[];
3.2scf=2.4in;
path fun;
fun:=(0,-1)..(1,.5){right}..(1.9,.2){right}..{curl .1}(3.2,2);
fun:=fun scaled scf;
draw fun;
\stopbuffer
\placefigure
[][fig:one]
{Caption.}
{\processMPbuffer[figure]}
\startbuffer[figure]
numeric scf, yscl, t[];
3.2scf=2.4in;
path fun;
yscl=.1; %keep the function single valued
fun:=(0,-1yscl)..(1,.5yscl){right}..(1.9,.2yscl){right}..{curl .1}
(3.2,2yscl);
fun:=fun yscaled (1/yscl);
fun:=fun scaled scf;
draw fun;
\stopbuffer
\placefigure
[][fig:one]
{Caption.}
{\processMPbuffer[figure]}
\stoptext
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Keeping it single valued
2007-04-19 6:01 Keeping it single valued David Arnold
@ 2007-04-19 7:09 ` Mikael Persson
0 siblings, 0 replies; 2+ messages in thread
From: Mikael Persson @ 2007-04-19 7:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Arnold,
this is no exact answer, but possibly the reason why:
First, have a look at:
\starttext
\startbuffer[figure]
numeric scf, t[];
3.2scf=2.4in;
path fun;
fun:=(0,-1)..(1,.5){right}..(1.9,.2){right}..{curl .1}(3.2,2);
fun:=fun scaled scf;
drawpath fun;
drawpoints fun;
\stopbuffer
\placefigure
[][fig:one]
{Caption.}
{\processMPbuffer[figure]}
\startbuffer[figure]
numeric scf, yscl, t[];
3.2scf=2.4in;
path fun;
yscl=.1; %keep the function single valued
fun:=(0,-1yscl)..(1,.5yscl){right}..(1.9,.2yscl){right}..{curl .1}
(3.2,2yscl);
fun:=fun scaled scf;
drawpath fun shifted (3cm,0cm);
drawpoints fun shifted (3cm,0cm);
fun:=fun yscaled (1/yscl);
drawpath fun shifted (-3cm,0cm);
drawpoints fun shifted (-3cm,0cm);
\stopbuffer
\placefigure
[][fig:one]
{Caption.}
{\processMPbuffer[figure]}
\stoptext
Let us focus on the first two points.
In the upper figure:
The horizontal distance between point 1 and 2 is less than the
vertical distance. If you want the path from 1 to 2 to be part of a
circle, where the "top" of the circle should be at point 2 (whis is so
because of the {right} option at point 2) this forces the "leftmost"
part of the circle to be in the path and also to be left of point 1.
This gives necessary a "multivalued" function
In the lower right figure:
Now the horizontal distance between point 1 and 2 is greater than the
vertical distance. Hence the "leftmost" part of the circle is not in
the path and the function gets single valued.
This is more or less it. I'm not 100% sure the path from 1 to 2 is
part of a circle, but the reason is probably the same.
With best regards, Micke P
On 4/19/07, David Arnold <dwarnold45@suddenlink.net> wrote:
> All,
>
> This example from the Metapost manual is beyond my expertise. The
> second figure is sweet, just what I would want. Can anyone wax
> philosophic for a bit and explain why the y-scaling keeps the second
> function single valued?
>
> starttext
>
> \startbuffer[figure]
> numeric scf, t[];
> 3.2scf=2.4in;
> path fun;
> fun:=(0,-1)..(1,.5){right}..(1.9,.2){right}..{curl .1}(3.2,2);
> fun:=fun scaled scf;
> draw fun;
> \stopbuffer
>
> \placefigure
> [][fig:one]
> {Caption.}
> {\processMPbuffer[figure]}
>
> \startbuffer[figure]
> numeric scf, yscl, t[];
> 3.2scf=2.4in;
> path fun;
> yscl=.1; %keep the function single valued
> fun:=(0,-1yscl)..(1,.5yscl){right}..(1.9,.2yscl){right}..{curl .1}
> (3.2,2yscl);
> fun:=fun yscaled (1/yscl);
> fun:=fun scaled scf;
> draw fun;
> \stopbuffer
>
> \placefigure
> [][fig:one]
> {Caption.}
> {\processMPbuffer[figure]}
>
> \stoptext
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-19 7:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-19 6:01 Keeping it single valued David Arnold
2007-04-19 7:09 ` Mikael Persson
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).