pchin

Dr. Paulina Chin

1406 Reputation

12 Badges

18 years, 224 days
Maplesoft
Senior Architect
Waterloo, Ontario, Canada

MaplePrimes Activity


These are Posts that have been published by pchin

I recently celebrated my 10-year anniversary at Maplesoft. I've enjoyed my time here, working with a terrific group of colleagues, and I hope to be here for many more years to come. Part of the satisfaction comes from being able to interact with this wonderful user community.

I also celebrated the 20th anniversary of the plot code, parts of which I've had the pleasure of maintaining and improving over the past 10 years. Actually, I believe it is closer to 25 years old...

Just for fun, I'm reviving the Maple soccer ball in anticipation of the FIFA final. You can make a simple animation by adding the option viewpoint=[circleleft] to the display command.

with(plots):
geom3d[TruncatedIcosahedron](p);
V := evalf(geom3d[faces](p));
display(seq(polygonplot3d(V[i], color = `if`(nops(V[i]) = 5, black, white)), i = 1 .. 32), scaling = constrained);

Christopher2222's recent post reminded me of a new plot feature that inadvertently (and through my own fault) got left out of the new-features help pages. The 'filled' option now takes a true/false value or a list of suboptions. The suboptions apply to the polygons that make up the filled region under the curve.

plot(x^2, x=0..1, color="NavyBlue", thickness=3, filled=[color="Blue", transparency=0.7]);

In a recent post, a Maple user misunderstood what an assignment to f(x) meant. Since this is a common source of confusion, I thought it would be worthwhile to say more about this subject.

What is f(x)?
First, f(x) is a "function application" in Maple. It is f applied to the argument x. It is not really the same as what one thinks of as a function in mathematics. Consider a mathematical function such as sin(x+y). In Maple, this can be represented by an expression sin(x+y) or a procedure proc(x, y) sin(x+y) end proc (which can also be written in "operator form" as (x, y)->sin(x+y)). The expression or the procedure can then be assigned to a name such as g. The mathematical function is then represented by g in Maple, and not by g(x, y). Instead, if g is a procedure, then g(x, y) means "the procedure g called with arguments x and y". The "function" help page explains these concepts in more detail.

What is f(x):=x^2 in 1-d math?
Now let's move on to what f(x) := x^2 means. In 1-d math, this means, "Create a remember table entry for procedure f." This stores the expression x^2 so that when you enter f(x), that expression is automatically retrieved, and you avoid the expense of executing the body of the procedure . Similarly, if you enter f(1) := 5, then the value 5 is automatically returned when you enter f(1). Note that if you subsequently enter f(y), you won't get y^2 returned, unless f was already defined to return y^2 with input y. Remember tables are very useful and are heavily used by some Maple library procedures. However, the majority of Maple users do not need to worry about this feature and can do very useful things in Maple without ever knowing about it.

It's been a while since I've updated my blog, but the recent Maple 12 release gives me a good opportunity to talk about some of the features I'd been working on for the past months. A few people on MaplePrimes had asked for more details about Maple 12, so I'll start by saying a bit about the new polar axes. A lot of this work was done by my colleagues in the GUI Group and they may have additional interesting things to say about the feature.

In previous versions of Maple, you could draw polar plots using the plots[polarplot] command or with the coords=polar option, but these were always displayed with Cartesian axes. In Maple 12, polar axes are displayed by default, as seen here.

plots[polarplot](1+cos(theta), theta=0..2*Pi, axis[radial]=[tickmarks=5])

plots[polarplot](1+cos(theta), theta=0..2*Pi, axis[radial]=[tickmarks=5])

 A number of new options were added to the polarplot command so that you can customize the axes.  The most useful ones are the axis[radial] and axis[angular] options. These work like the axis[1], axis[2] and axis[3] options available for general plots, and you can use them to control color, tickmarks and other properties of the radial and angular axes.

Typeset math on plots had been introduced in Maple 11, and now we can take advantage of this with nice axis labels, in multiples of Pi, on the angular axis. These labels appear by default, but of course, they can be customized with the axis options. The plot/typesetting help page provides information on how to add typeset math to plots through the command line. There are also interactive ways to do this, using the context menu.

You can add polar axes to plots created by commands other than plots[polarplot], by using the axiscoordinates=polar option. However, not all the options offered by plots[polarplot] are available generally. Here is an example using plots[implicitplot].

plots[implicitplot]([x^2+2*y^2 = 1, x^2+1.5*y^2 = 1], color = ["Blue", "Green"], x = -1 .. 1, y = -1 .. 1, axiscoordinates = polar);

plots[implicitplot]([x^2+2*y^2 = 1, x^2+1.5*y^2 = 1], color = ["Blue", "Green"], x = -1 .. 1, y = -1 .. 1, axiscoordinates = polar)

It is also possible to get the pre-Maple 12 Cartesian axes back with polar plots, by adding the axiscoordinates=cartesian option.

3 4 5 6 7 8 Page 5 of 8