APEXCalculus / APEXCalculusPTX

In-progress conversion of APEX Calculus to PreTeXt
6 stars 20 forks source link

SagePlot graphs #290

Closed sean-fitzpatrick closed 5 months ago

sean-fitzpatrick commented 6 months ago

Right now, there are three images generated using SagePlot in the entire APEX textbook: these are the three examples of "computer-generated" graphs given in the three curve sketching examples in Chapter 3.

If I recall correctly, @Alex-Jordan added these to replace older Mathematica plots, with the rationale (I think) that it is better if our open source book uses open source software. And it is nice to have the Sage code to geneate the graphs built right into our source.

I also know that we can use GitHub codespaces to build. But it's also nice to be able to build locally. Right now, those three Sage graphs are the only thing preventing someone from building APEX on Windows without having to install the Windows Subsystem for Linux or a Linux VM. Sage no longer provides a Windows build.

Would it make sense to generate these images once and make them 'assets' rather than 'generated assets', perhaps with a comment in the source that includes the code used to create them? (Or replace them with something else?) It would save a step in the build process on any platform, and allow for a native Windows build. Then @APEXCalculus could build on his own machine.

Alex-Jordan commented 6 months ago

No objections here. I'm not certain of the details but you can commit generated assets. So you might be able to leave the code alone and do that. I'm pretty sure like the sample article has committed generated assets.

sean-fitzpatrick commented 6 months ago

That could work. I don't think there's a way to tell the CLI to skip a particular class of generated assets, but right now if you build on Windows this just means a 5 minute delay while the CLI extracts the Sage code and then fails to build it.

APEXCalculus commented 6 months ago

Mostly no objections, but I do have a question/suggestion.

In the original text, these three images were generated with Tikz. In each example, there were three images generated at the end where the progression was "connect the dots with lines, then add the right concavity to these line segments, then we let the computer just draw it." When did the last graphic get replaced by Sage? I don't recall that happening. It actually seems a bit out-of-place. All throughout the text we let "the computer" do the graphing, but in these three examples, we use "a different computer." I suggest that we just use tikz code.

At the end of the section we show how good CASs use adaptive methods to plot well (see link below). I imagine these two graphs are generated assets (or, at least, the Mathematica one is.) That makes sense to me. https://opentext.uleth.ca/apex-calculus/sec_sketch.html#p-3299

On Wed, Mar 27, 2024 at 11:01 AM Alex Jordan @.***> wrote:

No objections here. I'm not certain of the details but you can commit generated assets. So you might be able to leave the code alone and do that. I'm pretty sure like the sample article has committed generated assets.

— Reply to this email directly, view it on GitHub https://github.com/APEXCalculus/APEXCalculusPTX/issues/290#issuecomment-2022998790, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT5OFZKIA2EM374JOSFIXTY2LNM5AVCNFSM6AAAAABFLBKOGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSHE4TQNZZGA . You are receiving this because you were mentioned.Message ID: @.***>

sean-fitzpatrick commented 6 months ago

You're right: all three used to be TikZ images. Maybe it's because the images in (b) and (c) are so similar in each case?

I would be all right with going back to using TikZ for all three.

APEXCalculus commented 6 months ago

Going back would be my preference for a variety of reasons. One advantage of images #2 and #3 looking similar is that it highlights the point that simple incr/decr & concavity info gets you a long ways toward the right answer.

Long ago there was the idea of replacing all three with nicely-made hand-drawn images. I played around with it for a bit but never made anything I liked well enough to put in the book.

On Wed, Mar 27, 2024 at 1:47 PM Sean Fitzpatrick @.***> wrote:

You're right: all three used to be TikZ images. Maybe it's because the images in (b) and (c) are so similar in each case?

I would be all right with going back to using TikZ for all three.

— Reply to this email directly, view it on GitHub https://github.com/APEXCalculus/APEXCalculusPTX/issues/290#issuecomment-2023413117, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT5OFYJPZG6UQXE5KFCQOLY2MA3VAVCNFSM6AAAAABFLBKOGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTGQYTGMJRG4 . You are receiving this because you were mentioned.Message ID: @.***>

sean-fitzpatrick commented 6 months ago

OK, I will make those changes.