• RackAndPinion2[cnum, point, rad, axis, C] models a rack and pinion gear set. The center of the pinion (point) is constrained to lie rad units to the left of the rack (axis) and the angular orientation of the rack and pinion are related as per the pinion radius.• The constant C sets the initial orientation of the rack and pinion.• RackAndPinion2 constrains two degrees of freedom.

• The constant C is the distance, in the direction of axis, from the origin of axis to point when the x axis of the pinion body is parallel to the rack.• If the Euler solution method is specified, RackAndPinion2 generates three constraints, and adds one extra variable to the model. RackAndPinion2[cnum, point, rad, {alpha, guess}, axis, C] can be used to explicitly specify the name of the extra variable alpha, and its initial guess. Otherwise, a symbol of the form cnum is used.• RackAndPinion2[cnum, point, rad, {sym1, guess}, axis, C] can be used to explicitly specify the name of the extra variable and its initial guess. Otherwise, a symbol of the form cnum is used.• The first equation in RackAndPinion2 constrains point to lie rad units to the left of axis. The second, and optional third, equations relate the axial displacement of the rack to the rotation of the pinion.• See also: RackAndPinion1, SetConstraints, SetSymbols, SysCon, TwoGears2, TwoPulleys2.