Python Graphics: Combining Raster and Vector Pictures
Dec 03, 2010, 22:34 (0 Talkback[s])
(Other stories by Mike Ohlson De Fine)
[ Thanks to Ramsai
for this link. ]
"Vector graphics can be shrunk and expanded to any size
and in any direction using simple algebra. They can be animated
with rotations using basic trigonometry. Raster graphics are
limited. They cannot be resized or rotated dynamically while the
code is executing. They are more cumbersome. However, we can get
tremendous effects when we combine both vector and raster graphics
together. The one thing that Python cannot do is to rotate a GIF
image by itself. There are ways of mimicking rotation reasonably
but there are limitations you will appreciate after trying out some
of these recipes. PIL can rotate them, but not dynamically on a
Tkinter canvas. We explore some possibilities and workarounds here.
"In this article by Mike Ohlson de Fine, author of Python 2.6
Graphics Cookbook, we will cover:
* Simple animation of a GIF beach ball
* The vector walking creature
* Bird with shoes walking in the karroo
* Making a partially transparent image with GIMP
* Diplomat walking at the palace
* Spider in the forest
* Moving band of images
* Continuous band of images
* Endless background – a passing cloudscape"
Complete Story
Related Stories:
- OpenCart FAQs(Dec 03, 2010)
- Introduction to Blender 2.5 Color Grading - A Sequel(Nov 23, 2010)
- Apache Felix Gogo(Nov 17, 2010)
- Koha's Web Installer, Crontab, and Other Server Configurations(Nov 16, 2010)
- Introduction to Blender 2.5: Color Grading(Nov 15, 2010)
- Creating a Layout Example in Inkscape(Nov 11, 2010)
- Logos in Inkscape(Nov 04, 2010)
- Linux and borrowing library ebooks(Oct 28, 2010)
- Blender 2.5 Lighting and Rendering(Oct 27, 2010)
- Blender 2.5: Creating a UV Texture(Oct 25, 2010)