Alan,

Thanks for the reply. MATLAB and SCILAB functions are overloaded to allow to this. For example the following figures were generated by such a call to surf(x,y,z), with x, y, and z each a n-by-n matrix.

I believe this causes the function to trace curves of constant u and v, though I am not sure. I use it to make 3-dim cardioid patterns.

I believe the following wound work (with some mods).

u = linspace(min,max,n);

[U,V] = meshgrid(u,u);

define some functions.

X(U,V), Y(U,V), Z(U,V)

then

surf(X,Y,Z).

if u and v are theta and phi in spherical coordinates, then sin(Th).*cos(Ph), sin(Th).*sin(Ph), cos(Th) would generate the unit sphere.

Thanks,
David




On 3/20/2018 10:09 PM, Alan W. Irwin wrote:
On 2018-03-20 17:05-0400 David Bergman wrote:

All,

I am interested in making a surface plot in 3-dim of a parameterized surface in the following format,
x(u,v), y(u,v), z(u,v)
rather than the usual z = f(u,v).

MATLAB, SCILAB, and Octave have this option and I was wondering if PLplot has it as well. I did look through the examples and documented interfaces and nothing seemed to match this.


Hi David:

Our plcont and plshades API's have this capability, see
<http://plplot.org/docbook-manual/plplot-html-5.13.0/plcont.html> and
<http://plplot.org/docbook-manual/plplot-html-5.13.0/plshades.html>,
but our other means of making 3D plots, e.g., plmesh (see
<http://plplot.org/docbook-manual/plplot-html-5.13.0/tri-d-plots.html>
for the full list of our 3D API's) have only one-dimensional x and y arguments.

By the way, can you give me an example of, say, a mesh plot of a
parameterized surface?  I thought such plots required one-dimensional
x and y vectors since the results are typically a collection of 3D
lines, z(y)_i, at a fixed set of one-dimensional x_i values and
another set of 3D lines, z(x)_j, at a fixed one-dimension set of y_j
values.  In fact, all the MATLAB examples I have just looked up of
mesh plots seem to be of this type.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to