Calendar
Author Archives: Matej Salković
Riding the Bézier wave
When working on 2D/3D graphic applications, animating various objects and moving them across the screen is very often a requirement. As a programmer or designer, sometimes you would like to have the freedom to move objects not only along straight, but also along curved lines. Solution to this problem – the Bézier curve – has been known for decades. Still, people unfamiliar with curves may find them a bit confusing at first. This article is not intended to be a comprehensive analysis of Bézier curves; rather, it should give a beginner just enough knowledge to get her/him started.
Read more
Leave a comment
Posted in Blog
A quick introduction to Python decorators
Decorators were introduced in Python 2.4 to provide a clean syntax for function wrappers. New syntax was not only applied to already existing Python built-in wrappers, but also enabled programmers to elegantly wrap any function or method with additional functionality.
According to the Python Glossary, a decorator is a function returning another function. This is a pretty vague description, so maybe it’s best to take a look at some code.
Read more
2 Comments
Posted in Blog
PyGTK widgets and custom signals
For readers not familiar with Python development, PyGTK is a set of Python wrappers for the GTK+ graphical user interface library. GTK+ derives it’s name from a seemingly endless array of acronyms: GTK stands for GIMP ToolKit, where GIMP in fact means GNU Image Manipulation Program, and finally, GNU is shorthand for ‘GNU’s Not Unix!’. In this article, I will describe a problem we faced while working on a Python-based CAD application. I believe that the simple solution we came up with provides a good introduction to PyGTK widgets and custom signals. Read more