<< Click to Display Table of Contents >> Navigation: Getting Started Tutorials  MechDesigner > Tutorial 18: Math FB > Step 18.1: Position: Plot an Epitrochoid Curve 
In this step, we enter in the Math FB the parametric equations that define the X and Y coordinates for the shape of the EpitrochoidCurve.
The EpitrochoidCurve is a good example. We can compare the Epitrochoid Curve derived from the Math FB with the curve we can get from a GearPair.
•The EpitrochoidCurve given by a GearPair will be correct  it is found by MechDesigner!
•The EpitrochoidCurve from the Math FB will only be correct when our equations are correct.
See Tutorial 14 : Epitrochoid Curve given by a GearPair.
We will add parametric equations to a Math FB to calculate separately the X and Y coordinates of the EpitrochoidCurve. One equation will calculate the X–axis coordinates. A different equation will calculate the Y–axis coordinates. 

The parametric equations for the family of epitrochoid curves are: Px = (a+b)*cos(Θ) – h*cos((a+b)/b)*Θ) Py = (a+b)*sin(Θ)  h*sin((a+b)/b)*Θ) ParametricConstants a = radius of the fixed circle b = radius of the rolling circle h = distance to the point, P, from the center of the rolling circle IndependentVariable Θ = the independent variable: 0 to 360 (0 or 2×pi) 

The parametric equations, above, give the family of Epitrochoid Curves. Thus, if you change a ParametricConstant  a, b, h  you will plot a different EpitrochoidCurve. There are two procedures to enter different the parametricconstants in the Math FB. Procedure 1: Enter the actual values for the ParametricConstant  a, b, h  explicitly in the Math FB. For example, enter the values 110, 20, 14 for each constant. To plot a different Epitrochoid Curve, we open the Math FB dialogbox to edit the parameters. Procedure 2: Specify a constant in a Gearing FB as the input to the Math FB To plot a different Epitrochoid Curve, edit the Gearing FB to change a parametricconstant. Or, even more efficient, add the parameters in the Gearing FB to a DesignSet. 
The Mechanical model in MechDesigner Because we will use Parametric Equations, it is very convenient to use the standard model of Piggyback Sliders.
The Piggyback Sliders are now in the graphicarea. 
Add a Math FB
The Math FB is now in the graphicarea. Open the Math FB dialogbox
The Math FB dialogbox is now open. 
InputConnectors There are three(3) ParametricConstants (a, b, h), plus the Independent Variable (Θ) STEP 1: Add four(4) inputconnectors:
OutputConnectors We need a total of two(2) outputconnectors as we will calculate parametrically the motion of the Xaxis Slider and the Yaxis Slider There is one outputconnector when we add the Math FB to the graphicarea. STEP 2: Add one(1) outputconnector (a total of two(2) outputconnectors):


Output Data Type The Units at the outputconnectors from the Math FB are set with the Output Data Type. STEP 3: Change the Output Data Type to Linear Coordinates:
Default Equations and DataChannels and OutputConnectors Note  See image above for

The parametric equations for the family of Epitrochoid Curves are: Px = (a+b)*cos(Θ)  h*cos((a+b)/b)*Θ) Py = (a+b)*sin(Θ)  h*sin((a+b)/b)*Θ) We must rewrite these equation with the correct syntax for the Math FB. Each of the four(4) parameter we connect to an inputconnector has a wirenumber (0, 1, 2, 3) and a datachannel (p, v a). We use the p datachannel for the parameters. The v datachannel of a constant is equal to zero(0). Therefore, in the parametric equations we: STEP 1: Enter the Parametric Equations for the two outputconnectors


The equations in the Math FB are now: 
Define the 3 ParametricConstants
Note: I have entered a = 120, b = 40, h = 40 <<< Gearing FB dialogbox : Add after Gearing Ratio for the ParametricConstant 'a' Add the IndependentVariable
Connect the FBs
Add a TracePoint


Gearing FB: Add after Gearing Ratio parameter 

Add a DesignSet and add to it the three ParametricConstants.

Epitrcohoid Curve  Position Equations Only

When we choose 120 for Parameter a, we can enter 60, 40, 30, 20, 10 as factors for Parameter b. Each will give a continuous, endless, EpitrochoidCurve. •If Parameter h > b, there is a loop in the EpitrochoidCurve. 