MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • You might recall this image being shared on social media some time ago.

    Source: http://cvcl.mit.edu/hybrid_gallery/monroe_einstein.html

    Look closely and you see Albert Einstein. However, if you move further away (or make the image smaller), you see Marilyn Monroe.

    To create the image, the high spatial frequency data from an image of Albert Einstein was added to the low spatial frequency data from an image of Marilyn Monroe. This approach was pioneered by Oliva et al. (2006) and is influenced by the multiscale processing of human vision.

    • When we view objects near us, we see fine detail (that is, higher spatial frequencies dominate).

    • However, when we view objects at a distance, the broad outline has greater influence (that is, lower spatial frequencies dominate).

    I thought I'd try to create a similar image in Maple (get the complete application here).

    Here's an overview of the approach (as outlined in Oliva et al., 2006). I used different source images of Einstein and Monroe.

    Let's start by loading some packages and defining a few procedures.

    restart:
    with(ImageTools):
    with(SignalProcessing):
    
    fft_shift := proc(M)
       local nRows, nCols, quad_1, quad_2, quad_3, quad_4, cRows, cCols;
       nRows, nCols := LinearAlgebra:-Dimensions(M):
       cRows, cCols := ceil(nRows/2), ceil(nCols/2):
       quad_1 := M[1..cRows,      1..cCols]:
       quad_2 := M[1..cRows,      cCols + 1..-1]:  
       quad_3 := M[cRows + 1..-1, cCols + 1..-1]:
       quad_4 := M[cRows + 1..-1, 1..cCols]:
       return <<quad_3, quad_2 |quad_4, quad_1>>:
    end proc:
    
    PowerSpectrum2D := proc(M)
       return sqrt~(abs~(M))
    end proc:
    
    gaussian_filter := (a, b, sigma) -> Matrix(2 * a, 2 * b, (i, j) -> evalf(exp(-((i - a)^2 + (j - b)^2) / (2 * sigma^2))), datatype = float[8]):

    fft_shift() swaps quadrants of a 2D Fourier transform around so that the zero frequency components are in the center.

    PowerSpectrum2D() returns the spectra of a 2D Fourier transform

    gaussian_filter() will be used to apply a high or low-pass filter in the frequency domain (a and b are the number of rows and columns in the 2D Fourier transform, and sigma is the cut-off frequency.

    Now let's import and display the original Einstein and Monroe images (both are the same size).

    einstein_img := Read("einstein.png")[..,..,1]:
    Embed(einstein_img)

    marilyn_img  := Read("monroe.png")[..,..,1]:
    Embed(monroe_img)

    Let's convert both images to the spatial frequency domain (not many people know that SignalProcessing:-FFT can calculate the Fourier transform of matrices).

    einstein_fourier := fft_shift(FFT(einstein_img)):
    monroe_fourier   := fft_shift(FFT(monroe_img)):

    Visualizing the power spectra of the unfiltered and filtered images isn't necessary, but helps illustrate what we're doing in the frequency domain.

    First the spectra of the Einstein image. Lower frequency data is near the center, while higher frequency data is further away from the center.

    Embed(Create(PowerSpectrum2D(einstein_fourier)))

    Now the spectra of the Monroe image.

    Embed(Create(PowerSpectrum2D(monroe_fourier)))

    Now we need to filter the frequency content of both images.

    First, define the cutoff frequencies for the high and low pass Gaussian filters.

    sigma_einstein := 25:
    sigma_monroe   := 10:

    In the frequency domain, apply a high pass filter to the Einstein image, and a low pass filter to the Monroe image.

    nRows, nCols := LinearAlgebra:-Dimension(einstein_img):
    
    einstein_fourier_high_pass := einstein_fourier *~ (1 -~ gaussian_filter(nRows/2, nCols/2, sigma_einstein)):
    monroe_fourier_low_pass    := monroe_fourier   *~ gaussian_filter(nRows/2, nCols/2, sigma_monroe):

    Here's the spectra of the Einstein and Monroe images after the filtering (compare these to the pre-filtered spectra above).

    Embed(Create(PowerSpectrum2D(einstein_fourier_high_pass)))

    Embed(Create(PowerSpectrum2D(monroe_fourier_low_pass)))

    Before combining both images in the Fourier domain, let's look the individual filtered images.

    einstein_high_pass_img := Re~(InverseFFT(fft_shift(einstein_fourier_high_pass))):
    monroe_low_pass_img    := Re~(InverseFFT(fft_shift(monroe_fourier_low_pass))):

    We're left with sharp detail in the Einstein image.

    Embed(FitIntensity(Create(einstein_high_pass_img)))

    But the Monroe image is blurry, with only lower spatial frequency data.

    Embed(FitIntensity(Create(monroe_low_pass_img)))

    For the final image, we're simply going to add the Fourier transforms of both filtered images, and invert to the spatial domain.

    hybrid_image := Create(Re~(InverseFFT(fft_shift(monroe_fourier_low_pass + einstein_fourier_high_pass)))):
    Embed(hybrid_image)

    So that's our final image, and has a similar property to the hybrid image at the top of this post.

    • Move close to the computer monitor and you see Albert Einstein.
    • Move to the other side of the room, and Marilyn Monroe swims into vision (if you're myopic, just take off your glasses and don't move back as much).

    To simulate this, here, I've successively reduced the size of the hybrid image

    And just because I can, here's a hybrid image of a cat and a dog, generated by the same worksheet.

    Set of vector mechanics exercises in the plane and space using the result technique in line (combining the key ALT + ENTER) also the unit package using the law of the triangle. It is observed that the solution is totally optimal. I leave your constructive criticism to the community's criteria. I hope that someone will raise an alternative solution using the minimum number of lines but that the students will learn. In spanish.

    Ejercicios_de_Vectores_Fuerza_y_Proyecciones_2D_y_3D.mw

    Lenin Araujo Castillo

    Ambassador of Maple

    Important use of the embedded components called Shortcut applied to vector mechanics exercises for engineering students. This makes each solution of each problem open independently and thus this way to explain in class. To use this worksheet, first unzip all the files in a single folder. In spanish

    Equilibrium_with_Shortcut.zip

    Lenin Araujo Castillo

    Ambassador of Maple

    If one looks in the profile of Rouben Rostamian , then one sees that any search in his Posts, Questions, Answers, and Replies is linked with MaplePrimes only. I informed  MaplePrimes staff about that disturbance without any effect. Using the opportunity, I'd like to pay attention of MaplePrimes users to many clones in the forum. This is a problem for ages: clones vote up themselves and impose one's opinion on  others. Several years ago some clones were deleted. It would be nice to continue that process.

    I have recently visited the Queen's House at Greenwich  (see wiki),  an  important building in British architectural history (17th century).
    I was impressed by the Great Hall Floor, whose central geometric decoration seems to be generated by a Maple program :-)

    Here is my code for this. I hope you will like it.

    restart;
    with(plots): with(plottools):
    n:=32: m:=3:#    n:=64: m:=7:
    
    a[0], b[0] := exp(-Pi*I/n), exp(Pi*I/n):
    c[0]:=b[0]+(a[0]-b[0])/sqrt(2)*exp(I*Pi/4):  
    for k to m+1 do  
      c[k]:=a[k-1]+b[k-1]-c[k-1];
      b[k]:=c[k]*(1+exp(2*Pi*I/n))-b[k-1];
      a[k]:=conjugate(b[k])  od:
    b[-1]:=c[0]*(1+exp(2*Pi*I/n))-b[0]:
    a[-1]:=conjugate(b[-1]):
    c[-1]:=a[-1]+b[-1]-c[0]:
    seq( map[inplace](evalf@[Re,Im], w), w=[a,b,c] ):
    Q:=polygonplot([seq([a[k],c[k],b[k],c[k+1]],k=0..m-1), [c[m],a[m],b[m]], [a[-1],b[-1],c[0]]]):
    display(seq(rotate(Q, 2*k*Pi/n, [0,0]),k=0..n-1), disk([0,0],c[m][1]/3), axes=none, size=[800,800], color=black);
    

    Avatar images are displayed with fixed size. When scaling the font, the title is offended by the avatar image. Please change this behaviour.

    In this app you can visualize the location of the points in the different quadrants, also calculate the distance between two points. Finally the calculation of the coordinates of the midpoint. With these applications can be combined to study different cases between distance between two points and midpoint. Generated in Maple for students of secondary education and pre-calculation. In Spanish

    Distance_between_two_points_and_midpoint.mw

    Lenin Araujo Castillo

    Ambassador of Maple

     

    Hello,

    At the moment there is no support on GitHub for language recognition and syntax highlighting for Maple. I think better support for Maple on GitHub would be a good thing:

    1. It makes Maple more recognizable, for example in language searches such as this one for one of its competitors.
       
    2. The list of currently supported languages is long and even contains many obscure entries. Maple is not obscure and deserves to be there.

    So, why am I posting this here, as it concerns GitHub more than Maple? The reason is that adding support for new languages is often done by GitHub users themselves, using the Linguist library mentioned on this help page. The process does not seem very difficult to me, but it requires a few careful steps.

    Referring to those steps:

    1. I think it would be nice to add support for the extensions , and .
       
    2. Perhaps this project by @Daniel Skoog could be used for syntax highlighting? However, currently it does not have a license.
       
    3. Does anybody know of a body of Maple source code that is representative of the modern Maple language as a whole? Probably it should be available under a permissive open source license such as MIT or BSD. (I am not sure whether GPLed work would qualify.)
       
    4. I know of a few Maple projects by others that are maintained on GitHub, such as the ParametricMatrixTools package and some packages by Daniel Skoog. If there are other Maple projects being maintained on GitHub, it would be good to know about them in the comments.

    So, in summary, could you perhaps help me with the above Steps 2, 3 and 5 or, if you prefer, could you take care of them yourself and open a pull request, so Maple on GitHub can literally get the recognition it deserves?

    My best wishes,

    Sebastiaan Janssens.

     

    We produce only one rotation of the cube by the angle Pi/2, and then repeat it at the following points, changing the colors of the faces in turn. And so the illusion is created that the cube is rolling along a straight line without slipping.
    (Just a picture without any sense.) cube_without_slipping.mw

    Hi Primes Users,

    We’re back with another tech support challenge that we wanted to share with you!

    A customer had been having issues launching Maplets using the standard double-clicking method. This is a known issue that rarely occurs, but is being addressed for a future release. In the meantime, we were able to provide this person with a command-prompt-based way of opening the Maplet, and we thought it would be great to share in case you run into the same kind of problem.

    After suggesting a few workarounds, our Team Lead was able to offer a command-prompt based way of solving the problem. Since command prompts are the target of batch scripts, which we had already used as a workaround for another issue, we just needed a way of programmatically creating scripts based on the command prompt code for each file.

    Using various commands from the FileTools package (including a technique suggested by our Team Lead), we were able to put together code that takes all files in a particular folder (namely, a folder named “Maplets” on the Desktop), and creates a new batch script from a template that is based on the command prompt code (provided that the template is saved in the same Maplets folder under the file name “Maplet script”):

    restart; with(FileTools): username := kernelopts(username):
    
    directory := cat("C:\\Users\\", username, "\\Desktop\\Maplets"):
    
    dir := ListDirectory(directory): dir := Basename~(dir):
    
    main := cat(directory, "\\Maplet script.txt"): body := Import(main):
    
    
    n := numelems(dir):
    
    for i to n do
    
    script := cat(directory, "\\launch ", dir[i], ".txt");
    
    batch := cat(directory, "\\launch ", dir[i], ".bat");
    
    newbody := StringTools:-Substitute(body, "name", dir[i]);
    
    Export(script, newbody);
    
    Rename(script, batch);
    
    end do:
    
    
    Script template:
    
    
    if not "%minimized%"=="" goto :minimized
    
    set minimized=true
    
    start /min cmd /C "%~dpnx0"
    
    goto :EOF
    
    :minimized
    
    
    "C:\Program Files\Maple 2018\bin.X86_64_WINDOWS\mapletviewer.exe" "C:\Users\%USERNAME%\Desktop\Maplets\name.maplet"

    Before using the Maplet script:

    After using the Maplet script:

    If the appropriate executable is referenced, and the relevant file paths are adjusted accordingly, one should be able to adapt this process to other programs and their corresponding files.  In fact, any batch script that needs to be modified programmatically can be modified using these techniques.  Does anyone have other useful batch scripts that they’ve modified programmatically in Maple using similar techniques?

    *(including dragging the files to the executable directly, which only seemed to work when the executable was in its original directory)

    Summary:Hough transform is a feature extraction algorithm widely used in digital image analysis. It identifies objects with specified shapes by letting all edge pixels in the image “vote” and extract candidates with the highest votes. The classical Hough transform is associated with the identification of straight lines, but with some modification, the algorithm can be used to detect objects of arbitrary shapes (usually circles, ellipses) in an image. Therefore, Hough transform has various applications in the field of computer vision. Samir and I implemented Hough transform to detect straight lines and circles in real world images and the results are below:

    You can access the applications here for more details and try the algorithm on your own image!

    Line Detection with Hough Transform

    Circle Detection with Hough Transform

    For people who want a bit more of the theory behind:

    The voting procedure in Hough transform starts with an edge detector (we used the sobel edge detector in the applications). After locating all the edge pixels, the program will iterate through each of the pixels and record their “votes”. It is important to address that the voting procedure is completed in parameter space. For example, a straight line is usually in the form of y = a*x+b, the parameter space will be in terms of a and b. Hence y=2*x + 3 will be a point (2,3)  in the a-b space. However, notice that we cannot represent vertical lines with this system; it would take infinite memory to store a vertical line. Thus we use the polar coordinates system x*cos(θ) + y*sin(θ) - p = 0 instead, resulting in a θ -p space. Note that an image pixel (x1,y1) is represented by the intersection of all lines that satisfy x1*cos(θ) + y1*sin(θ) - p = 0, which in θ-p space is denoted as a sinusoidal curve. Hence the intersection of two different sinusoidal curves in θ-p space is essentially a unique, straight line that passes through two different image pixels. An intersection of 500 votes means that specific line passes through 500 edge pixels, implying that it is likely a solid contour line in the original image. In this way, by converting all edge pixels to sinusoidal curves in θ-p space, the algorithm is letting all pixels “vote”. In order to record the sinusoidal curves, we need an accumulator of θ * p dimensions. In the line detection application we used a matrix such that <= θ <= 180 and -sqrt(r2 +c2 ) <= p <= sqrt(r2 +c2 ), where r and c are the height (rows) and width (columns) of the image.

    The voting procedure for circle detection is similar; the difference is in how we construct the accumulator to accommodate different parametrization for circles. Notice that a circle has three essential pieces of information, the x,y coordinates of centre and the radius. This suggests that our accumulator might have to be in three dimensions. In practice, circular Hough transform is usually performed with known or estimated radius, when the radius is not known, the most straightforward solution is indeed to test a range of possible radii with a 3-dimensional accumulator. However, this might be quite expensive, especially for images with high level of details.

    Feel free to leave a comment if you have any question  :)  

    We’re excited to bring you another Meet Your Developers post. This one comes from Senior Developer, Margaret Hinchcliffe.

    Enjoy!

    1. What do you do at Maplesoft?
      I work on the software team that develops the user interface for Maplesoft products. In my time at Maple, I’ve worked on Maple, MapleSim, and MapleNet.

     

    1. What did you study in school?
      I studied Computer Science at the University of Waterloo, in the Co-op program.

     

    1. What area(s) of Maple or MapleSim are you currently focusing on in your development?
      I’m currently working on MapleNet and on ways to bring Maple functionality to the web.

     

    1. What’s the coolest feature of Maple or MapleSim that you’ve had a hand in developing?
      I helped develop the feature that lets you embed videos in a Maple worksheet. I thought that was pretty cool.

     

    1. What do you like most about working at Maplesoft? How long have you worked here?
      I celebrated my twentieth anniversary at Maplesoft this spring. Obviously, I like working here. What I like most is the opportunity to learn new skills in a supportive environment. Our company gym is pretty awesome, too.

     

    1. Favourite hobby?
      I took up boxing a couple of years ago and I really enjoy it. It’s a great workout and there’s always something new to learn.

     

    1. What do you like on your pizza?
      Pepperoni, mushrooms, and fresh basil.

     

    1. What’s your favourite movie?
      The Wizard of Oz. When people say “The book is always better”, I point to this movie as a counterexample.

     

    1. What skill would you love to learn? Why?
      I’d like to try archery. If nothing else, it would come in handy in a zombie apocalypse.

     

    1. Who’s your favourite mathematician?
      Alan Turing. He made important contributions to computer science and he helped fight the Nazis.

     

    Thanks Margaret!

    Hello MaplePrime users,

    Yesterday, I posted my MagicPuzzles package to the MapleCloud. It is a collection of tools I have written for manipulating, solving, and visualizing puzzles like Magic Squares and Magic Stars. Here's a sample solution for each:



    For the Magic Square, the numbers on each horizontal and vertical line, along with the numbers on each of the two diagonals, add up to 65.

    The inaugural version has separate sub-packages for:

    • Magic Annulai (my own name)
    • Magic Hexagons
    • Magic Squares
    • Magic Stars

    Moreover, each sub-package contains these commands:

    • Equations(), to return the linear equations for the variables based on the Magic Sum;
    • Constraints(), to return the conditions that prevent redundant solutions found by reflections and rotations;
    • VerifySolution(), to confirm if a list of numbers is a solution;
    • EquivalentSolutions(), to determine solutions equivalent to a given solution;
    • PrimarySolution(), which takes a solution and returns the associated primary solution;
    • Reflection() and Rotation(), to reflect and rotate a solution; and
    • Draw(), to provide a visualization (like the ones above).

    There is also a command, MagicSolve(), which is used to find solutions, which take the form of permutations of [1,...n] for some positive integer n, to the equations. Essentially, it solves the linear equations, and cycles through all permutations for the free variables, and selects those that give "magic" solutions.

    In future versions, I intend to add:

    • Other specific classes of problems;
    • More sample solutions; and
    • Known algorithms for finding particular solutions.


    To install the package, you can do so from here, or just execute the following within Maple 2017+:

    PackageTools:-Install( 5755630338965504, 'overwrite' );

    There are many examples in the help pages.

    I think others will find this package interesting and useful, and I encourage you to check it out.

    Allow me to introduce the Pauli Algebra package for Maple. This package implements the Clifford Algebra of Physical Space Cl3 through the use of complex paravectors. The syntax of the package is similar to the notation popularized by the work of Dr. William E. Baylis. For more information, check out the Wikipedia entry on Paravectors and the APS workbook available on Dr. Baylis' website

     

    To install the Pauli Algebra package while in a Maple session, type

    PackageTools:-Install("https://maple.cloud/downloadDocument?id=5763496974221312&version=1")

     

    Alternatively, you can find the Pauli Algebra package in the MapleCloud, and choose the install button on the far right.

     

    Upon installation, several help files become available in Maple Help to assist you with the syntax.

     

    As you will see in the Pauli.mpl source code of the package workbook, a number of Maple functions have been overloaded to handle the package's Paravector datatype. If you wish to overload additional Maple functions, let me know, and I'll include them in future updates.

     

    I'll sign off by attaching a Maple worksheet/pdf containing some examples.

    PauliAlgebraDemo.mw

    PauliAlgebraDemo.pdf

    Enjoy!

     

    This is the final installment in a series of three articles outlining new features of Maple's command line (TTY) interface. Today we'll cover improvements to ImageTools:-Preview for use from a terminal.

    Character based terminals are not well suited for displaying graphics, although the earliest Maple plotting support was specifically for such devices because better options were not widely available. But for text-based work such as writing code and documentation, many developers still prefer to work in a terminal, where everything is just a keystroke or two away. A problem arises when working on projects involving graphics. Obviously, it's easy to open an appropriate image viewer for such tasks, but for quick previews where details aren't important, a terminal-based solution can be convenient.

    As a sample image for the first few examples, we'll use this well known public domain test image, commonly referred to as the baboon, although it is actually a mandrill:

    The ImageTools:-Preview function has always been able to render output in a terminal. The output is akin to what one might have seen hanging on a data center wall in the 1970s:

    > interface(screenheight=40,screenwidth=72,plotdevice=char):
    > with(ImageTools):
    > img := Read("../../Pictures/baboon.png");
                         [ 1..512 x 1..512 x 1..3 3-D Array ]
                  img := [ Data Type: float[8]              ]
                         [ Storage: rectangular             ]
                         [ Order: C_order                   ]
    
    > Preview(img);
    oO*O*o++==**+o+=+-+=*o**=++=+*++++o*++~=o===*****==+===+++--~~=~~~+*
    @o*++++~=+~++++++=++**oO*oOOooOOOOOOoo*++ooo*+++====+*++====~~~-==+*
    Ooo++===+==+***o*oo***oooOo*++==**==~~=*oO****ooooooooo***++=~~~~~+*
    @o*+=+~===*+oOo@@@@@@@@@@@@@@oooOOO*oO@@OOO@@@@@@@@@@@@@o*+===~-=++*
    O**==~+=~=+*O@O@@@@@@OO@@O@@@@@@@OOO@@o*o@+=**=+@ooOOOoo+=+==~~~~=++
    o++++=-~~~=++*oOO**O@*=**+o@Oo@@@@@@@o*O@@o===+*@+~+o*+++~===~~=~++*
    +*++==~~==~=+=++*+=o@@@@@@@@ooo@@@@OO*Ooo@@@@OO*+=*oo*+==~~~~--=~++o
    o*+=+~=~~=~~++++*****oo*+**=+O@OOO*o+*oo+++*+=~+*oo**+*+~=~~-~~~~=+=
    O*=*=~=~~===~==+****OOOooooOOOO+O*=+*+Oo=~-~~=OOo**+*++=~~~-~-~-~+=+
    O+++~~+~=~~+==+o**oo@@*~-----O*=@o++=o@=   -~~=*ooo*o+====~~~~-~~+=+
    *o**++===+~=+=*+OOOOo=-~~   -o*=o*=++=o     -~==+oo**o++~~~----~~~++
    o*oo*===+==+=*oo*oO=-=-  -  -*=+o+=++=+    -----=**+++*+~~==~-~-=+~*
    *o**+*=++=~==~=+**O~- ~     -+=+*+=++==       ~~-~++=+~=~~~~-~~~+==+
    ooo*o***+++~+==+oo==-  -    -+=++=+++==      -- -~+=+~~~~~~~=~~===+*
    oo*o*==*+=====oooo-~-  -    -==*+==++==         --~*++=~=--~-=====**
    *oooo*+*+===++=*@*--~-      ~=+*+==++==         ~--+*==+=~~~-=~+++**
    oOOoOo**+*+=+=+O@=- ~-      ~=+*+~~=++~        -- -*o*+====~=+=+*++*
    ++*ooooOo+**+*OoO~~ -~      ~=+*+-~+++~-      -~  ~ooo+=~=~=+=******
    *o+OO@@ooOooO@O@@~=- --     ==++=~~+++~       ~  -+Oo*==++=*+**+***+
    *++*ooOOOO@OOO@@@=-=- -     =+++=-~+++~      ~   -*o***++=++*o*oo*oo
    ~===++**oOOO@@@@@@-~-  -    ~***=- =++-     -   -~oOo**o*oooo***oooo
    ~~~=~~==+O@@@@@@@@=-=  -  - -++*=-~=++     --   ~+@OO*******o**o*OOO
    =~-~-=+oO@@@@@@@@@*~--  -    =+*+==+*~  -  -   -~O@@o*ooo*ooooooooOO
    ----~==+o@@@@@@@@@o+-~  -  - ~**+=++*- -  -- ---=@@@OO**oooooo*ooooo
    -~~~~=+**o@@@@@@@@@+~~~-=- --=**+==++- ~  + -~~~*OOOOoo*ooooo***oOOO
    ---~====*@@@@@@@@@@O+~+=~= -~+*++=+++-~- =+~~~++*oOOOOoooooooo**oooo
    ---~--~=O@@O@@O**oOO++*+~+--++++==+++=~ -+~~=*=***oOoOoooOOOoooooo*o
    -    --+**oo+===*Oooo**+~=++++++==++++=~~~~+++o*+**oOo****oOOoooo*o*
          ~++oO+-~~~+@Oo***+====+++===+++=====+=+++******++**++*oOooo***
    -     ~+***=~~--=ooo**+++oo*~~~~~~~~~+*+===+++=***+++*+++****oo***++
          -=***=~---~+oOo*+++==*o=+=~==+*+===+++**+***+**+=====+oo**+++=
       - --~**===~~-~~=*O*++===++*+===+==+++++++******o**=~~~===+**++++=
     -   --~+====- --~~=+*+++++++++==++==++++++++*****~=+=~~---=+**++===
    -    --~======~~-~~ -===+++++**=++++++++++++=+++~=~~+=-----~=***+===
       -----~~+=*=~-~-~+- --~=++++++++++++++++=+-~- +=++~--~~-~==++*+===
    -----~-~======~~-~~~~--   ~~~~~~==~===~=~~- --=~=o=~~~~~~~=++++++=++
    ~~--~--~~~==+++==~-- ~=-~--~~=~~~---~-~~-~-~~=+*=+=~~~-===++***+++=+
    -~~~~~~~~~==++=++=--    -~~=++++===+=~==+==~**=+=~==~~=+*++****+++++
    ~~=~~~~~~~==++***+=--     --~=====++=~===+~~+~--~~~=++++****o*+****o
    =====~~~~===+***oo*+-        - --------  --     -~=++*o*ooooo*+*oooO
    

    If you squint really hard, you can almost discern the image. As of Maple 2018.1, ImageTools:-Preview now uses color output if interface(ansi) is set to true and interface(plotdevice) is set to colorchar:

    > interface(plotdevice=colorchar):
    > Preview(img);
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    In addition to providing quick previews of image files, this feature can also be used to get more information about plots. For example, consider the following 3D plot generated using Maple's color character plot driver:

    > plot3d([1,x,y],x=0..2*Pi,y=0..2*Pi,coords=toroidal(10));
    
                                                                            
                                  ------------                              
                            ----------||-|----------                        
                         --------\-\\-||-|-//-/--------                     
                       ---------\\\\\|||-||/-///---------                   
                     --/-//-----\\\\||||-|||/////---\\\-\--                 
                    -/-//-//-/-\\\\\||||||||//-/--\\\\-\\---                
                   --|-||-||-|--\\\\||||||||////--|/||-||-|--               
                  /--|-\-\-\\---\\\||||||||||///-////-/-/-|--\              
                 //-----\------\\\\\||||||||////-------/-----\              
                 //////--/--------\||||||||||/--------\--\\\\\\             
                /////// //// /-/--/-/-|-|||\-\--\-\ \\\\ \-\\\\\            
                |/////-////-/-//-/-/-|--|-|-\-\-\\-\-\\\\-\ \\\|            
                |//|////-/-// / /--|-|--|-|-|--\ \\-\-\ \\\\|\\|            
                ||| |-/-/  |-/--|-|--|  | | -|-|--\-|| \-\-| |||            
                |||-||| /-|--| |  | -|--|-|- |  | |--|-\ ||-||||            
                |||| |-|  | |--|--|--|  | |--|--|--| |  |-| ||||            
                 |||-| |-||-|  |  |  ---|-|  |  |  |-||-| |-|||             
                  ||-|-| | -|--|--|  |  | || |--|--|- | |-|-||/             
                  \||| |-|- |  |  ---|--|--|--| |  | -|-| |-|/              
                   \-|-| | -|--|-|| |   |  |  | |--|--| |-|//               
                    \|||||- |  |-|--|---|--|--|-|  | -|-|||/                
                     \|\|-|-|--|--| |   |  |  |-|--|-|-|-|/                 
                       \\\|-|- |  |--|--|--|-|  | -|-|-//                   
                         --\-\-|--|--|--|-|--|--|-/-/--                     
                            ----\-|--|--|-|--|-/----                        
                                  -\-|--|-|-/-                              
                                                                            
    

    The output shows the general shape of the plot, but unless you already know what it looks like, it can be hard to visualize, especially since the character drivers don't support shading. One can glean additional insight by generating a high resolution bitmap version of the plot, and then Preview-ing that:

    > interface(plotdevice="bmp",plotoutput="plot.bmp");
                              colorchar, terminal
    
    > plot3d([1,x,y],x=0..2*Pi,y=0..2*Pi,coords=toroidal(10));
    # Revert to colorchar or Preview won't generate a textual preview.
    > interface(plotdevice="colorchar",plotoutput=terminal);
                                 bmp, plot.bmp
    
    > img := Read("plot.bmp");
                         [ 1..360 x 1..480 x 1..3 3-D Array ]
                  img := [ Data Type: float[8]              ]
                         [ Storage: rectangular             ]
                         [ Order: C_order                   ]
    
    > Preview(img);
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    By default, Preview uses the extended xterm 256 color mode. The image is resized to fit within the current settings of interface(screenwidth) and interface(screenheight), and then each pixel is plotted using an "@" character over a colored background. The foreground and background colors are chosen so that their weighted average comes as close as possible to the actual RGB value of the pixel. Since this rarely produces exactly the right color, Preview also performs dithering, taking the error from the current pixel and distributing it over surrounding pixels. In effect, this uses spatial resolution to make up for the lack of color resolution.

    ImageTools:-Preview has two keyword options, dither and sixteen, that let you override this behaviour. Passing the option dither=false will tell Preview not to dither. Passing sixteen=true (or just sixteen) will result in Preview using only the sixteen standard colors, of which only eight are used for the background.

    The following examples are based on this Maple logo image:

    By default, ImageTools:-Preview renders this with 256 colors and dithering as follows:

    > img := Read("../../Pictures/logo.png");
                         [ 1..428 x 1..459 x 1..3 3-D Array ]
                  img := [ Data Type: float[8]              ]
                         [ Storage: rectangular             ]
                         [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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    If we render it without dithering, the result is sharper, but the subtle gradient from lighter to darker blue turns into a series of very obvious concentric rings, as there are not enough distinct colors in the terminal's palette to render it accurately:

    > Preview(img,dither=false);
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    In sixteen color mode, the palette is severely reduced, and as a result, the dithering is much more pronounced as the per-pixel errors are larger:

    > Preview(img,sixteen);
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    Finally, here is the image in sixteen color mode, with dithering disabled:

    > Preview(img,sixteen,dither=false);
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    

    One thing to note is that Maple has no way of knowing what the sixteen "standard" colors of your terminal actually look like, since many terminals let you change the palette. Maple assumes you are using the 16-color VGA palette, since that is close to the actual default palette on most terminals. If you are using a different palette (for example, Solarized), 16-color images will look worse than they are shown above.

    First 35 36 37 38 39 40 41 Last Page 37 of 297