Generic Figures: using Category Theory to Model Diagrammatic Logic