Skip to main content
19-Tanzanite
May 12, 2023
Solved

How to display a point on 3D Plot in Mathcad Prime?

  • May 12, 2023
  • 3 replies
  • 3064 views

Hello,

For 2D Plot:

CornelBejan_2-1683902249057.png
CornelBejan_3-1683902255953.png

CornelBejan_1-1683902232250.png

 

CornelBejan_4-1683902277125.png

 

 

 

For 3D Plot:

CornelBejan_0-1683901318592.png

CornelBejan_4-1683901641239.png

CornelBejan_3-1683901482875.png

 

I want to plot the point f1(2,1)=2, so the point where x=2 and y=1 on the 3D plot, and to display the point as it is showed in 2D Plot.
Is it possible to do this?

Mathcad Prime 8 file attached.
Thank you.

 

Best answer by JeffH1

Points can be plotted as a 3-column [ x, y, z ] matrix.  However, there have to be at least two rows in the matrix.  So, for your case, just repeat the same point twice as shown below.  Then change the Plot parameters for the Matrix to be points, no lines, a contrasting color, and increased line thickness.  Like this:

JeffH1_0-1683909601852.png

 

3 replies

JeffH116-PearlAnswer
16-Pearl
May 12, 2023

Points can be plotted as a 3-column [ x, y, z ] matrix.  However, there have to be at least two rows in the matrix.  So, for your case, just repeat the same point twice as shown below.  Then change the Plot parameters for the Matrix to be points, no lines, a contrasting color, and increased line thickness.  Like this:

JeffH1_0-1683909601852.png

 

25-Diamond I
May 12, 2023

The easiest way was already shown by Jeff.

A bit more elaborate is to create a constant vector function and use it for plotting 😉

Werner_E_0-1683926183013.png

You may also use "CreateSpace" to create a structure similar to what Jeff had created "by hand". Its a nested vector, though.

Werner_E_1-1683926286467.png

A nested vector like this was the only way you could plot a polygon in MC15, but that version would allow for a single point as well.
It may be see as a bug that Prime needs to double that single point. On the other hand its nice that we can use a simple matrix in Prime and don't necessarily need that nested structure.

 

EDIT:

Of course you don't need to double the point coordinates if you plot more than one point in one go

Werner_E_0-1683930105153.png

Es you can see the new symbolic in Prime is not able to deliver all zeros asked for, so I had to create the matrix which "solve" should have returned manually.

Here is what it looks like  in Mathcad

Werner_E_1-1683930193125.png

 

 

Cornel19-TanzaniteAuthor
19-Tanzanite
May 14, 2023

Cornel_0-1684054693879.png

 

I do not understand this M of how we create all the values "manually".
What exactly does this M program do? 

let's take two examples: 

Cornel_1-1684055546659.png

Cornel_3-1684055691007.png

 

 

Cornel_15-1684058010430.png

Cornel_17-1684058031130.png

Cornel_18-1684058041821.png

 

 

Cornel_19-1684058049945.png

Cornel_20-1684058056198.png

Cornel_21-1684058063458.png

 


And the second example:

Cornel_22-1684058181272.png

Cornel_24-1684058232495.png

 

Cornel_25-1684058239728.png

Cornel19-TanzaniteAuthor
19-Tanzanite
May 14, 2023

And the third example:

M7(x,y) := 2*y+(2-2*x) , -2*Ï€<=x<=2*Ï€, -Ï€<=y<=Ï€ 

How this program of M will look like?

ttokoro
21-Topaz I
21-Topaz I
May 13, 2023

image.pngimage.png

t.t.