Re: Picture on a ball canvas
Luis Menina <[email protected]>
| Newsgroups | gmane.comp.gnome.love |
|---|---|
| Message-ID | <[email protected]> |
Hi, Le 12/11/2011 13:37, Blagoj Kupev a écrit : > I'm really new in graphics and i have a task to develop a device that > will project a picture on a white ball, but the picture has to be > symmetrical. To achieve this, the picture should be modified/distorted > accordingly prior it is projected. To modification will mean that the > picture is created in a way that when it falls on the white ball will > look fully symmetrical. > > Since i'm new in technologies like GNOME that are used to create a > graphical interface, i'll need your help in getting directions where/how > in the GNOME framework to introduce a function that will modify the > final picture prior it is sent to the projector. > > The elements that should be projected are simple 2D components: text, > circles, triangles... This is a bit late, but what you need to start developing is available at http://developer.gnome.org . And what you need to use to draw stuff is cairo: http://cairographics.org/ http://cairographics.org/manual http://zetcode.com/tutorials/cairographicstutorial/ Drawing text and circles is quite easy. To distort your image, will need to play with the cairo_matrix_t type and set a transformation matrix. This helps in automatically the coordinates system, so you can draw with the best coordinates system for you, and the result is automatically converted to the coordinated system you need (a distorted one for you). Hope this helps, Cheers, -- Luis Menina