Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
Hi All,

I have read openGl a bit and have drawn a bit of rotating shapes etc..

But I need a situation where the view is splashed with random colors and when it is touched, it is changed to something like colours moving there. Lot of apps are doing this, but I would appreciate anybody giving me a pointer. May be if it is possible using core graphics and core animation also.

--ch
 

Attachments

  • touch.png
    touch.png
    45.1 KB · Views: 225
Hi All,

I have read openGl a bit and have drawn a bit of rotating shapes etc..

But I need a situation where the view is splashed with random colors and when it is touched, it is changed to something like colours moving there. Lot of apps are doing this, but I would appreciate anybody giving me a pointer. May be if it is possible using core graphics and core animation also.

--ch
I think what you will find is that often these things aren't just done simply.

For example, there probably isn't a function called
Code:
doThatSweetSwirlyThingWithColors(GLColor color, GLAwesomeness awesomenessLevel)

I'm trying to think of how I might accomplish this, and I'm not quite sure yet. Give me a minute.;)
 
Hi All,

I have read openGl a bit and have drawn a bit of rotating shapes etc..

But I need a situation where the view is splashed with random colors and when it is touched, it is changed to something like colours moving there. Lot of apps are doing this, but I would appreciate anybody giving me a pointer. May be if it is possible using core graphics and core animation also.

--ch
OpenGL it will be pretty tough, at least as far as I'm thinking of it. I would look into Core Animation and look into something I think is called Twirl Distortion.

Good luck!:)
 
Yes, this looks like a bitmap effect; I can't imagine anything in OpenGL that would do this.
 
twirl not found

I searched some twirl, the term is not found in core animation. Is there any more appropriate name for this transformation ?

--CH
 
Hi,

Looking at the image I'm not sure I know what the effect is exactly but it does look like something familiar. You can get a whole range of colour smudging effects by using a feedback loop. Say you have a rectangular region with some graphics in it. Grab it as an image and then draw it back to the same rectangular region but slightly rotated and enlarged or reduced. If you keep doing this you will get a swirly type thing. You can get some great effects if each time round the loop you seed some colour by drawing into the region. I would guess to achieve the effect in your image you would start off with a rectangle filled with orange and black. The origin for placing the rotated and scaled 'self' is offset to the bottom left. Alternatively you could use a convolution to do the same thing.

b e n
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.