In this Tutorial, we enter, in the Maths FB, the kinematic equations for the 'Epitrochoid Curve'.
To plot a curve, we need the position equations only.
The Epitrochoid Curve is a good example. We can compare the curve we get with the equations we enter in the Maths FB with the curve we can get with a GearPair, as provided in MechDesigner.
•  The Epitrochoid Curve given by a GearPair will be correct  it is found by MechDesigner! 
•  The Epitrochoid Curve given by our equations will only be correct when our equations in the Maths FB are correct! 
See Tutorial 14 and Epitrochoid Curve given by a GearPair.
We will use parametric equations in the Maths FB to calculate the X,Y coordinates of the Epitrochoid Curve. One equation will calculate the X–axis coordinates. A different equation will calculate the Y–axis coordinates. 

The parametric equations for the epitrochoid family of curves are:
Note: Replace 'a+b' with 'ab' to give a Hypotrochoid Curve. Parameters and Variables a = radius of the fixed circle: parameter 1 b = radius of the rolling circle: parameter 2 h = distance to the point, P, from the centre of the rolling circle: parameter 3 t = the independent variable: 0 to 360 (0 or 2*pi) Inputs: three 'parametricconstants': a, b, h ; and one variable: t Outputs: two: x and y. 

The parametric equations, above, give the family of Epitrochoid Curves. Thus, if you change a 'parametricconstant' (a, b, h), you will plot a different Epitrochoid Curve. You can use two different procedures to enter different values for the parametricconstants in the Maths FB. Procedure 1:
In this case, when you want to plot a different Epitrochoid Curve, you must open the Maths FB dialogbox to edit the parameters.. Procedure 2:
In this case, to plot a different Epitrochoid Curve, you edit the input to the Maths FB to change a parametric constant. We recommend Procedure 2 when you want to experiment with the parametricconstants. You can easily combine this method with a DesignSet FB. 
We will use Procedure 2. InputConnectors We need four inputconnectors: three parameters (a, b, h) and one variable (t)


OutputConnectors We need two outputconnectors to give the data separately to the X and Yaxes
The units for the outputchannel is dependent on the Output Data Type you specify.

Position Equations: X and Y The Epitrochoid Curve equations for the X and Y coordinates are given here again: The parametric equations for the family of Epitrochoid Curves are:
We must rewrite these in the correct syntax in the Maths FB. Each parameter or variable at the input is represented by: p(0) = a p(1) = b p(2) = h p(3) = t 

X = (p(0)+p(1))*cos(p(3))p(2)*cos(((p(0)+p(1))/p(1))*p(3))) Y = (p(0)+p(1))*sin(p(3))p(2)*sin(((p(0)+p(1))/p(1))*p(3))) I frequently enter the parameters without the brackets, then add the brackets last.

We connect the two outputconnectors of the Maths FB to the inputconnectors two MotionDimension FBs.
The TracePoint plots the Epitrochoid Curve  when the equations are correct! 

The Mechanical model in MechDesigner Because we will use parametric equations, it is very convenient to use Piggyback Sliders 

The 'Variable' Inputs to the Maths FB We will use MotionDimensions of a Slider as the Parametric Constant. The BaseValue of each MotionDimension FBs can define a, b, or h. The Linear Motion FB can be used as the angle, t, as the independent variable Note: You can also use the outputconnector of a Gearing FB. I find it better to use MotionDimensions. I can see their values in the graphicarea. 

The Maths FB  input variable connectors The Maths FB has four inputs to represent:


Maths FB  output variable connectorsThe Maths FB has two outputs:


Epitrcohoid Curve with Position Equations Only 
The TracePoint of the Piggyback Slider When you connect the Maths FB outputconnectors to the X and Y Piggyback Sliders, and we show the a TracePoint, then you can see the Epitrochoid Curve. You can edit the BaseValues of the Slider MotionDimensions to change the radius, the number of 'loops', and distance 'h' from the centre of the rolling circle to the point, P. Click the video to watch the sliders 'plot' the Epitrochoid Curve and the curve update as I edit the parameter: 'h'. 