跳转至

附录 C: 用于 2D 图形的 Gimp 和 Inkscape

Gimp and Inkscape for 2D Graphics

Gimp 和 Inkscape 是两个创建和操作二维图像的免费开源程序。Gimp 是一个绘画程序,主要关注于设置图像中各个像素的颜色。Inkscape 是一个绘图程序,它将图像表示为包含二维场景中对象信息的数据结构。绘画与绘图的区别在第 1.1 节中进行了讨论。

尽管这本书的主要焦点是三维图形编程,但获得一些二维图像处理程序的经验可能会很有用。这些程序展示了一些重要的概念,例如颜色操作、透明度、形状创建和编辑、贝塞尔曲线,以及(在绘图程序中)将图形对象分组到分层结构中。这些程序甚至在三维图形中也很有用,用于处理纹理图像。这个附录提供了 Gimp 和 Inkscape 的非常简短的介绍,但可能足以让你开始尝试这些程序,并激励你从其他来源学习更多关于它们的信息。

当我教授计算机图形学时,我经常包括一些关于 Gimp 和 Inkscape 的实验室课程。这个附录中的材料就是从这些实验室课程中改编而来的。虽然 Gimp 和 Inkscape 并不完全等同于商业程序 Photoshop 和 Illustrator,但它们是免费的,可以用于严肃的图形项目,而且它们拥有的功能远超过几个实验室所能覆盖的。

附录 C 的内容:

Gimp and Inkscape are free and open-source programs for creating and manipulating two-dimensional images. Gimp is a painting program; that is, it is primarily concerned with setting the colors of individual pixels in an image. Inkscape is a drawing program; that is, it represents an image as a data structure that contains information about the objects in a 2D scene. The difference between painting and drawing is discussed in Section 1.1.

Even though the main focus of this book is on programming for three-dimensional graphics, it can be useful to get some experience with 2D image manipulation programs. Such programs illustrate some important concepts, such as color manipulation, transparency, shape creation and editing, Bezier curves, and (in drawing programs) grouping graphical objects into hierarchical structures. And the programs are often useful even in 3D graphics, for working with texture images. This appendix offers just a very brief introduction to Gimp and Inkscape, but maybe enough to let you start experimenting with the programs and to inspire you to learn more about them from other sources.

When I taught computer graphics, I often included a few labs on Gimp and Inkscape. The material in this appendix was adapted from those labs. While Gimp and Inkscape are not quite the equivalent of the commercial programs Photoshop and Illustrator, they are free, they can be used in serious graphics projects, and they have far more features than can be covered in a couple of labs.

Contents of Appendix C: