<< Click to Display Table of Contents >> Navigation: Getting Started Tutorials  MechDesigner > Tutorial 18: Math FB > Step 18.2: Velocity: Add a Cam to the Epitrochoid Curve 
We will show the difference between a 2DCam when:
•We do enter the VelocityEquation correctly
•We do not enter the VelocityEquation incorrectly.
A 2DCam is a good example, because MechDesigner must know the velocity of the CamFollower relative to calculate the correct CamCoordinates.
In this Tutorial Step, we symbolically differentiate the X and Y position equations, given in Step 18.1, to find the velocity equations.
We will enter those equations into the Math FB
MechDesigner does these calculations automatically with a GearPair. We are doing this as an example of how we can use the Math FB.
Symbolically differentiate the X and Y Parametric Equations for the EpitrochoidCurve with respect to Θ. These are the two Parametric Equations for the X and Y Velocity Components: PXvel = (a+b)*sin(Θ) + h*((a+b)/b) * sin((a+b)/b)*Θ) PYvel = (a+b)*cos(Θ)  h*((a+b)/b) * cos((a+b)/b)*Θ) As before we must replace: a with p(0) ; b with p(1) ; h with p(2) ; Θ with p(3) In the Math FB they are:  (( p(0)+p(1))*sin(p(3))) + p(2)*(((p(0)+p(1))/p(1)))*sin(((p(0)+p(1) ) / p(1)*p(3))) ((p(0)+p(1))*cos(p(3)))  p(2)*(((p(0)+p(1))/p(1)))*cos(((p(0)+p(1))/p(1)*p(3))) 
Position and Velocity Equations 
These are the 6 equations for the two outputconnectors As entered the Math FB: •Equations 1 & 2: Position and Velocity of the X axis •Equations 4 &5: Position and Velocity for the Yaxis •Equations 3 & 6: Default  acceleration for Xaxis & Yaxis respectively  not yet entered. 
Cut and paste the ParametricEquations into the Math FB dialogbox.

The two Sliders move with the parametric equations to generate the the Epitrochoid Curve But, can we add a 2DCam and get the CamCoordinates? We will find that if the Velocity equations are not correct, the Cam will not be correct. 

Add a CamFollower to the YSlider of the Piggyback Sliders


Add a 2DCam


Look closely at the Cam and the CamFollower.
You can see the contact between the 2DCam and the CamFollower. The 2DCam is not correct.


Check and correct the Velocity Equations in the Math FB. Now, the 2DCam is correct. Now you can get the CamCoordinates in the usual way. 