Graphics Programming with Perl

Total Page:16

File Type:pdf, Size:1020Kb

Graphics Programming with Perl Graphics Programming with Perl Graphics Programming with Perl MARTIEN VERBRUGGEN MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2002 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Sharon Mullins 209 Bruce Park Avenue Typesetter: Syd Brown Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-930110-02-2 Printed in the United States of America 12345678910–VHG–0605040302 To Margaret, because she thought that “Advanced RenderMan” should be the name of a Super Hero To Maxine, for being excited about appearing in this book contents preface xiii About this book xiii Who should read this book? xiv Coding practices xv Source code downloads xvi author online xvii acknowledgments xix about the cover illustration xxi Part 1 Foundations 1 1 Overview of graphics 3 1.1 Perl and graphics 4 1.2 The bits and pieces in graphics programming 5 1.3 Color spaces and palettes 7 RGB 7 ✦ CMY and CMYK 8 ✦ HSV and HLS 9 YUV, YIQ and YCbCr 12 ✦ Grayscale 12 Color distance 13 ✦ Reducing the number of colors in an image 13 1.4 Summary 14 2 Overview of graphics file formats 15 2.1 Some graphics formats 16 GIF 17 ✦ JPEG, JFIF 18 ✦ PNG 18 MNG 19 ✦ SVG 19 ✦ TIFF 19 2.2 Finding the size and type of an image 20 Image::Size 20 ✦ Image::Magick 21 Do it yourself 22 ✦ More on file size and information 24 2.3 Conversion of graphics formats 24 2.4 Summary 26 vii 3 Overview of tools and modules 27 3.1 CPAN 28 3.2 The tools 29 The Chart::* modules 29 ✦ Gnuplot 29 GD 29 ✦ GD::Graph, GIFgraph and Chart::PNGgraph 30 GD::Text 30 ✦ The Gimp 30 ✦ Image::Magick 30 Image::Size 31 ✦ Inline 31 ✦ OpenGL 32 PGPLOT 32 ✦ RenderMan 33 ✦ Term::Gnuplot 33 3.3 A note on module versions 34 3.4 Summary 34 Part 2 Creating graphics 35 4 Drawing 37 4.1 Drawing with GD 39 An example drawing 40 ✦ Filling objects 42 Drawing text with GD 43 ✦ GD’s built-in fonts 44 TrueType fonts and GD 45 4.2 Drawing with Image::Magick 46 An example drawing 46 ✦ Anti-alias and fuzz 47 Drawing by combining images 48 ✦ Drawing with paths 50 Drawing text with Image::Magick 51 4.3 Combining GD and Image::Magick 53 4.4 Drawing with Term::Gnuplot 55 4.5 PostScript and SVG 59 4.6 Summary 59 5 Creating charts 60 5.1 GD::Graph and friends 62 Preparing your data sets for GD::Graph 63 Controlling the look of your chart 65 GD::Graph and fonts 65 ✦ Saving your chart to a file 66 Bar and area charts 68 ✦ Lines, Points and LinesPoints charts 70 ✦ Mixed charts 72 5.2 The Chart distribution 74 Pareto charts 75 5.3 PGPLOT 76 PGPLOT devices 76 ✦ Example: A simple X-Y plot 77 Example: A contour plot 81 ✦ Example: Plotting a galaxy 84 5.4 Interfacing with gnuplot 85 5.5 Summary 89 viii CONTENTS 6 Graphics and the Web 90 6.1 The Common Gateway Interface 91 HTTP and CGI 91 6.2 Suitable image formats 92 Web safe color palettes 92 6.3 CGI and dynamically generated graphics 94 6.4 Forms and encapsulated graphics 96 6.5 Image collections and thumbnailing 100 Thumbnails with Image::Magick 101 Thumbnails with GD 102 ✦ Contact sheets with Image::Magick’s ✦ visual directory 103 Contact sheets with Image::Magick::Montage 104 An example application: A web photo album 105 Designing the data 107 6.6 Summary 121 7 Animations for the Web 122 7.1 Animation file formats 123 GIF 123 ✦ MNG 124 Macromedia Flash 124 ✦ SVG 125 7.2 GIF animations 125 7.3 Perl and animations 126 7.4 Repeatedly applying a filter 127 Example: making objects appear 127 Example: Zooming in on an object 129 7.5 Animated text 131 7.6 Animated charts 132 7.7 Animations with the Gimp 134 7.8 Summary 137 8 Resizing and combining images 138 8.1 Scaling and cropping an image 139 Image::Magick geometry specification 139 Cropping an image 140 8.2 Combining Images 140 Combining GD images 140 Combining Image::Magick images 142 Adding a watermark to an image 145 8.3 Summary 151 CONTENTS ix 9 Three-dimensional graphics 153 9.1 OpenGL 154 OpenGL library functions in Perl 155 Capturing your OpenGL output 157 Example: a planetary system 160 OpenGL summary 164 9.2 RenderMan 164 How to use the module and the BMRT 165 The RenderMan language binding for Perl 166 Example: A rotating cube of cubes 167 9.3 Summary 172 Part 3 Special topics 173 10 Writing your own graphics modules 175 10.1 Interface design 176 Coordinate transformation 180 Choosing your drawing primitives 181 Implementing the interface 182 10.2 An OO implementation of a clock 186 10.3 Summary 188 11 Controlling text placement 190 11.1 Determining text size 191 Text sizes in GD 191 Text sizes in Image::Magick 192 11.2 Aligning text in graphics 194 Aligning text with GD 194 Aligning text with Image::Magick 196 11.3 Wrapping text 197 The GD::Text modules 207 11.4 Summary 209 12 Manipulating pixels and transparency 210 12.1 GD and pixels 211 Example: rotating RGB values 211 Removing duplicate color palette entries 212 12.2 Image::Magick and pixels 213 Rotating RGB values 214 x CONTENTS 12.3 Convolution 215 Convolution with Image::Magick 217 Using Image::Magick's Convolve() method 224 Convolution with PDL 226 12.4 Alpha channels and transparency 229 Transparency and the GD module 229 Transparency and Image::Magick 230 How to view partially transparent images 233 12.5 Fast manipulation of image pixels 233 Using Inline::C 234 12.6 Summary 238 Part 4 Appendices 239 A Image::Magick introduction & reference 241 B Color space conversion algorithms 284 C Module code 288 references 293 index 295 CONTENTS xi preface Welcome to Graphics Programming with Perl. When Manning Publications contacted me to assess my interest in writing a book about graphics programming for the Perl language, I was a bit skeptical at first. I didn’t think there would be enough coherent material to write such a book, and I wasn’t entirely certain there would be much room for one. However, after doing some research I noticed that, in fact, there was a gap in the published material. The only book I could find that combined graphics programming and Perl was too general, and was largely a collection of recipes on how to use tools, many of which had no relation to Perl [1]. There were not enough references that described and explained how to achieve concrete graphics tasks in Perl. So I accepted the challenge and started working, with the goal of providing a book that would sum up the ways to work with graphics from within Perl, and to offer suf- ficient background information to improve the understanding of graphics program- ming and graphics in general. This work seeks to provide a programmer with enough fundamental knowledge and pointers to achieve the most common graphics program- ming tasks. I hope those goals have been realized. ABOUT THIS BOOK The objective of the book is to show how graphical programming projects may be accomplished. When commencing work on a program, you have probably formulated an idea of your goal, but you might not necessarily know how to reach it. In most cases all that is needed is a pointer to the right modules, tools, commands or techniques. This book aims at providing this sort of reference for graphics manipulation using the Perl pro- gramming language. The content includes a wide range of topics related to manipulation and produc- tion of graphics with Perl, including the creation, editing and combining of images, the development of libraries, interfaces and modules for graphics creation, massaging of text for graphics, the building of charts, as well as working with single pixels in images. This book is not meant as a reference work for the modules available for xiii graphics programming.1 For that you are encouraged to read the documentation that comes with the modules, which in most cases is satisfactory. This book is also not intended to be an exhaustive introduction to graphics in general, or a detailed expla- nation of graphics algorithms, although where appropriate, some graphics theory and algorithm description will be touched on. The reader is expected to have a basic knowledge of Perl. The programs and code fragments will be explained in terms of what they do and how they operate, and only occasionally in terms of what the Perl statements mean.
Recommended publications
  • Scaling a Content Delivery System for Open Source Software
    Scaling a Content Delivery system for Open Source Software Niklas Edmundsson May 25, 2015 Master’s Thesis in Computing Science, 30 credits Supervisor at CS-UmU: Per-Olov Ostberg¨ Examiner: Fredrik Georgsson Ume˚a University Department of Computing Science SE-901 87 UMEA˚ SWEDEN Abstract This master’s thesis addresses scaling of content distribution sites. In a case study, the thesis investigates issues encountered on ftp.acc.umu.se,acontentdistributionsiterun by the Academic Computer Club (ACC) of Ume˚aUniversity. Thissiteischaracterized by the unusual situation of the external network connectivity having higher bandwidth than the components of the system, which differs from the norm of the external con- nectivity being the limiting factor. To address this imbalance, a caching approach is proposed to architect a system that is able to fully utilize the available network capac- ity, while still providing a homogeneous resource to the end user. A set of modifications are made to standard open source solutions to make caching perform as required, and results from production deployment of the system are evaluated. In addition, time se- ries analysis and forecasting techniques are introduced as tools to improve the system further, resulting in the implementation of a method to automatically detect bursts and handle load distribution of unusually popular files. Contents 1Introduction 1 2Background 3 3 Architecture analysis 5 3.1 Overview ................................... 5 3.2 Components . 7 3.2.1 mod cache disk largefile - Apache httpd disk cache . 8 3.2.2 libhttpcacheopen - using the httpd disk cache for otherservices. 9 3.2.3 redirprg.pl-redirectionsubsystem . ... 10 3.3 Results....................................
    [Show full text]
  • Effective Perl Programming
    Effective Perl Programming Second Edition The Effective Software Development Series Scott Meyers, Consulting Editor Visit informit.com/esds for a complete list of available publications. he Effective Software Development Series provides expert advice on Tall aspects of modern software development. Books in the series are well written, technically sound, and of lasting value. Each describes the critical things experts always do—or always avoid—to produce outstanding software. Scott Meyers, author of the best-selling books Effective C++ (now in its third edition), More Effective C++, and Effective STL (all available in both print and electronic versions), conceived of the series and acts as its consulting editor. Authors in the series work with Meyers to create essential reading in a format that is familiar and accessible for software developers of every stripe. Effective Perl Programming Ways to Write Better, More Idiomatic Perl Second Edition Joseph N. Hall Joshua A. McAdams brian d foy Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.
    [Show full text]
  • Mastering Algorithms with Perl
    Page iii Mastering Algorithms with Perl Jon Orwant, Jarkko Hietaniemi, and John Macdonald Page iv Mastering Algorithms with Perl by Jon Orwant, Jarkko Hietaniemi. and John Macdonald Copyright © 1999 O'Reilly & Associates, Inc. All rights reserved. Printed in the United States of America. Cover illustration by Lorrie LeJeune, Copyright © 1999 O'Reilly & Associates, Inc. Published by O'Reilly & Associates, Inc., 101 Morris Street, Sebastopol, CA 95472. Editors: Andy Oram and Jon Orwant Production Editor: Melanie Wang Printing History: August 1999: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a wolf and the topic of Perl algorithms is a trademark of O'Reilly & Associates, Inc. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 1-56592-398-7 [1/00] [M]]break Page v Table of Contents Preface xi 1. Introduction 1 What Is an Algorithm? 1 Efficiency 8 Recurrent Themes in Algorithms 20 2. Basic Data Structures 24 Perl's Built-in Data Structures 25 Build Your Own Data Structure 26 A Simple Example 27 Perl Arrays: Many Data Structures in One 37 3.
    [Show full text]
  • Using Perl for Statistics: Data Processing and Statistical Computing
    JSS Journal of Statistical Software May 2004, Volume 11, Issue 1. http://www.jstatsoft.org/ Using Perl for Statistics: Data Processing and Statistical Computing Giovanni Baiocchi University of Durham Abstract In this paper we show how Perl, an expressive and extensible high-level programming language, with network and object-oriented programming support, can be used in process- ing data for statistics and statistical computing. The paper is organized in two parts. In Part I, we introduce the Perl programming language, with particular emphasis on the fea- tures that distinguish it from conventional languages. Then, using practical examples, we demonstrate how Perl’s distinguishing features make it particularly well suited to perform labor intensive and sophisticated tasks ranging from the preparation of data to the writing of statistical reports. In Part II we show how Perl can be extended to perform statistical computations using modules and by “embedding” specialized statistical applications. We provide example on how Perl can be used to do simple statistical analyses, perform com- plex statistical computations involving matrix algebra and numerical optimization, and make statistical computations more easily reproducible. We also investigate the numerical and statistical reliability of various Perl statistical modules. Important computing issues such as ease of use, speed of calculation, and efficient memory usage, are also considered. Keywords: Perl, data processing, statistical computing, reproducibility. 1. Introduction Statistics is often defined as the collection, presentation, characterization, analysis, and in- terpretation of data. The large availability of powerful computers and sophisticated software has meant that many of these activities are routinely solved by statisticians using powerful statistical systems.
    [Show full text]
  • Perl Cookbook
    ;-_=_Scrolldown to the Underground_=_-; Perl Cookbook http://kickme.to/tiger/ By Tom Christiansen & Nathan Torkington; ISBN 1-56592-243-3, 794 pages. First Edition, August 1998. (See the catalog page for this book.) Search the text of Perl Cookbook. Index Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z Table of Contents Foreword Preface Chapter 1: Strings Chapter 2: Numbers Chapter 3: Dates and Times Chapter 4: Arrays Chapter 5: Hashes Chapter 6: Pattern Matching Chapter 7: File Access Chapter 8: File Contents Chapter 9: Directories Chapter 10: Subroutines Chapter 11: References and Records Chapter 12: Packages, Libraries, and Modules Chapter 13: Classes, Objects, and Ties Chapter 14: Database Access Chapter 15: User Interfaces Chapter 16: Process Management and Communication Chapter 17: Sockets Chapter 18: Internet Services Chapter 19: CGI Programming Chapter 20: Web Automation The Perl CD Bookshelf Navigation Copyright © 1999 O'Reilly & Associates. All Rights Reserved. Foreword Next: Preface Foreword They say that it's easy to get trapped by a metaphor. But some metaphors are so magnificent that you don't mind getting trapped in them. Perhaps the cooking metaphor is one such, at least in this case. The only problem I have with it is a personal one - I feel a bit like Betty Crocker's mother. The work in question is so monumental that anything I could say here would be either redundant or irrelevant. However, that never stopped me before. Cooking is perhaps the humblest of the arts; but to me humility is a strength, not a weakness.
    [Show full text]
  • Programming Skills: a Look Back to Peer Into the Future
    Programming Skills: A look back to peer into the future. Pete Massiello iTech Solutions [email protected] Twitter: PeteM59 1 Prehistory • The first Programming languages predate the computer. • Languages were codes • 1890 Herman Hollerith – Census data Early programming When do we start? • The Analytical Engine, an important step in the history of computers, is a design for a mechanical general-purpose computer first described by English mathematician Charles Babbage in 1837. It was the successor to Babbage's difference engine, a design for a mechanical calculator. The Analytical Engine incorporated an arithmetical unit, control flow in the form of conditional branching and loops, and integrated memory, making it the first Turing-complete design for a general-purpose computer. • Programming supposed to be by punch cards. Analytical Engine: Built 63 years later ENIAC • Designed in 1942 General-purpose Electronic computer • Electronic Numerical Integrator and Computer (ENIAC). • Enormous speed advantage by using digital electronics with no moving parts. • Called Project-PX as its code name. • Started in 1943, completed in 1946 costing $500,000 ( $6,000,000 in 2010 dollars). • Designed to calculate artillery firing tables for the Army. • First project was computations for the hydrogen bomb. • Decimal based. Programming the ENIAC Operating ENIACs main control panel EDVAC • Electronic Discrete Variable Automatic Computer • Binary serial computer with automatic addition, subtraction, multiplication, programmed division and automatic checking with an ultrasonic serial memory. • Capacity of 1,000 44-bit words, later set to 1,024 words: 5.5KB • 6,000 vacuum tubes, 12,000 diodes, consumed 56kW of power, and covered 490 Sq. Ft.
    [Show full text]
  • MASS2, Modular Aquatic Simulation System in Two Dimensions, User
    PNNL-14820-2 MASS2 Modular Aquatic Simulation System in Two Dimensions User Guide and Reference W. A. Perkins M. C. Richmond September 2004 Prepared for the U.S. Department of Energy under Contract DE-AC06-76RL01830 DISCLAIMER United States Government. Neither the United States Government nor any agency thereof, nor Battelle Memorial Institute, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or any agency thereof, or Battelle Memorial Institute. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or any agency thereof. PACIFIC NORTHWEST NATIONAL LABORATORY operated by BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY under Contract DE-AC06-76RLO1830 Printed in the United States of America Available to DOE and DOE contractors from the Office of Scientific and Technical Information, P.O. Box 62, Oak Ridge, TN 37831-0062; ph: (865) 576-8401 fax: (865) 576-5728 email: [email protected] Available to the public from the National Technical Information Service, U.S. Department of Commerce, 5285 Port Royal Rd., Springfield, VA 22161 ph: (800) 553-6847 fax: (703) 605-6900 email: [email protected] online ordering: http://www.ntis.gov/ordering.htm This document was printed on recycled paper.
    [Show full text]
  • The Perl Data Language (PDL) – a Short Intro Karl Glazebrook
    The Perl Data Language (PDL) – A short intro Karl Glazebrook Monday, 17 October 2011 What is PDL? – Array processing oriented language – Multiple datatypes (ints, floats, doubles...) – Arrays are stored in C-friendly compact memory blocks – C-speed for array processing – Lots of numerical oriented functions $r = rvals(2000,2000); $sin = 10*sin(0.02*$r); imag $sin/max($sin)+grandom($r)*0.1; Monday, 17 October 2011 DEMO Monday, 17 October 2011 History Monday, 17 October 2011 Some key features High-level expressive coding 2D graphics uses familiar PGPLOT (support for multiple 2D+3D graphics libraries) Deep vectorization Access to all of Perl (CPAN libraries) – text processing, DB/SQL support, WWW interfaces,... Excellent FITS & astro support Fast Free Easy extension with C code (inline!) Monday, 17 October 2011 Deep vectorization $x = random(1000000); $median = medover($x); # 0D answer $x = random(100000,200); $median = medover($x); # 1D answer (200 elements) $median = medover($x->mv(1,0)); # 1D answer (100000) All vector functions operate at C speed and automatically ‘thread’ over extra dimensions Lots of functions for slicing, dicing, clumping, indexing and generally mixing up dimensions $x = random(10, 2000,2000,2); $median = medover($x->clump(1,2)->mv(1,0)); # answer is 10x2 Monday, 17 October 2011 Real World Example Something I did recently... DEIMOS sky spectrum Monday, 17 October 2011 Code ($w,$f) = rcols 'cooper-skyspec.dat'; Log sequence of FWHMs # Smooth with a series of gaussians Tmp column vector $fwhm = 10**(sequence(20)/10)
    [Show full text]
  • Introduction to MATLAB
    MathWorks Logo Introduction to MATLAB Markus Kuhn Computer Laboratory, University of Cambridge https://www.cl.cam.ac.uk/teaching/2021/TeX+MATLAB/ matlab-slides-2up.pdf 2020-09-28 19:05 a24d99d 1 What is MATLAB I high-level language (garbage collecting, var-len structures) I BASIC-like syntax, with elements from C, GUI IDE I basic data type: 2- or 3-dimensional floating-point matrix I most operators and functions work on entire matrices ) hardly ever necessary to write out loops I uses internally highly optimized numerics libraries (BLAS, LAPACK, FFTW) I comprehensive toolboxes for easy access to standard algorithms from many fields: statistics, machine learning, image processing, signal processing, neural networks, wavelets, communications systems I very simple I/O for many data/multimedia file formats I popular for experimental/rapid-prototype number crunching I widely used as a visualization and teaching tool 2 What MATLAB is not I not a computer algebra system I not a strong general purpose programming language • limited support for other data structures • few software-engineering features; typical MATLAB programs are only a few lines long • not well-suited for teaching OOP • limited GUI features I not a high-performance language (but fast matrix operators) got better since introduction of JIT compiler (JVM) I not freely available (but local campus licence) 3 Open-source MATLAB alternatives Similar to MATLAB, subset compatible: GNU Octave, SciLab, FreeMat Other high-level languages for technical computing: I R { focus on statistics and plotting https://www.r-project.org/ I Python { a full-featured programming language. Modules: • numpy { numerical arrays, fast linear algebra • matplotlib { MATLAB-like plotting functions https://matplotlib.org/ • SciPy { scientific computing, Pandas { data analysis, etc.
    [Show full text]
  • Extending and Embedding Perl
    Extending and Embedding Perl Extending and Embedding Perl TIM JENNESS SIMON COZENS MANNING Greenwich (74° w. long.) For online information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2003 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Tiffany Taylor 209 Bruce Park Avenue Typesetter: Dottie Marsico Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1930110820 Printed in the United States of America 12345678910–VHG–0605040302 To the Perl open source community contents preface xiii acknowledgments xv about this book xvi author online xix about the cover
    [Show full text]
  • Summary of Image and Plotting Software (IPS) Packages Collected
    Summary of Image and Plotting Software (IPS) packages collected for possible use with GLAST Science Analysis Tools For the Science Analysis Tools, we will need the capability to make plots, and display images on the screen. It would not be an efficient use of our manpower to write a custom set of plotting tools if we can find a package available that satisfies our needs. To this end the User Interface committee has settled on a list of basic requirements for science analysis graphics and have begun to look at some packages. The packages and their characteristics are contained in table 1 below. It seems quite clear that the choice of package is intimately related to the scope of what we want to do. For example if our tools only have to put up plots and images with minimal interactive analysis, then the plotting packages (the first group in table 1) are desirable. If we want to have more complicated interactions with the user and more extensive image manipulation (rotatable images, e.g.), then something more like a graphic toolkit would be desirable. If we decide to go the latter route and use a tool like Qt, then we need programmers to start working immediately to create the basic plotting classes and methods to ensure this does not hold up development of the science tools. The basic requirements have already reduced the number of packages to < 20, but we need to better define the requirements in greater detail to narrow it down to two or three packages. Basic requirements (IPS= Image and Plotting Software): 1) The IPS must be freely available for use, modification, and re-distribution.
    [Show full text]
  • Advanced Perl Programming
    ;-_=_Scrolldown to the Underground_=_-; Advanced Perl Programming http://kickme.to/tiger/ By Sriram Srinivasan; ISBN 1-56592-220-4, 434 pages. First Edition, August 1997. (See the catalog page for this book.) Search the text of Advanced Perl Programming. Index Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z Table of Contents Preface Chapter 1: Data References and Anonymous Storage Chapter 2: Implementing Complex Data Structures Chapter 3: Typeglobs and Symbol Tables Chapter 4: Subroutine References and Closures Chapter 5: Eval Chapter 6: Modules Chapter 7: Object-Oriented Programming Chapter 8: Object Orientation: The Next Few Steps Chapter 9: Tie Chapter 10: Persistence Chapter 11: Implementing Object Persistence Chapter 12: Networking with Sockets Chapter 13: Networking: Implementing RPC Chapter 14: User Interfaces with Tk Chapter 15: GUI Example: Tetris Chapter 16: GUI Example: Man Page Viewer Chapter 17: Template-Driven Code Generation Chapter 18: Extending Perl:A First Course Chapter 19: Embedding Perl:The Easy Way Chapter 20: Perl Internals Appendix A: Tk Widget Reference Appendix B: Syntax Summary Examples The Perl CD Bookshelf Navigation Copyright © 1999 O'Reilly & Associates. All Rights Reserved. Preface Next: Why Perl? Preface Contents: The Case for Scripting Why Perl? What Must I Know? The Book's Approach Conventions Resources Perl Resources We'd Like to Hear from You Acknowledgments Errors, like straws, upon the surface flow; He who would search for pearls must dive below. - John Dryden, All for Love, Prologue This book has two goals: to make you a Perl expert, and, at a broader level, to supplement your current arsenal of techniques and tools for crafting applications.
    [Show full text]