|
From: Mario R. <bio...@te...> - 2014-11-27 07:27:59
|
El 26/11/14 a las 21:15, Nijso Beishuizen escribió:
> Dear all,
>
> In maxima, I want to show an unstructured quadrilateral 2D mesh where
> each cell is colored by the Z-value, and the interior is colored by
> interpolation of the Z-values at the nodes.
>
> In gnuplot I would do:
> set pm3d interpolate 0,0
> set pm3d map
> splot 'datafile'
>
>
> When I try to do this in maxima, draw2d opens a gnuplot window, but
> seems to be stuck in some loop and never displays the image:
>
> ------------------------------------------------------
> load(draw);
> q:[mesh([[0.0, 0.0, 0.0], [0.5, 0.0, 1.0]],
> [[0.0, 0.5, 0.0], [0.5, 0.5, 0.1249999999384172]]),
> mesh([[0.5, 0.0, 1.0], [1.0, 0.0, 1.224500708041116E-16]],
> [[0.5, 0.5, 0.1249999999384172], [1.0, 0.5, 0.0]]),
> mesh([[0.0, 0.5, 0.0], [0.5, 0.5, 0.1249999999384172]],
> [[0.0, 1.0, 0.0], [0.5, 1.0, 0.0]]), mesh([[0.5, 0.5,
> 0.1249999999384172],
> [1.0, 0.5, 0.0]], [[0.5, 1.0, 0.0], [1.0, 1.0, 0.0]])];
>
> header:['enhanced3d=true,user_preamble="set pm3d map;set pm3d
> interpolate 0,0"];
>
> apply(draw3d,append(header,q));
> ------------------------------------------------------
>
> If I remove the 'set pm3d interpolate 0,0' statement, the mesh is shown,
> but the colors are not interpolated. Displaying a single element is also
> working:
> draw3d('enhanced3d=true,'user_preamble="set pm3d map;set pm3d
> interpolate 0,0",q[1]);
>
>
> Any ideas on how to make this work?
>
Draw writes in file 'maxout.gnuplot' the complete scene and adds to it
the 'user_preamble' before calling splot.
When I run the script 'maxout.gnuplot' directly from Gnuplot, it returns
the following error message:
"maxout.gnuplot", line 39: out of memory for
pm3d_plot->quadrangles
Removing the user_preamble no error is shown, so I presume something is
wrong with it. Try to edit 'maxout.gnuplot' by hand adding/removing
portions of code and see what happens.
Sorry, but I can't be more helpful at this moment.
--
Mario
|