cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

3D Vector Plots

3D Vector Plots

Make 3D plots where the input is X,Y,Z,dx,dy,dz.

This type of plot can be used to display vectors within a measurement space.  For example, when doing a kinematic analysis of a measurement instrument the error vectors can be plotted as a function of locations around the instrument.  The attached figure shows an example 3D vector plot for a flawed measurement instrument.

Another use for this sort of plot might be 3D plotting of E&M fields.  I have also used this sort of plot for showing measurement errors caused by stratified atmosphere.

Attached is the vector file that I create with Prime.

6 Comments
Werner_E
Ruby IV

What you demand should be possible to create even with the very limited possibilities Primes 3D plot has to offer.

Of course without rainbow colors and you would have to decide if the arrowhead size should be fixed or scaled dependig om the lenght of the arrow.

Furthermore we would need a rule how to deal with the dx,dy,dz values. Do they represent the length of the arrow or should the arrow be normalized so all are of equal length (could be an argument of a function which has to be created for this)

Even though Primes 3Dplot capabilities are far behind those of Mathcad 15 (and they are in no way state of the art there) we have a great improvement in Primes 3Dplot over Mathcads - we can use NaN in a similar way as in 2Dplots and so its possible to create a vectorfield in one matrix. Furthermore the data structure needed to plot line segments is a little bit less complex in Prime compared to Mathcad.

Given how poor Prime still is in version 4 I would guess that this idea is not amongst the top of the wishlist. We don't even have the 2D vector field plot we have in MC15.

You may consider opening a discussion/question in the Mathcad forum, providing an example plot and also example data (X,Y,Z,dx,dy,dz)

Here's a first quick hack. To add arrowheads you would have to work on subroutine "arrow"

Thank you for the information.  Nice idea breaking up the line with NaN.

Ordinarily the arrow would be scaled with the vector length dx,dy,dz.

Experimenting with your example, I could not get two different vector fields to plot (as is shown in the tutorials).

I will see if I can add a data set to the request.

Werner_E
Ruby IV

Your delta-values are far too small to be visible.

I had to scale them by factor 2*10^4 to get em visible.

Have not added arrowheads yet - too lazy 😉 Ist not that easy as in 2D -> Vector Field Plots in 2D for Mathcad 15 and  Prime 2

Can't attach the file here - thats the reason I suggested to open a question/discussion. Another reason for doing in so is that an "idea" does not bubble up in the list of recent activity when a new comment is added, so chances are it escapes our focus.

P.S.: Your data looks like suitable for coming Easter 😉

Werner_E
Ruby IV

With a bit of effort you may also create different colored "vectors", similar to the picture you posted, here depending on the length of the "arrows".

The plots look great.  Thank you.

When you say "a bit of effort" I will need to experiment to duplicate this.

A nice feature of your plot, not included in my original plot, is the base of the vector.  Some of the vector values are zero, so in my plot there is empty space, whereas in your plot there is at least the red dot signifying the base.

One thing I have not been able to do is display two different vector fields.  Many times there is a desirable to show or compare different vectors.  The attached jpg shows five different vector errors due to instrument instability created from different vantage points, the goal being to visually show randomization averaging the errors.

USMN Composite to ALL.jpg

Werner_E
Ruby IV

The red base of the vector was necessary because my vectors still lack the arrow head 😉 It would be easy to additionally make a small dot in the color of the vector in place of an arrow head, but I don't think it looks that good.

The little effort I was talking about meant to filter the data for vector length an create a number of different vector plots in different colors.

Not sure what problems you experience in trying to create more than one vector plot - its quite straightforward. The picture you show should be easy to duplicate.

But as already stated I can't attach my file in a comment so I suggest you create a separate question/discussion (https://www.ptcusercommunity.com/discussion/create!input.jspa?containerType=14&containerID=2003) so we can also attach files in our answers in that thread and with the benefit, that every new answer lets the thread bubble up the list. This idea is now quite at the bottom of that list and so I guess I will not come back again to here. Ideas at the end are not meant to be used for longer discussions - I just wanted to point out that what you demand is (in parts) possible to do already with the current version of Prime, I did not vote because I 1) think that this "ideas" are just a placebo without any effect on program development and 2) I am convinced that there are so many many other things which had to implemented in Prime to make it a software usable for professional use and make it at least equal in features with 10 year old Mathcad 15/14. The story of Prime is a very sad one 😞