Saturday, June 24, 2023

Import animated GIF into a Mathematica Notebook

Here's the animated image of a black hole I wanted to Import:

https://qph.cf2.quoracdn.net/main-qimg-7a4350884a5333a141e4faa234f45861

ChatGTP-3.5

To copy an animated GIF and paste it into a Mathematica notebook, you can follow these steps:

1. Find the animated GIF you want to use and open it in a web browser or an image viewer.

2. Right-click on the GIF and select "Copy" or "Copy Image" from the context menu. Alternatively, you can also use keyboard shortcuts like Ctrl+C (Windows) or Command+C (Mac) to copy the image.

3. Open your Mathematica notebook and navigate to the desired location where you want to paste the animated GIF.

4. Right-click in the notebook and select "Paste" or use the keyboard shortcuts Ctrl+V (Windows) or Command+V (Mac) to paste the image.

5. By default, Mathematica treats pasted images as static. However, you can utilize the `Import` function to import the GIF file and display it as an animation.

6. Place the cursor immediately after the pasted image, and enter the following code on a new line:

Import["clipboard", "Animation"]

7. Select the code you just entered and evaluate it by pressing Shift+Enter (Windows) or Shift+Return (Mac) or by clicking the "Evaluate" button in the toolbar.

Mathematica will now import the image from the clipboard as an animation and display it in the notebook. You can resize or reposition the animation by manipulating the cell containing the code and the imported image.

Note: If the image doesn't animate after evaluating the code, it's possible that the GIF is not recognized as an animation. In such cases, you might need to save the GIF as a separate file on your computer and use the file path in the `Import` function instead of `"clipboard"`. For example:

Import["C:/path/to/your/animated.gif", "Animation"]

Make sure to replace `"C:/path/to/your/animated.gif"` with the actual file path of your saved GIF.

Wednesday, April 26, 2023

Mathematica Bibliography

This list includes my favorite Mathematica books as well as a few others on good coding practices and algorithms. There is also my article on the Wolfram Language syntax using Prefx (@) and Postfix-Function (//f [ #, params]&) syntax that I use. (Older list, annotated)

Abell, M. L. (2017). Mathematica by Example. Waltham, MA, Elsevier Inc.
Abell, M. L. and J. P. Braselton (2023). Differential Equations with Mathematica. London, United Kingdom ; San Diego, CA, United States, Academic Press is an imprint of Elsevier.
Abell, M. L., J. P. Braselton and J. A. Rafter (1999). Statistics with Mathematica. San Diego, Academic Press.
Bahder, T. B. (1995). Mathematica for scientists and engineers. Reading, Mass., Addison-Wesley Pub. Co.
Carlson, K. W. (2007) "A New Mathematica Programming Style." Wolfram Technology Conference.
Cheung, C. K. (2009). Getting Started with Mathematica. Hoboken, NJ, J. Wiley.
Crandall, R. E. (1991). Mathematica for the Sciences. Redwood City, Calif., Addison-Wesley, Advanced Book Program.
Crandall, R. E. (1994). Projects in Scientific Computation. Santa Clara, Calif., TELOS.
Crandall, R. E. (1996). Advanced Scientific Computation. Santa Clara CA, Springer-Verlag/TELOS.
Crandall, R. E. (1996). Topics in Advanced Scientific Computation. New York, N.Y., Springer-Telos.
Don, E. (2019). Mathematica. New York, McGraw-Hill.
Foxall, J. D. (2003). Practical Standards for Microsoft Visual Basic .NET. Redmond, Wash., Microsoft Press.
Friedl, J. E. F. (2006). Mastering regular expressions. Sebastapol, CA, O'Reilly.
Gray, J. W. (1998). Mastering Mathematica: Programming Methods and Applications. San Diego, Academic Press.
Jacob, C. (2001). Illustrating Evolutionary Computation with Mathematica. San Francisco, Morgan Kaufmann Pub.
Maeder, R. (1994). The Mathematica Programmer. Boston, AP Professional.
Maeder, R. (1996). The Mathematica Programmer II. San Diego, Calif., Academic Press.
Maeder, R. (1997). Programming in Mathematica. Reading, Mass., Addision Wesley Pub.
Maeder, R. (2000). Computer Science with Mathematica : Theory and Practice for Science, Mathematics, and Engineering. Cambridge, U.K. ; New York, Cambridge University Press.
Mangano, S. (2010). Mathematica Cookbook. Sebastopol, CA, O'Reilly.
McConnell, S. (2004). Code Complete. Redmond, Wash., Microsoft Press.
McDowell, G. L. v. (2016). Cracking the Coding Interview : 189 Programming Questions and Solutions. Palo Alto, CA, CareerCup, LLC.
Roughgarden, T. (2017). Algorithms Illuminated : Part 1, The Basics. San Francisco, CA, Soundlikeyourself Publishing LLC.
Roughgarden, T. (2019). Algorithms Illuminated. : Part 3: Greedy Algorithms. San Francisco, CA, Soundlikeyourself Publishing, LLC.
Ruskeepää, H. (2009). Mathematica Navigator : Mathematics, Statistics, and Graphics. Amsterdam ; Boston, Elsevier/Academic Press.
Tam, P. (1997). A Physicist's Guide to Mathematica. San Diego, Academic Press.
Torrence, B. F. and E. A. Torrence (2019). The Student's Introduction to Mathematica and the Wolfram Language. Cambridge, United Kingdom ; New York, NY, Cambridge University Press.
Trott, M. (2004). The Mathematica Guidebook for Graphics. New York, Springer.
Trott, M. (2004). The Mathematica GuideBook for Programming. New York, NY, Springer New York : Imprint: Springer.
Trott, M. and SpringerLink (2006). The Mathematica GuideBook for Symbolics. Mathematics and Statisics. New York, NY, Springer Science+Business Media, Inc
Springer New York.
Trott, M. P. D. and SpringerLink (2006). The Mathematica Guidebook for Numerics. Mathematics and Statistics. New York, NY, Springer
Springer New York.
Wagner, D. B. (1996). Power programming with Mathematica : the Kernel. New York, McGraw-Hill.
Wagon, S. (2010). Mathematica in Action: Problem Solving through Visualization and Computation. New York, Springer.
Wellin, P. R., R. J. Gaylord, S. N. Kamin and R. J. Gaylord (2005). An Introduction to Programming with Mathematica. Cambridge, England ; New York, Cambridge University Press.
Zimmerman, R. L. and F. I. Olness (2002). Mathematica for Physics. San Francisco, Addison Wesley.