A Framework for Automatic Algorithm Animation based on Design Patterns