18

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

http://www.meta-synthesis.com/webbook/35_pt/relative_abundance.jpg

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:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\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);
\end{tikzpicture}
\end{document}

Output:

sample output

3
4

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:

http://objectmix.com/graphics/133553-area-closed-bezier-curve.html

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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