Items tagged with visualization

Feed

When we first started trying to use Maple to create a maple leaf like the one in the Canada 150 logo, we couldn’t find any references online to the exact geometry, so we went back to basics. With our trusty ruler and protractor, we mapped out the geometry of the maple leaf logo by hand.

Our first observation was that the maple leaf could be viewed as being comprised of 9 kites. You can read more about the meaning of these shapes on the Canada 150 site (where they refer to the shapes as diamonds).

We also observed that the individual kites had slightly different scales from one another. The largest kites were numbers 3, 5 and 7; we represented their length as 1 unit of length. Also, each of the kites seemed centred at the origin, but was rotated about the y-axis at a certain angle.

As such, we found the kites to have the following scales and rotations from the vertical axis:

Kites:

1, 9: 0.81 at +/- Pi/2

2, 8: 0.77 at +/- 2*Pi/5

3, 5, 7: 1 at +/-Pi/4, 0

4, 6: 0.93 at +/- Pi/8

This can be visualized as follows:

To draw this in Maple we put together a simple procedure to draw each of the kites:

# Make a kite shape centred at the origin.
opts := thickness=4, color="#DC2828":
MakeKite := proc({scale := 1, rotation := 0})
    local t, p, pts, x;

    t := 0.267*scale;
    pts := [[0, 0], [t, t], [0, scale], [-t, t], [0, 0]]:
    p := plot(pts, opts);
    if rotation<>0.0 then
        p := plottools:-rotate(p, rotation);
    end if;
    return p;
end proc:

 

The main idea of this procedure is that we draw a kite using a standard list of points, which are scaled and rotated. Then to generate the sequence of plots:

shapes := MakeKite(rotation=-Pi/4),
          MakeKite(scale=0.77, rotation=-2*Pi/5),

          MakeKite(scale=0.81, rotation=-Pi/2),
          MakeKite(scale=0.93, rotation=-Pi/8),
          MakeKite(),
          MakeKite(scale=0.93, rotation=Pi/8),
          MakeKite(scale=0.81, rotation=Pi/2),
          MakeKite(scale=0.77, rotation=2*Pi/5),
          MakeKite(rotation=Pi/4),
          plot([[0,-0.5], [0,0]], opts): #Add in a section for the maple leaf stem
plots:-display(shapes, scaling=constrained, view=[-1..1, -0.75..1.25], axes=box, size=[800,800]);

This looked pretty similar to the original logo, however the kites 2, 4, 6, and 8 all needed to be moved behind the other kites. This proved somewhat tricky, so we just simply turned on the point probe in Maple and drew in the connected lines to form these points.

shapes := MakeKite(rotation=-Pi/4),
          plot([[-.55,.095],[-.733,.236],[-.49,.245]],opts),

          MakeKite(scale=0.81, rotation=-Pi/2),
          plot([[-.342,.536],[-.355,.859],[-.138,.622]],opts),
          MakeKite(),
          plot([[.342,.536],[.355,.859],[.138,.622]],opts),
          MakeKite(scale=0.81, rotation=Pi/2),
          plot([[.55,.095],[.733,.236],[.49,.245]],opts),
          MakeKite(rotation=Pi/4),
          plot([[0,-0.5], [0,0]], opts):
plots:-display(shapes, scaling=constrained, view=[-1..1, -0.75..1.25], axes=box, size=[800,800]);

Happy Canada Day!

With Maple, you can create amazing visualizations that go far beyond the standard mathematical plots that you might typically expect (I wince every time I see yet another sine curve).

At your fingertips, you have

  • plotting primitives that can be assembled in new and novel ways
  • precise control over coloring (yay for ColorTools) and placement
  • an interactive coding environment with inline plots, giving you quick visual feedback over aesthetic changes
  • and a comprehensive mathematical programming language to glue everything together

Here, I thought I'd share a few of the visualizations I've really enjoyed creating over the last few years (and I'd like to emphasize 'enjoy' - doing this stuff is fun!)

Let me know if you want any of the worksheets.

 

Psychrometric chart with historical weather data for Waterloo, Ontario.

 

Ternary plot of the color of gold-silver-copper alloys

 

Spectrogram of a violin note played with vibrato

 

Colored zoom of the Mandelbrot set

 

Reporting dashboard for an Organic Rankine Cycle

 

Temperature-entropy plot of an ideal Rankine Cycle

 

Quaternion fractal

 

Historical sunpot data

 

Earthquake data

 

African literacy rates

This Saturday is Canada’s 150th birthday. As you can imagine, the country has been paying a lot more attention to this year’s anniversary than our usual low key approach, and as a Canadian company, we at Maplesoft decided to join in the fun.

And what better way for Maplesoft to celebrate Canada’s birthday than to create a maple leaf in Maple! 

So here is a maple leaf inspired by the Canada 150 logo, which was created by Ariana Cuvin, a student at the University of Waterloo and former co-op here at Maplesoft:

Here’s the code to reproduce this plot (more details can be found in this follow up post):

p:=thickness=5,color="#DC2828":
plots:-display(

    plot([[-.216,-.216],[0,0],[-.216,.216],[-.81,0],[-.216,-.216]],p),  
    plot([[-.55,.095],[-.733,.236],[-.49,.245]],p),
    plot([[-.376,0],[0,0],[0,.376],[-.705,.705],[-.376,0]],p),
    plot([[-.342,.536],[-.355,.859],[-.138,.622]],p),
    plot([[-.267,.267],[0,0],[.267,.267],[0,1],[-.267,.267]],p),
    plot([[.342,.536],[.355,.859],[.138,.622]],p),
    plot([[0.,.376],[0,0],[.376,0],[.705,.705],[0.,.376]],p),
    plot([[.55,.095],[.733,.236],[.49,.245]],p),
    plot([[.216,.216],[0,0],[.216,-.216],[.81,0],[.216,.216]],p),
    plot([[0,-.5],[0,0]],p),

scaling=constrained,view=[-1..1,-.75..1.25],axes=box);

 

Know other ways to plot a maple leaf in Maple?  If so, please share them below - we’d love to see them!

I never expected that the reflected light direction of sun from moon in the sky would be so dificult to imagine ...

at the following article mentioned :

we derive an equation for the magnitude of the moon tilt illusion that can be applied to all con gurations of sun and moon in the sky.

THE MOON TILT ILLUSION

 

since the calculations contains many steps and high level mathematical formula , there is no way rather to recourse to maple (powerful math assistant )

I hope there was adaptations between a lots of functions and predefined schema of maple and this problem so that the calculations and visualization facilitated several times ?

your effort will be a graet present for all the people of the world that look to the moon crescent everytime !

 

Hello.

When I click to start simulation button maple start counting but after that don't open visualization. When I open visualization manually, there aren't results of simulation. Program don´t show any error. It does not work with my models and examples to. Thanks for your help.

Where was this graphic of a mountain crater used in Maple?  The top left graphic from here http://www.maplesoft.com/products/maple/features/Visualization.aspx#

I haven't seen it used in any webinars nor have I seen it in the application center.  5 points to anyone who can find it :)

 

Hello everybody,

 

my question concerns the visualizing possibilities of maple:

can maple visualize complex functions? (f(z): C->C)

If so, which possibilities do i have und what is the command for it? Maybe as a coulour diagram, as a vector field (f(x): R^2->R^2) , or as mapping of sets (e.g. curves, grids into new curves and curved lines)?

 

 

 

Thanks in advance

regards

Nikita

 

PS: I am using maple 18.

In this work we show you what to do with the programming of Embedded Components applied to graphics in the Cartesian plane; from the visualization of a point up to three-dimensional objects and also using the Maple language generare own interactive applications for touch screen technology in mobile devices techniques. Given that computers use multicore and designed algorithms that solve calculus problems with very good performance in time; this brings programming to more complex mathematical structures such as in the linear algebra, analytic geometry and advanced methods in numerical analysis. The graphics will show real-time results for the correct use of the parallel programming undertook to bear the procedural technique is well suited to the data structure, curves and surfaces. Interaction in a single graphical container allowing the teaching and / or research the rapid change of parameters; giving a quick interpretation of the results.

 

FAST_UNT_2015.pdf

Programming_Embedded_Components_for_Graphics_in_Maple.mw

Atte.

L.Araujo C.

Physics Pure

Computer Science

 

 

 

Hi, we recently put together a web video on how memes spread on the internet using several visualizations generated from Maple 18:

http://youtu.be/vEhAkEPwESI

Found the new ability to specify a background image for plots to be very helpful.

Hello,

In my model, it seems that I have parameters which are not evaluated.

Indeed, I'm not sure that the parameters defined with relations as you can see in the printscreen are evaluated.

 

One point which helps me to debug my model is to follow the evaluation of the construction of my model with the 3D visualization.

Questions :
1) How can I do to be sure that my parameters are evaluated ?

2) Is it possible to launch the update of the 3D visualization even if I still have some bugs in my model ?

Thank you for help.

Well-known problem is the problem of placing eight shess queens on an 8×8 chessboard so that no two queens attack each other. In this post, we consider the same problem of placing  m  shess queens on an  n×n  chessboard. The problem has a solution if  n>3  and  m<=n .

Work consists of two procedures. The first procedure  Queens  returns the total number of solutions and saves a complete list of all solutions (global variable  S ). The second procedure  QueensPic  shows the user-defined solutions from the list  S  on the board. Formal argument  t  is the number of solutions in each row of the display. The second procedure should be used in the standard interface, rather than in the classic one, since in the latter it may not work properly.

Queens := proc (m::posint, n::posint)

local It, K, l, L, M, P;

global S, p, q;

It := proc (L)

local P, k, i, j;

M := []; k := nops(L[1]);

for i in L do

for j to n do

if convert([seq(j <> i[s, 2], s = 1 .. k)], `and`) and convert([seq(l[k+1]-i[s, 1] <> i[s, 2]-j, s = 1 .. k)], `and`) and convert([seq(l[k+1]-i[s, 1] <> j-i[s, 2], s = 1 .. k)], `and`) then M := [op(M), [op(i), [l[k+1], j]]]

fi;

od; od;

M;

end proc;

K := combinat:-choose([`$`(1 .. n)], m);

S := [];

for l in K do P := [];

L := [seq([[l[1], i]], i = 1 .. n)];

P := [op(P), op((It@@(m-1))(L))];

S := [op(S), op(P)]

od;

p := args[1]; q := args[2];

nops(S);

end proc:

 

QueensPic := proc (M, t::posint)

local m, n, HL, VL, T, A, N;

uses plottools, plots;

m := p; n := q; N := nops(args[1]);

HL := seq(line([.5, .5+k], [.5+n, .5+k], color = black, thickness = 2), k = 0 .. n);

VL := seq(line([.5+k, .5], [.5+k, .5+n], color = black, thickness = 2), k = 0 .. n);

T := [seq(textplot([seq([op(M[i, j]), Q], j = 1 .. m)], color = red, font = [TIMES, ROMAN, 24]), i = 1 .. N)];

if m <= n and 3 < n then

A := seq(display(HL, VL, T[k], axes = none, scaling = constrained), k = 1 .. N), seq(display(plot([[0, 0]]), axes = none, scaling = constrained), k = 1 .. t*ceil(N/t)-N);

Matrix(ceil(N/t), t, [A]);

display(%);

fi;

end proc:

 

Examples of work:

Queens(5, 6);  

S[70], S[140], S[210];

QueensPic([%], 3); 

                                                                            248

[[1, 5], [2, 3], [3, 6], [4, 4], [6, 1]], [[1, 3], [2, 5], [4, 1], [5, 4], [6, 2]], [[2, 1], [3, 4], [4, 2], [5, 5], [6, 3]]

 

Two solutions of classic problem:

Queens(8, 8); 

S[64..65];

QueensPic(%, 2);

                                                                                      92

[[[1, 5], [2, 8], [3, 4], [4, 1], [5, 7], [6, 2], [7, 6], [8, 3]], [[1, 6], [2, 1], [3, 5], [4, 2], [5, 8], [6, 3], [7, 7], [8, 4]]]

 

 

Queens_problem.mw

Here is a solve problem based on theoritical analytic approach, http://math.stackexchange.com/q/460365/8581. May I ask make me hints in which I can visualze the region f maps. In the question we are speaking about $f(E)$, so I am thinking about a plot illustaring $f(E)$. Thanks for the time and any hints.

Hi,

A right click on the visualization CAD geometry icon, attaching an STL file, activates a pop up list of options. One of the options is "make rigidbody". The units are for the MKS system. I must be doing...

We assume that the length of a match is 1, then the perimeter of a polygon is equal to the number of matches N. If a match can be located at arbitrary angles to each other, then at a given perimeter of the area can take on any value between zero and the area of a regular polygon (for even number of matches) . For an odd number of matches the lower bound equals to the area of an equilateral triangle of side 1. For any given area within these boundaries will be infinitely many solutions.

Page 1 of 1