Author: Admin

  • Sprite Transform Animation

    The preceding hour saw the introduction of a powerful new Animation class that added color animation effect capabilities to Sprite objects. By subclassing Animation, we can create specific animation effects in reusable classes, such as the CycleColor class that demonstrated color cycling over time. There are many more possibilities with the Animation class that have…

  • Canon PowerShot G12, Advanced Techniques to Explore

    For most of this book, I’ve focused on how to take a great shot—one exposure, one image. But shooting digital opens other options that combine several shots into one better photo. The following two sections, covering panoramas and high dynamic range (HDR) images, require you to use image-processing software to complete the photograph. They are,…

  • Sprite Color Animation

    Getting Started with Color Animation The first important point to consider when building an animation system that works with the Sprite class without infiltrating the Sprite class—that is, without mucking it up—is to design the animation system in such a way that transform or change values are used, not the internal properties of Sprite. Animation…

  • Canon PowerShot G12, Directing the Viewer: A Word about Composition

    As a photographer, it’s your job to lead the viewer through your image. You accomplish this by utilizing the principles of composition, which is the arrangement of elements in the scene that draws the viewer’s eye through the image and holds their attention. As the director, you need to understand how people see, and then…

  • Managing Lots of Sprites

    Robot Trash Collectors Our example in this hour is a simulation of robot trash collectors. The robots are represented as white circles, and the trash items as red squares. The robot cleaners will look for the closest trash item and move toward it, getting rid of the trash when it is touched. Figure 11.1 shows…

  • Canon PowerShot G12, Making Water Fluid

    There’s nothing quite as satisfying for the landscape shooter as capturing a silky waterfall shot. Creating the smooth-flowing effect is as simple as adjusting your shutter speed to allow the water to be in motion while the shutter is open. The key is to have your camera on a stable platform (such as a tripod)…

  • Canon PowerShot G12, Easier Focusing

    There’s no denying that the automatic focus features on the G12 are great, but sometimes it pays to turn them off and go manual. This is especially true if you are shooting on a tripod: Once you have your shot composed in the viewfinder and you are ready to focus, chances are the area you…

  • Debugging IronPython Applications

    Understanding IronPython Warnings Warnings are simply indicators that something could be wrong with your application or might not work under all conditions. For example, if you use a deprecated (outdated) function, you might later find that the application refuses to work on all machines. You can use warnings for all kinds of purposes, including providing…

  • When Objects Collide

    Boundary Collision Detection The first type of collision test we’ll examine uses the boundaries of two rectangles for the test condition. Also called “bounding box” collision detection, this technique is simple and fast, which makes it ideal in situations in which a lot of objects are interacting on the screen at once. Not as precise…

  • Canon PowerShot G12, Where to Focus

    Large landscape scenes are great fun to photograph, but they can present a problem: Where exactly do you focus when you want everything to be sharp? Since our goal is to create a great landscape photo, we will need to concentrate on how to best create an image that is tack sharp, with a depth…