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

|
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)
update
|
|||||||||||||
|
|
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:
Faster Code: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
|
|||||||||||||
|