Activity for Jim Hefferon

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    To have a fixed size part of a figure that uses size(..) you want to put that fixed size thing in a picture and add it to the current picture. See https://asymptote.sourceforge.io/FAQ/section4.html#fixedsize . So, if I understand what you want, can you add a fixed size picture and put the length-labeler below that? Michael pointed to a section that contains a description of truepoint, which I believe will get you the bottom of the fixed size picture.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you both. I did want a mapsto, exactly. I have a domain axis and a parallel codomain axis and I am mapping the one to the other. Having the start bars all the same distance from their originating points seemed natural. I can make a command that draws a circle at both ends and find intersections, with the line between the endpoints, and then puts in the arrow and the bar, but I thought that was the expected behavior of draw(..). John, I'll say that the behavior was a bit of a surprise, at least...

  • Jim Hefferon Jim Hefferon modified a comment on discussion Help

    Thanks Michael. I'm not a C++ person and I find that I have trouble making much of the code, but you look right to me. I appreciate your help. I put in an issue on GitHub.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thanks Michael. I'm not a C++ person and I find that I have trouble making much of the code, but you look right to me. I appreciate your help.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Yes. I'm expecting the bar to be connected to the line there. The same behavior happens if you use Margin or TrueMargin (I could not get Margins to work), which made me wonder if I just misunderstood something obvious about bars (it does not seem to have to do with shortening the path).

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    No, if I change the lines in the middle to say this. // Leaves a gap with the bar draw(diag, arrow=EndArrow(NoFill), bar=BeginBar, Margin(0.6pt)); then the figure is unchanged.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    In the code below there are two diagonal lines, each with a bar at the start and an arrow at the end. However, when I use the margin commands the bar is separated from the lines, whereas the arrow is not. I expected the bar to be at the end of the line. Bug? Or I expected wrong? // test.asy // Bar is separated from the line stem but arrow is not? settings.outformat="pdf"; dotfactor = 2; dot((0,0), red); dot((10,10), red); path diag = subpath((0,0)--(10,10),0.1,0.9); // works fine // draw(diag, arrow=EndArrow(NoFill),...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, In brief: I get this error message when I use settings.tex="lualatex"; but not when I use pdflatex. $ asy input_output Importing teach/calc_i/asy/texpreamble.asy Importing teach/calc_i/asy/jh.asy This is LuaHBTeX, Version 1.22.0 (TeX Live 2025) restricted system commands enabled. LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-08-13> lualatex: Not writing to .log (openout_any = p; no extended check). ! I can't write on file `.log'. Please type another transcript file name: !...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    As a remark, I've uploaded a version to CTAN. I expect they will install it as documentation/asy-overview.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thanks again, Charles, for the feedback. I have put v1.0 on my repo https://gitlab.com/jim.hefferon/asy_tut/-/tree/master/document?ref_type=heads Just to remark on the changes: unitsize I got from p 48 of the reference, import settings I guess I made up but I did not know this one module was different, multiline strings are not colored correctly in emacs (which of course is not a good reason to omit them), and the + was just a typo. In addition, I moved the common definitions file to an appendix...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thanks Charles. I appreciate the feedback. I'll look at those and make adjustments. Regards, Jim

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hi, I had an online conversation with someone who initially seemed interested in checking out Asy, but the length of the reference and even CS's tutorial discouraged them. So FWIW as my end of semester project I wrote a quick-look document using a few of figures from my Calculus slides. I though someone here might be interested in its existence. https://gitlab.com/jim.hefferon/asy_tut/-/tree/master/document?ref_type=heads No doubt there are errors. Of course, I'd be glad for any feedback. (BTW, next...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, I am unable to get the concrete fonts in my figures. I am trying to use the LaTeX package ccfonts . I have that package, as I tested with a small LaTeX .tex file. Here is my test .asy file. // test.asy texpreamble("\usepackage{ccfonts}"); import graph3; import solids; currentprojection = orthographic(5,2,1.5,up=Z); size3(5cm); draw(O--X+Y+Z); dot("$(0,0,1/2)$",(0,0,1/2),NE); It runs fine, but the (0,0,1/2) does not appear in the output test.pdf. If I comment out the texpreamble line then the...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you, John. I'm glad I didn't miss something obvious, as has happened to me before. Regards, Jim

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, I'm writing a book and there are a lot of illustrations (more than 2K), almost all in Asymptote. So first, thank you! In MetaPost I liked that the canonical way to proceed was to put many related graphics in a single file. I do the same in Asymptote, especially because I have so many figures, and of course there are often classes of related figures. I use a structure like this. picture pic; int picnum = 4; -- figure drawing in here -- shipout(format(OUTPUT_FN,picnum),pic,format="pdf"); I mean...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    It was just that simple. Thank you, John.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you, John. I will do that. Have a nice weekend.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    I have copied the vectorfield example from the manual. // test.asy import graph; size(100); pair a=(0,0); pair b=(2pi,2pi); path vector(pair z) {return (sin(z.x),cos(z.y));} add(vectorfield(vector,a,b)); The output does not have vectors, as shown in the manual, but instead dots. Am I missing something (probably)? I have a reasonably recent version. $ asy --version Asymptote version 2.79 [(C) 2004 Andy Hammerlindl, John C. Bowman, Tom Prince]

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you, John. I am obliged to you. Regards, Jim From: John Bowman jcbowman@users.sourceforge.net Sent: Wednesday, September 8, 2021 13:29 To: [asymptote:discussion] Subject: [asymptote:discussion] Error: /undefined in .setfillconstantalpha in 2.70 ⚠ External Sender ⚠ You need to use ghostscript version 9.52 or 9.53. Anything older won't work and version 9.54 is broken. Error: /undefined in .setfillconstantalpha in 2.70https://sourceforge.net/p/asymptote/discussion/409349/thread/6fd84befa5/?limit=25#59fd...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, With this test.asy, import settings; settings.outformat="pdf"; settings.render=0; unitsize(1pt); draw((0,0)--(1,1), red+opacity(0.7)); // draw((0,0)--(1,1), red); I get the GS failure Loading test from test.asy gs -q -dNOPAUSE -dBATCH -P -dALLOWPSTRANSPARENCY -sDEVICE=pdfwrite -dEPSCrop -dSubsetFonts=true -dEmbedAllFonts=true -dMaxSubsetPct=100 -dEncodeColorImages=true -dEncodeGrayImages=true -dCompatibilityLevel=1.4 -dAutoRotatePages=/None -g612x792 -dDEVICEWIDTHPOINTS=3 -dDEVICEHEIGHTPOINTS=3...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    OK, thank you, John. Regards, Jim

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    I am having trouble importing a module. It involves cd(one directory) followed by cd(another) and I'm wondering if it goes where I expect, namely cd(one directory/another). But I'm just not seeing how to debug. Below is test.asy. Inside jhnode.asy is an import node line (the top of that file is below). As is, the test file fails, saying that it cannot import node. But if I uncomment the first block and comment the second then the test file compiles. Further, because ncircle comes from node, and I...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you John. I'll do that. Hope you are well. Regards, Jim OK, so obviously corrupt, racist, and incompetent. And a Russian puppet. The only question is: are you in favor of those? From: John Bowman jcbowman@users.sourceforge.net Sent: Thursday, April 16, 2020 23:56 To: [asymptote:discussion] Subject: [asymptote:discussion] Advice on working with colors ⚠ External Sender ⚠ I should also point out that this example is merely a demonstration of how a simple 3D scene could be rendered using 2D vector...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    This is a much less technical issue than I see others asking here. I apologize if it is a bit silly but I am feeling stymied and I'd be very grateful for any advice or suggestions. I am having trouble working with colors in 3D. They all come out cartoonishly bright and I cannot darken them. Here is an example from the documentation, slightly modified. size(6cm,0); import bsp; real u=2.5; real v=1; currentprojection=oblique; path3 xz=plane((2u,0,0),(0,2v,0),(-u,-v,0)); path3 xy=rotate(90,Z)*rotate(90,Y)*xz;...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you; I will do that.

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, is there a standard idiom for seeding random numbers at random? I'm using random numbers to draw a scatter of points. I want to get a different scatter each time, so I want to seed the numbers. I see srand(), but it wants a fixed input. I'm used to something like seeding with the current time's thousandths of a second. But the time() functions seem to return strings. Is there a natural way to do this? (I looked through what I thought were the likely examples but didn't see anything.) Thank...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Thank you, John. I appreciate it. I was good and stuck on that.

  • Jim Hefferon Jim Hefferon modified a comment on discussion Help

    I'm trying to get 2D graphs to scale. I can get it to go for currentpicture but not for other pictures. Here is my demo file. As given, in the file scaletest.pdf the graph of h and f meet above x-10, at y=50. If I drop the comment from line 5, so it is using currentpicture, then the file scaletest00.pdf shows the graph of h and f meeting above x=10, but now at y=100. The second is what I would expect in both cases. I'd appreciate any help. Is it possible it is a bug? I looked for a report but didn't...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    I'm trying to get 2D graphs to scale. I can get it to go for currentpicture but not for other pictures. Here is my demo file. As given, in the file scaletest.pdff the graph of h and f meet above x-10, at y=50. If I drop the comment from line 5, so it is using currentpicture, then the file scaletest00.pdf shows the graph of h and f meeting above x=1, at y=100. The second is what I would expect in both cases. I'd appreciate any help. Is it possible it is a bug? I looked for a report but didn't find...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello, I'm having trouble getting Asymptote to draw a figure according to what I...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Ah, I see your point. Stupid of me. Thank you again. I owe you one. Jim

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    James, Thank you for the help. I see this. Based on the output of the code below,...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    How can I find out where in the output graphic a particular input point was placed?...

  • Jim Hefferon Jim Hefferon posted a comment on discussion Help

    Hello. I apologize if this is a misunderstanding of mine. Using three.asy, I want...

1
MongoDB Logo MongoDB