[pstricks] Main memory issues with PSTricks

Christoph Bersch usenet at bersch.net
Tue Nov 4 17:50:16 CET 2008


Herbert Voss schrieb:
> Christoph Bersch schrieb:
> 
>> when I have a document containing around 3500 \pspolygon commands, TeX
>> complains about exceeded memory:
>>
>> ! TeX capacity exceeded, sorry [main memory size=3000000]
>>
>> What is so memory-consuming in the \pspolygon commands? Is there any way
>> to write a special pspolygon command which needs drastically less memory?
>> The point is that I am currently extending the gnuplot pstricks terminal
>> driver and the 'set pm3d' command needs a lot of polygons :-)
> 
> it makes no real difference to use \pspolygon or \psline.
> Everything is written as a \special command. 

I suppose, that the total memory consumption does not depend on the 
number of \special commands, but only the overall content size of all 
\special commands, right?
Is there any way around the internal storage of all \special commands of 
one picture?

> I need for
> information about such a TeX file.

When using pm3d with gnuplot, the output consists of many polyons. The 
problem is, that the terminal output driver knows nothing about the 
number of polygons being plotted. I have to figure out, if there is a 
way to get the total number of polygons (do you think, this would help?)

So for every polygon the _filled_polygon() function of the driver is 
invoked separately with the coordinates of the four corners.
The output file can look like this:

\newpsobject{pmIIIdpoly}{pspolygon}{linestyle=none,fillstyle=solid}
...
\pmIIIdpoly[fillcolor={[rgb]{1.0000,0.0500,0.7000}}](0,0)(0.1,0)(0.1,0.1)(0,0.1)
\pmIIIdpoly[fillcolor={[rgb]{...}](...)(...)(...)(...)
...
and so on.
I can send you later a complete output TeX file using my current 
development driver.

Thanks,
Christoph



More information about the PSTricks mailing list