Skip to main content
23-Emerald IV
February 10, 2017
Question

Undocumented function Polygon

  • February 10, 2017
  • 7 replies
  • 4875 views

Stumbled across this function in Mathcad 11, don't know if it exists in other versions:

Symbolically it does:

Does anybody have any idea what the matrix should contain?

Especially intriguing is the fact that it should be a matrix of either 3, 6 or 7 rows.

Luc

7 replies

21-Topaz II
February 10, 2017

In mathcad 15 does not exist. There is, however, Polyhedron but it is another thing ...

as you can see from the following image:

polyhedra.jpg

24-Ruby III
February 10, 2017

Luc,

Can you attach MC11 worksheet? And more: plottools - Maple Programming Help

LucMeekes23-Emerald IVAuthor
23-Emerald IV
February 10, 2017

Sure,

here she is.

I had a look at the Maple plottools, but the infomation there doesn't seem to fit, so far.

Luc

24-Ruby III
February 10, 2017

LucMeekes wrote:

...

I had a look at the Maple plottools, but the infomation there doesn't seem to fit, so far.

Luc

Yes, in this case, for some reason, there is a restriction on the size of the matrix.

LucMeekes23-Emerald IVAuthor
23-Emerald IV
February 11, 2017

Found how to use it. It works only in plotting. Here's an example:

LucMeekes23-Emerald IVAuthor
23-Emerald IV
February 15, 2017

With a bit of further experimenting I found that the first three rows of the matrix that goes into the Polygon function contain the X, Y and Z-coordinates of the polygon points respectively. Further rows determine colour or the polygon.

Here are three examples:

And their results are:

The black (tilted w.r.t. the X/Y plane) triangle is associated with L3, the red/blue/green triangle is L6 (the subsequent rows of the matrix determine the values of red, blue and green on the respective points on a scale from 0 to 1 (any value above 1 or below 0 is discarded). The third triangle uses a 4-valued colour that I haven't figured out yet; I've set the display to fill the polygon with smooth shading.

There also exists a Polyline function, that just draws a line from point to point, but the order of coordinates is unusual: Y,Z and then X. And it doesn't work with the four-valued colour (L7). The other two shapes from the same matrices above become:

Luc

LucMeekes23-Emerald IVAuthor
23-Emerald IV
February 15, 2017

With a function polygon()

and PolyLine() that uses Polyline after rearranging the X,Y and Z-coordinates

I can now draw pentagons:

The polyline (incomplete) pentagon sits on level z=0, the full pentagon sits on level z=1.

Luc

JeffH1
16-Pearl
February 17, 2017

Not in 15.  Not in Prime.

There was a switch from Maple to SciTech half way through the 13 releases.  Perhaps it is coming from Maple.

LucMeekes23-Emerald IVAuthor
23-Emerald IV
November 29, 2017

And now there appears to also exist a function Points() in Mathcad 11. It appears to be related to plotting as well.

 

Luc

24-Ruby III
November 30, 2017

And how does it look in MC11?

LucMeekes23-Emerald IVAuthor
23-Emerald IV
November 30, 2017

So far, I've tried only this:

LM_20171130_Points.png

All (3) errors are the same. Apparently the function requires vector(s) with (at least?) 3 elements.

The "untranslatable" is an indication that the function just wants to plot, it doesn't want to output numerical information; much like Polygon and Polyline.

 

Luc