Contour Generator 
SecuriDesign for CorelDRAW/Corel DESIGNERFunction Editor is used to create definitions of new functions that can be used with Contour and Pattern Generators. Functions are the basic building blocks of both contours and patterns and used widely throughout SecuriDesign. In many cases, welldesigned function is the key to a good looking security element. The Function Editor can be accessed in both Contour Generator and Pattern Generator on Functions tab of the dialogs:
This dialog shows a list of all functions available and allows you to modify a function's definition. SecuriDesign employs Fourier Series to define functions. A Fourier Series is defined as: F(t) = C + A_{1}*Cos(wt) + B_{1}*Sin(wt) + A_{2}*Cos(2wt) + B_{2}*Sin(2wt) + A_{3}*Cos(3wt) + B_{3}*Sin(3wt) + ... So, a set of coefficients A_{1}, B_{1}, A_{2}, B_{2},... defines a function. SecuriDesign allows to enter up to 20 first coefficients of the series. Every function in SecuriDesign has two components: vertical (Y) and horizontal (X). Each component is a separate Fourier Series. Ycomponent is used most of the time and it determines the vertical variations of contour or pattern curves. However Xcomponent allows to create horizontal deviations that may result in different loops as shown on the screenshot above. Thus a function definition in SecuriDesign contains two independent function X(t) and Y(t) that control horizontal and vertical deviations: X(t) = A_{x1}*Cos(wt) + B_{x1}*Sin(wt) + A_{x2}*Cos(2wt) + B_{x2}*Sin(2wt) + ... + A_{x20}*Cos(20wt) + B_{x20}*Sin(20wt) Y(t) = A_{y1}*Cos(wt) + B_{y1}*Sin(wt) + A_{y2}*Cos(2wt) + B_{y2}*Sin(2wt) + ... + A_{y20}*Cos(20wt) + B_{y20}*Sin(20wt) The coefficients can be entered in the table ("Fourier Coefficients") on the dialog tab which shows 5 coefficients at a time. Four buttons below the table allows you to select the coefficient range you want to specify. First two columns in the table specify the Ycomponent of the function ("Y:Cos" column shows A_{y}_{n} coefficients [the ones at Cosines], while "Y:Sin" column shows B_{y}_{n} coefficients [the ones at Cosines]). "X:Cos" and "X:Sin" have the same meaning but for Xcomponent of the function. The following controls are available on Functions tab of the macro dialogs: Available Functions list Shows the list of all functions available for the current document. Selecting a function from the list automatically updates the Fourier Coefficients table. New Pressing this button will add a new function to the list. The name of the new function is taken from the Name text box and all the Fourier coefficients are taken from the coefficient table. Modify When pressed, the currently selected function is updated with the data entered in the dialog Delete Deletes the currently selected function from the list. Clear Clears all the coefficient values. Visual Editor... This button invokes a Visual Function Editor module which gives the user an alternative way of defining a function. See the comments below. Random... Opens Random Function Generator dialog that allows to generate
function definitions at random: This dialog appears on top of the main dialog, however when Generate button is pressed, the function coefficients appear in the main dialog and the function preview is updated. Keep clicking the Generate button until you find the function you like, then click Close to dismiss the dialog. The parameters in this dialog have the following meanings:
Experiment with these settings and you will understand what they affect pretty quickly. Import Imports function descriptions from a function definition file (*.fn) Export Exports the selected function to a function definition file (*.fn) Name Provides the name for a function. Fourier Coefficients As explained above, this table provides the Fourier coefficients that define the function. Both X and Ycomponents of the function are defined here. Available for all documents When checked, the function is stored globally and will be available next time you launch SecuriDesign. If this button is unchecked, the function description is saved in the current CorelDRAW document only. When you invoke SecuriDesign on another document, the function will not be available. Preview Options Allow to specify the function preview options. Function Preview Window Displays the current function. When you make changes to function definition, click the preview image to rebuild the function preview. Visual Function EditorVisual Function Editor allows you to define function using alternative method. The main Functions dialog allows you to enter Sine and Cosine coefficients. However the same Fourier series can be presented in a different way: F(t) = C + A_{1}*Sin(wt+f_{1}) + A_{2}*Sin(2wt+f_{2}) + A_{3}*Sin(3wt+f_{3}) + ... Which means that you can specify the amplitude of each harmonic and its phase offset. This is what Visual Function Editor offers: The scroll bars allow you to change amplitude and phase of each harmonic and preview the function in real time. There is also one very important feature of Visual Function Editor  sampling a function definition from CorelDRAW document. You can draw a function (one period) as a curve and then have SecuriDesign convert the curve into a function definition. If you cannot create the shape of a function as you want by playing with Fourier coefficients, try designing the function in CorelDRAW. Just draw a horizontal line, convert it to curve, add some nodes, and move the nodes vertically like shown on the following picture: Then with a control shape (or shapes) selected for the contour or pattern effect, start SecuriDesign. Go to Visual Function Designer and click on the Eyedropper button. The dialogs will disappear and the mouse cursor will change. Click on the curve that you created before. The macro will read in the curve definition and perform Discrete Fourier Transformation which will yield all the coefficients necessary to approximate the curve shape: Make sure that the curve goes from left to right without changing direction. The following illustration shows an invalid curve that cannot be converted into a function. The part of the curve highlighted in red goes in opposite direction as the rest of the curve (right to left): If you try to pick a curve that cannot be used as a function definition, error message will be shown stating that. < Previous: Envelopes Tab  SecuriDesign Home  Next : Tutorial > 
Copyright © 2014 by Alex Vakulenko. All rights reserved.
