Monday, June 6, 2022

Computer graphics and user interfaces

The key to creating your own graphical user interfaces (GUIs) is apparent in the first letter of the acronym. The key is to create your own graphics. You can go a long way relying on pre built widgets, but then you aren't really creating your own GUI you are just using someone else's pre built graphics libraries as a crutch. By the same token you aren't doing programming your own way unless you create your own compiler.

The same is true for rather you are programming for a desktop application or a mobile device. Consequently, that is another area that can be universalized. In the same way that the JVM universalised computation, it is possible a universal API for graphics could be created (OpenGL presumably). There still will always be some interface differences between desktop and mobile devices, but they still share the same common graphical foundations.

The key to creating computer graphics in turn is a combination of geometry and mathematics on the one side and colour management and painting issues on the other. The mathematics used here is interesting because of its heavy use of geometry. In a sense computer graphics is just applied geometry, which makes nice for prospective geometers.

What would creating your own graphical components look in practice? In Swing this involves subclassing JComponent to make your own components. The key role of Java 2D then emerges here because you can then access it by overriding the paintComponent method to give your own component your own custom graphics. This is why Java 2D is so important to Java desktop applications.

Games are another area where custom graphics programming is essential. There is hardly any game that can be developed without doing a lot of custom graphics. You might be able to get fine making some desktop applications without doing custom graphics, but to me it is still essential. It is the center piece of any client side application really. So there is plently of motivation to look into computer graphics.

No comments:

Post a Comment