Tag Archives: interlocked gears

Draw gears in C#

This example uses the following DrawGear method to draw gears. // Draw a gear. private void DrawGear(Graphics gr, Brush axle_brush, Brush gear_brush, Pen gear_pen, PointF center, float radius, float tooth_length, int num_teeth, float axle_radius, bool start_with_tooth) { float dtheta = … Continue reading

Posted in algorithms, animation, drawing, graphics, mathematics | Tagged , , , , , , , , , , , , , , , | 1 Comment

Animate gears with unequal sizes in C#

The example Animate gears in C# shows how to animate three interlocked gears. Juan Manuel Montes asked, “What if the radius of the green gear is greater?” When two gears or wheels touch each other, their outer edges must rotate … Continue reading

Posted in algorithms, animation, graphics | Tagged , , , , , , , , , , | Leave a comment

Animate gears in C#

The example Draw gears in C# explains how you can draw gears in C#. That example only needs a couple small changes to animate the gears. The previous example starts drawing with angle theta = 0 so the first part … Continue reading

Posted in algorithms, animation, graphics | Tagged , , , , , , , , , , | 2 Comments