Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Team,
I need to be able to assign a color, based upon wall tension, to a 3D graph of an ellipsoid. In a separate graph, I will also need to asign a color to change in tension in the ellipsoid.
Thanks
Mathcad 15 or Prime?
I'm using Mathcad 15.
Unfortunately you can't change the plot color based on variables - neither in Mathcad, nor in Prime.
There may be awkward workarounds by plotting a series ellipsoids, each with a different color. Based on a variable you could shrink the not to be plotted ellipsoids and so only the one in the color you want remains visible.
Or was the question to assign some kind of colormap to the ellipsoid, coloring different portions of the surface in different colors. There is limited support for colormaps in Mathcad 15 and below (colors changing dependent on x,y or z-coordinate) but no support whatsoever in Prime.
In an older thread I once implemented an awkward method of applying a colormap based on the value of an arbitrary function, see here: http://communities.ptc.com/message/211658#211658
Werner,
Would you be willing to adapt your spring program to the surface tension in an ellipsoid? You would be a coauthor on the final research paper. Kindly let me know.
Thanks,
Glen
Professor
Rutgers New Jersey Medical School
First you would have to consider that the way that spring program was written may not apply to your data or function. It was a very crude, bold and awkward way of achieving an effect which should be available out of the box but isn't - colormaps depending on arbitrary functions.
The way I did it was to set up a 3D plot to plot 16 matrices, each in a different color. The colors had to be hard coded in the plot properties, so changing the color sequence or inserting an intermedeate color between two too distinct ones was a no go. A program would scan the coil surface, apply a predefined function and depending on the outcome sort the points in 16 different matrices.
So I dont plot surcafes but a huge number of single points which are formatted as big dots so they would ressemble a surface. Using less dots or smaller dots will create "holes", more dots significantly slow down manipulation and we may run into some Mathcad limitations.
So in short the method was implemented mainly out of curiosity, simply because it could be done, but maybe it shouldn't be done.
If the method will be applicable to your problem depends upon how you ellipsoid is defined and in which way you determine and define your tension function.
In case of the spiral both the spiral and the function determining the color both were dependend on the same to parameters u and v.
If that all does not discourage you, give it a try and if you encounter a problem, load up the file here and maybe I am or someone else is able to help.