C Conferentia Proceedings
CILAMCE2017-0642 MESH GENERATION, ADAPTIVITY AND GEOMETRIC MODELING

Development of a class in the context of OOP for generic management of mouse events in a canvas in the MATLAB environment

Emersson Duvan Torres Sánchez1; Luiz Fernando Martha1

1 Pontifícia Universidade Católica do Rio de Janeiro PUC-Rio

doi:10.20906/CPS/CILAMCE2017-0642

Resumo

Teaching of applied computer graphics is of great importance in computational simulation of engineering problems. Currently, many user-friendly computer programs have improved this work, as is the case with MATLAB. The generation and manipulation of a geometric model, which is a more realistic and appropriate way to represent the problem to be studied, are very important steps in the computational simulation. The use of the mouse allows these steps to become more interactive and easy to understand. For this reason, in this work a generic class is developed in the context of object-oriented programming (OOP) in the MATLAB environment, which allows managing mouse events in a canvas. The objective of this OOP class is to be used as a base class in the development of graphics and interactive programs in MATLAB, mainly for educational purposes. In order to meet these expectations, an OOP paradigm was adopted, which enables the creation of reusable codes. Allied to this technique, the Unified Modeling Language (UML) is used, a graphic language that allows the visualization, construction and documentation of the development of an object oriented computational system. To determine the correct functioning and practicality of the developed class, two interactive applications are implemented in MATLAB; the first for the drawing of frame structures in 2D and the second to demonstrate the functioning of the Mohr circle for stress state.

Palavras-chave: object-oriented programming; unified modeling language; mouse events class; MATLAB; draw frame 2D; Mohr circle

Como citar

Emersson Duvan Torres Sánchez; Luiz Fernando Martha. “Development of a class in the context of OOP for generic management of mouse events in a canvas in the MATLAB environment”. XXXVIII Ibero-Latin American Congress on Computational Methods in Engineering. CILAMCE2017. 2017. DOI: 10.20906/CPS/CILAMCE2017-0642