How to prevent overflow of latex memory

I have a latex macro that takes small pictures. In this picture I need to draw an area. The boundaries of this region are quadratic bezier curves, and this region must be filled. I did not know how to do this, so at present I am “filling” the area, drawing in it a lot of Bezier curves ...

This slows down the set and if the macro is used several times (therefore tex drew really many quadratic bezier curves), it causes the following error:

! TeX capacity exceeded, sorry [main memory size=3000000].

How can I prevent this error? (freeing up memory after a macro or such ...) Or is it even better how to fill in the area defined by two quadratic Bezier curves?

Code that causes the error:

\usepackage{forloop}
\usepackage{picture}
\usepackage{eepic}
...
\linethickness{\lineThickness\unitlength}%
\forloop[\lineThickness]{cy}{\cymin}{\value{cy} < \cymax}{%
  \qbezier(\ax, \ay)(\cx, \value{cy})(\bx, \by)%
}%

Here are some examples of values ​​for variables:

\setlength{\unitlength}{0.01pt}
\lineThickness=20
%cy is just a counter - inital value is not important
\cymin=450 \cymax=900
%from following only the difference between \ax and \bx is important
\ax=0 \ay=0 \bx=550 \by=0

. , 150 ( ).

+3
3

, . , Little Bobby Tables , (+ - 2 ), , .

, ConcernedOfTunbridgeWells, - , . : 100 , 100 .

, , , , - ( ?). , .

+1

, , LaTeX. LaTeX , , , , . , , - PGF Tikz (. examples) Metapost.

+3

, TeX, , . TeX , . .

MikTeX. , , , - TeX. .

+3
source

Source: https://habr.com/ru/post/1740577/


All Articles