Waterfall Spaceout

From setiquest wiki

Jump to: navigation, search

Contents

Waterfall Spaceout

iOSDevCamp 2011

2 setiQuest project representatives are attending the http://www.iOSDevCamp.org/ weekend in San Jose. This is a 3day hackathon for developing iPhone/iPhone apps. The event is taking place at the eBay/PayPal offices in San Jose. Nice place! $50 for the whole weekend, including all meals and beer! This is the best deal on the planet.

Iosdevcamp2011-room.jpg
The main event room. 460 attendees!


Jon-and-stefan-at-iphonedevcamp2011.jpg
Jon Richards and Stefan Gorzkiewicz are attending on behalf of setiQuest

eBay and PayPal Buildings

Thanks to PayPal for letting us use this wonderful facility for this event. I took some pictures of the buildings.

Ebay-building.jpg
The flowers were outrageously beautiful



Paypal-building.jpg

Hackathon Project

Stefan and I wanted to use this time together at this hackathon to quickly develop an app using the setiQuest Data waterfalls.

We had a lot of discussion about what to do. The criteria was the following:

The idea

Stefan is kind of a new-agey guy. We reviewed the waterfall pictures and their origin/purpose. He came up with a novel idea.

We call it
Waterfall Spaceout


The idea is for a psychedelic app. Slowly cycle through the waterfall images, blending in between them, maybe some pseudo coloring. We want to see if this is visually appealing, kind of hypnotic. And maybe signals will pop out at you.

This will involve a lot of experimentation.

Phase 1

We are developing a simple app to cycle through the pictures. See how this works and is there any viausl value in this? We'll see! --Friday evening July 15, 2011

We came up with a general idea. We will try to develop an app that quickly fades from one waterfall image to the next. You can rub your finger over the screen and the images adjust pseudo coloring.

--Jrseti 15:10, 17 July 2011 (PDT) First I set up an account on GitHub. See https://github.com/setiQuest/Waterfall-Spaceout. We had problems. Stefan had problems pushing to the repository. After hours of trying to figure this out we determined that my computer has the same problem. The end result was that the Git capability of Xcode is flawed. If we ran Git from the command line - all would work! So we are now using GitHub from the command line. Too bad we wasted so much time!

Phase 2

In this Phase we learned how much about iPhone programming we do not know.

We need to have a lot more experience and knowledge with Objective C and the intricacies of iPhone programming.

It is easy to create a simple app, but once you need to do something out of the ordinary it gets tough fast.

Displaying and fading images

We loaded 13 waterfall images into the project. We can easily display one. I set up a timer and was able to get the images to cycle. Then I was stuck, how do you fade in-between them?

We asked for help from an iOS guru here. He lead me down a path that helped me solve the problem.

In a timer:

UIImageView *myImageView = [[UIImageView alloc] initWithImage:[images objectAtIndex:imageIndex]];
    myImageView.bounds = CGRectMake(0,0,320,480);
    [myImageView setContentMode:UIViewContentModeScaleToFill];
    
    myImageView.center = CGPointMake(160, 240);
    myImageView.alpha = 0.0;
    [self.view addSubview:myImageView];
    
    [UIView animateWithDuration:1.0 animations:^{
        myImageView.alpha = 1.0;
    }];
    [myImageView release];

WaterfallSpaceout-first.png

Sorry, you can not see the cool fading of the waterfalls, but the images do quickly fade in and out of each other. Trust me!

Stephan was able to figure out how to get the finger events to work. So we have that code.

The next task was to figure out how to pseudo-color the images as they are fading in and out of each other. Off to the iOS Guru again.

Turns out to perform the pseudo-coloring I need to restructure my code, create a new class that subclasses UIView, and add the coloring functionality into the reDraw method. Doing that is not trivial.

I am now working on this code restructuring.

Conclusions

We learned a lot.

  1. We need to get more educated with iOS programming.
  2. I liked working with Stefan, I hope he'll continue the development with me.
  3. The code is checked into GitHub.

An unexpected result was my reaction after watching the waterfall images fade in and out quickly. It becomes a bit hypnotic. After 30 seconds your mind starts making up patterns that may or may not be there. So I am looking forward to getting the pseudo-coloring controls working, and tie it up to the setiQuest Data available. Maybe we'll add some ambient or psychedelic music.

I have never been to a hackathon before. It was a big learning experience. At the end a group photo was taken.


Iosdevcamp2011-group.jpg

Can you spot Stefan and Jrseti?

Next Steps

I'll continue working on the code. I NEED TO LEARN iOS programming! Any ideas would be appreciated. Anyone want to help?

The next hackathon I am going to is on August 6, 2011. http://www.eventbrite.com/event/1849414649

-jrseti

External links

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox