graphics

More Animation Curves than You Can Shake a Stick at

Core Animation is awesome. It makes doing a lot of complex, fancy animations downright easy. One of the really nice built-in features of Core Animation is the ability to use animation curves. These curves let you specify whether the animation happens linearly (at the same pace throughout the animation), or whether the animation eases in, eases out, or does both.

When you have to go closer to the metal and use OpenGL ES, you’re not so lucky. We don’t have animation curves provided for us in OpenGL ES. We have to interpolate ourselves. Fortunately, the math behind animation curves is straightforward. Plus, there are far more curves than just the four Apple offers.

I haven’t run across a good library for generating animation curves, so I’ve decided to release my animation curve functions as public domain (no attribute required, no rights reserved). Here is a graph of all the different animation curves I’m releasing:
Ease.png

Here is the original Numbers.app document that generated the graph, and here is the Xcode project that generated the data. The project also contains all the functions needed to plot these curves.

Apple doesn’t document which calculations they use for easing, but my guess is that they’re quadratic. I’m not sure, though, since many of the curves yield similar results.

All of the interpolation functions included in the Xcode project above take three inputs and return a GLfloat containing the interpolated value. The first parameter, t, is the percent of the way through the animation you want a value calculated for. This is a clamped float that should be in the range 0.0 to 1.0. Values above 1.0 will be treated as 1.0 and values below 0.0 are treated as 0.0. The second parameter, start, is the value when the animation starts. The third parameter, end, is the final value to be animated toward.

If you want to apply a curve to a CGPoint or Vector3D, you have to call the function multiple times for each component (x/y or x/y/z).

Have fun!

Here are the functions included in the project above:

Read more on More Animation Curves than You Can Shake a Stick at…

Monocle Studios Tutorials – iPhone Development with cocos2d-iphone

MGImageUtilities

MGImageUtilities is a collection of useful UIImage categories for iPhone and iPad developers, which may be particularly handy if you intend to support the Retina Display on iPhone 4.

I use these in my visual speed-dial app, Favorites for iPhone, and I thought you might find them handy too.

Read more on MGImageUtilities…

Harmony

Sci-Fi Hi-Fi » Blog Archive » How to Resize an NSImage

Sketch2Photo: Internet Image Montage

We present a system that composes a realistic picture from a simple freehand sketch annotated with text labels. The composed picture is generated by seamlessly stitching several photographs in agreement with the sketch and text labels; these are found by searching the Internet. Although online image search generates many inappropriate results, our system is able to automatically select suitable photographs to generate a high quality composition, using a filtering scheme to exclude undesirable images. We also provide a novel image blending algorithm to allow seamless image composition. Each blending result is given a numeric score, allowing us to find an optimal combination of discovered images. Experimental results show the method is very successful; we also evaluate our system using the results from two user studies.

Read more on Sketch2Photo: Internet Image Montage…

178 Free Icons: WooFunction Free Icon Set goes Live

WooFunction Icon Set: 178 Free Icons

A really great set of icons for free. Something that you’ve seen before on this blog, but I think this most recent free set shows just how far I’ve come since the first set, just over a year ago now. This new set of icons was made exclusively for WooThemes & with their help we’ve proud to offer you this fantastic set of icons for absolutely nothing!

Read more on 178 Free Icons: WooFunction Free Icon Set goes Live…

iconpaper

Icons themes and bckgrounds for the mac and mac apps

How to scale a UIImageView proportionally ? – Stack Overflow

I have a UIImageView and the objective is to scale it down proportionally by giving it either a height or width.

simple-iphone-image-processing – Project Hosting on Google Code

I've written a simple C++ class with an Objective-C wrapper that provides a set of common image processing tasks along with conversion to and from UIImage.

The code supports the following operations:

Read more on simple-iphone-image-processing – Project Hosting on Google Code…

Google Author link
Page 1 of 212