logo
首页技术栈工具库讨论
gl2ps
gl2ps
GL2PS: an OpenGL to PostScript printing library Christophe Geuzaine       Example: PS, EPS, PDF and SVG files created with the gl2psTest.c demo provided in the distribution. This illustrates the handling of smooth shading, intersecting primitives, line stippling, vector text rendering, multiple viewports and mixed vector/bitmap output. Compare with a PNG screenshot of the OpenGL window. Download The latest stable version of GL2PS is gl2ps-1.4.0.tgz. Older versions and nightly source snapshots are available here. For access to the Git repository use: 'git clone http://gitlab.onelab.info/gl2ps/gl2ps.git'. For questions and discussions about GL2PS see the gl2ps mailing list. If you think you have found a bug you can also file a report directly here. You can also subscribe to the gl2ps-announce mailing list to be notified automatically when a new version of GL2PS is released. To help fund GL2PS development, you can make a donation. Documentation Contents 1  Introduction 2  Usage     2.1  gl2psBeginPage and gl2psEndPage         2.1.1  Specification         2.1.2  Description and arguments         2.1.3  Return value     2.2  gl2psText and gl2psTextOpt         2.2.1  Specification         2.2.2  Description and arguments         2.2.3  Return value     2.3  gl2psDrawPixels         2.3.1  Specification         2.3.2  Description and arguments         2.3.3  Return value     2.4  gl2psSpecial         2.4.1  Specification         2.4.2  Description and arguments         2.4.3  Return value     2.5  gl2psEnable and gl2psDisable         2.5.1  Specification         2.5.2  Description and arguments         2.5.3  Return value     2.6  gl2psPointSize, gl2psLineWidth, gl2psLineCap and gl2psLineJoin         2.6.1  Specification         2.6.2  Description and arguments         2.6.3  Return value     2.7  gl2psBlendFunc         2.7.1  Specification         2.7.2  Description and arguments         2.7.3  Return value     2.8  gl2psBeginViewport and gl2psEndViewport         2.8.1  Specification         2.8.2  Description and arguments         2.8.3  Return value     2.9  gl2psSetOptions and gl2psGetOptions         2.9.1  Specification         2.9.2  Description and arguments         2.9.3  Return value 3  Example 4  Tips and tricks 5  Limitations 6  Contributors 7  Links 8  Versions 1  Introduction GL2PS is a C library providing high quality vector output for any OpenGL application. The main difference between GL2PS and other similar libraries (see section 7) is the use of sorting algorithms capable of handling intersecting and stretched polygons, as well as non manifold objects. GL2PS provides advanced smooth shading and text rendering, culling of invisible primitives, mixed vector/bitmap output, and much more... GL2PS can currently create PostScript (PS), Encapsulated PostScript (EPS), Portable Document Format (PDF) and Scalable Vector Graphics (SVG) files, as well as LATEX files for the text fragments. GL2PS also provides limited, experimental support for Portable LaTeX Graphics (PGF). Adding new vector output formats should be relatively easy; you can also use the excellent pstoedit program to transform the PostScript files generated by GL2PS into many other vector formats such as xfig, cgm, wmf, etc. GL2PS is available at http://www.geuz.org/gl2ps/ and is released under the GNU Library General Public License (see COPYING.LGPL). GL2PS can also be used under an alternative license that allows (amongst other things, and under certain conditions) for static linking with closed-source software (see COPYING.GL2PS).
partio
partio
Particles are an important part of effects work, because they allow free-form information in 3D space. Unfortunately, there is no standard format for particles akin to Wavefront .obj. Most animation systems have their own proprietary particle formats. For example Maya uses the binary and ascii particle database formats .pdb and .pda file formats. Houdini uses the .geo and .bgeo geometry uber formats. Renderers typically have their own point cloud format such as RenderMan's PTC format and Houdini's .pc. All of these formats share a common theme. They allow particles to be iterated or indexed and associate a customizable set of attributes with them. The goal of Partio is to provide a unified interface akin to unified image libraries that makes it easier to load, save, and manipulate particle files. Motivation At Walt Disney Animation Studios, we had used a mix of PDB formats, PTC formats and BGEO formats, depending on the authoring environments. Many of our tools supported more than one of these, but the code was scattered and copied to read these formats. Additionally, some of these formats required linking to large libraries to use. For this reason we desired a library that could read and write all of these file formats in a simple way. This would allow all of our tools to easily support all the possible formats that we could throw at them. It also allowed more flexibility in moving particles into proprietary packages without having to write an importer/exporter for every different tool. Major Features Supports Houdini's GEO and BGEO, Maya's PDB and PDA, RenderMan's PTC Arbitrary back end in-memory/cached formats can be supported from a single interface A Python API for easy scripting of particle manipulation A C++ API for high performance particle manipulation Nearest Neighbor Lookups for density estimation, Voronoi computation, etc. Future Plans A goal we have is to have an efficient cached and ordered format that allows nearest neighbor searches without an initial KD-Tree search and also can have only part of the particle set in memory at once. In our initial version of Partio, we have not created that format, because we would instead like to collaborate to design the appropriate format in the context of open source. Get Started Source Code at github Documentation Main API Documentation Python Tutorial C++ Tutorial Google Groups Discussion partio-discuss partio-announce Usage Examples Tools One handy thing that the Partio provides is simple command line tools to manipulate and example particle data.