ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan Braslau <braslau.list@comcast.net>
To: "Mikael P. Sundqvist" <mickep@gmail.com>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Implicit plots/level curves possible?
Date: Sun, 7 Oct 2018 11:14:01 -0600	[thread overview]
Message-ID: <20181007111401.64504e5f@comcast.net> (raw)
In-Reply-To: <CAHy-LL-SzqzJ=N8LyS06iYuha0fT3umQnfJQBsxq6SQj_ddR3w@mail.gmail.com>

On Sun, 7 Oct 2018 17:25:35 +0200
"Mikael P. Sundqvist" <mickep@gmail.com> wrote:

> ContourPlot[2 x^5 + x y + y^5 == 0, {x, 0, 2}, {y, -2, 1/2}]

Brut force:

\startTEXpage
\startMPcode {doublefun}
pen savedpen ; savedpen := currentpen ;
pickup pencircle scaled .01 ;
path p ;
p := for i=0 upto 1000 :
       for j=0 upto 1000 :
         hide(x := 2i/1000 ; y := 2.5j/1000 - 2 ;)
         if abs(2*(x**5)+x*y+y**5) < .002i/1000 : (x,y) .. fi
       endfor
     endfor cycle ;
draw subpath (0,length p - 1) of p ;
setbounds currentpicture to (0,-2)--(2,-2)--(2,.5)--(0,.5)--cycle ;
currentpicture := currentpicture xsized 5cm ;
pickup savedpen ;

picture pic ; pic := currentpicture ;
drawarrow llcorner pic--lrcorner pic ;
drawarrow llcorner pic--ulcorner pic ;
label.rt ("$x$", lrcorner pic) ;
label.top("$y$", ulcorner pic) ;
for x=0 step .5 until 2 :
    label.bot(decimal x,(x/2)[llcorner pic,lrcorner pic]) ;
endfor
for y=0 step .5 until 2.5 :
    label.lft(decimal (y-2),(y/2.5)[llcorner pic,ulcorner pic]) ;
endfor
\stopMPcode
\stopTEXpage


Alan
___________________________________________________________________________________
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:[~2018-10-07 17:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-07 15:25 Mikael P. Sundqvist
2018-10-07 15:35 ` luigi scarso
2018-10-07 17:14 ` Alan Braslau [this message]
2018-10-07 18:02   ` Mikael P. Sundqvist
2018-10-07 18:03   ` Hans Hagen
2018-10-08 20:00     ` Aditya Mahajan
2018-10-08 20:20       ` Alan Braslau
2018-10-08 21:25         ` Aditya Mahajan
2018-10-08 21:53           ` Alan Braslau
2018-10-08 21:56           ` Aditya Mahajan
2018-10-09 22:23             ` Alan Braslau
2018-10-11 13:55               ` Aditya Mahajan
2018-10-08 22:03           ` Hans Hagen
2018-10-09 11:12             ` Mikael P. Sundqvist

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=20181007111401.64504e5f@comcast.net \
    --to=braslau.list@comcast.net \
    --cc=mickep@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).