One of my last questions talked about certificates and I got great answers. Now my questions is, can one recreate a guilloche in TikZ like the one shown below:
or may be a border like
The problem is to draw a curve with a fixed point inside a circle
A method : I used tkz-fct because it's my package and I know it but it's easy to create the same thing with only tikz. (here you need gnuplot)
This is better but you need some time to compile
So here's an approach to draw the 'straight' parts. (Might be a bit crude to more seasoned people...)
The compile time is certain to put the most patient of us to test, but that's to be expected with
I only plotted one such sample from the ones I found at Mathworld. So there are some samples ready to be downloaded. They are (as you can see below) a sum of lots of sines and the essential trick to get them to mesh together beautifully is to control the 'frequency' and the 'initial phase'.
So here's the code:
As you can see, I had to rescale a bit the coordinates, primarily because the source formulas used radians and
And this is what you get after - well - a while:
The idea is to reuse the previous coordinate instead of recomputing it with the use of
So instead you would do:
For further speed the computation of the angles could be made more explicit, and shorter expression could be made:
As a last optimization all variables that can be reduced should be, this will not give as much, as it is simple multiplication and division:
And actually it does compiler twice as fast, and faster for the last, when changing from
An alternative to creating guillochés with TikZ is to use a third-party tool to produce them as graphics files, and then import them into your document using the usual
I'm aware of the following guilloché tools:
A sophisticated, proprietary guilloché tool for Microsoft Windows that can export to PostScript. Prices are not listed on the website, though I gather that it's very expensive (thousands of dollars).
Another proprietary Guilloché generator, available for $500 for Mac OS. There is also a "Lite" version available for $25. Bitmap and PDF outputs are supported.
A free-as-in-beer Adobe Flash application that you can use from a web browser. You simply select the desired foreground and background colours and adjust a series of sliders to control the size and shape of the pattern. The patterns can be saved as JPEG images by pressing