From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Examples of use of svg.el?
Date: Sat, 02 Apr 2022 03:21:20 +0200 [thread overview]
Message-ID: <87tubcxotr.fsf@web.de> (raw)
In-Reply-To: CADs++6hYOA9RCHwoj_epyhyPCh7VkckrYFNV5ExJ7R+iBQRgUA@mail.gmail.com
Eduardo Ochs <eduardoochs@gmail.com> writes:
> x0 = 3
> y0 = 2
> z = z(x,y) = (x-x0)^2 - (y-y0)^2 + 2
>
> How would you make Calc plot it for x in [x0-1,x0+1] and y in
> [y0-1,y0+1]? Also: how do we access the script that Calc sends to
> gnuplot?
> [...]
> I would _really_ love to make something similar for Calc. Any help
> would be greatly appreciated!
Calc is a cool interactive Calculator, but IMHO it's not so super useful
as programming language or for writing scripts, and it seems that's what
you want to do.
With my current Calc skills I would solve the above task like
' [x0-1 .. x0+1] RET ; interval
' [y0-1 .. y0+1] RET ; ditto
' (x-x0)^2 - (y-y0)^2 + 2 ; you could alternatively define a named function
3 s t x0 ; set x0 to 3
2 s t y0 ; ditto y0 to 2
M-3 = ; updates topmost 3 stack values with vars substituted
g F ; draw it
There are probably better ways to handle the constants x0 and y0. You
can undo the variable substitution with `undo' (surprise!).
g v and g V show communication stuff with gnuplot. g N to use more
interpolation points (the default is, dunno, 4 or so, you probably want
to change the default in your config: `calc-graph-default-resolution'
and `calc-graph-default-resolution-3d').
That's all I know. If you are already happy with Maxima, Calc will
probably not be a complete substitute.
Michael.
next prev parent reply other threads:[~2022-04-02 1:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 7:05 Examples of use of svg.el? Eduardo Ochs
2022-04-01 11:11 ` Tomas Hlavaty
2022-04-01 21:47 ` Michael Heerdegen
2022-04-02 0:12 ` Eduardo Ochs
2022-04-02 1:21 ` Michael Heerdegen [this message]
2022-04-02 3:56 ` Michael Heerdegen
2022-04-02 10:46 ` Eduardo Ochs
2022-04-03 4:58 ` Michael Heerdegen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tubcxotr.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).