Thanks for the tip. If I do get that far I will post it. Do I need to be a developer on this project? Or should I just email out to the group?


On 3/21/2018 10:26 PM, Alan W. Irwin wrote:
On 2018-03-21 18:47-0400 David Bergman wrote:

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.

Hi David:

Cool plots!

And I just realized we could produce something like those with
<http://plplot.org/docbook-manual/plplot-html-5.13.0/plpoly3.html>.
For an example that uses calls to plpoly3 to plot a unit sphere, see
<http://plplot.org/examples.php?demo=18>.  It should be
possible (but likely not trivial) to modify that example to plot something more
interesting than the unit sphere, and with a convenient API, e.g.,

void
plmeshxyz(PLINT nx, PLINT ny, PLINT nz, PLFLT_MATRIX x, PLFLT_MATRIX
PLFLT_MATRIX z);

where plmeshxyz calls plpoly3 appropriately inside.

I haven't looked at the details of what would be required, but if you
do have success with this type of approach, we will likely ask you to
donate your work to PLplot under the LGPL so others can benefit.

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