TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to reproduce the shown periodic table, with more correct areas.


periodic tabel with abundance

I would appreciate any ideas to how this can be done. How do I in TikZ calculate the area of one box? Can I make the control points auto adjust to a given area, either by iteration, or direct calculation. I do not know the math behind control points!?

Code sample:

\draw (0,0) rectangle (3,2);
\draw (0,1) .. controls (0.4,0.4) and (1.5,1.5) ..  (3,1);
\draw (1,0) .. controls (0.4,0.4) and (1.5,1.5) ..  (1,2);
\draw (2,0) .. controls (1.4,1.4) and (1.5,1.5) ..  (2,2);


sample output

share|improve this question
Seems as if (1) you have rectangular shapes (2) each consists of 4 bezier curves. You could try the pgfplots library patchplots with patch type=biquadratic or patch type=bicubic... they would require points ON the boundary curves which makes things a little bit simpler. – Christian Feuersänger Nov 25 '12 at 13:44
@cjorssen: This is really great. I did not know that there was a special name for this kind of mapping - it is helping me a lot. I will look into it, and try to make some TikZ code from it. – Hans-Peter E. Kristiansen Mar 22 '13 at 3:19

Is there any reason it has to be in TikZ? For what is probably a one-off large calculation it may be better to do all the calculation in some other environment and use this to generate a TikZ picture. For example a programming/scripting language or a CAS. Metapost has paths/points and easy access to Bezier points, so that could be the go. Yes, I know that this counter to the spirit of "{tikz-pgf}{calculations}".

In any case, a component of what you need is a formula for the area of a Bezier-bounded region. This can be found using standard multivariate calculus tricks (in particular Green's theorem - Kreyszig chapter 10 if you have it). There are some formulas where someone has done exactly that here:


I am assuming that this is what you meant by not understanding the maths behind control points. More fundamental information is here: http://en.wikipedia.org/wiki/Bezier_curve

For the rest of the problem, I'd use an iterative approach - move points in the direction that improves the fit. It would probably take a fair bit of fiddling to find the right combination of freedom and restrictions. One advantage if you do it in Metapost is that it does a reasonable job of calculating nice control points if you just give it a sequence of endpoints.

Apologies that this is not a perfectly-solved answer to your question - it would be quite complicated to actually get it working.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.