Subscribe to
Posts
Comments

Anatomy of a Portrait

I’ve been rather neglectful of this blog. I’ve been putting my coding on hold for a bit while I painted a portrait of my father for my mothers birthday and as a mothers day gift. This is only the third portrait I’ve done, and my first in color. It was much more difficult than I thought it was going to be, artistically and emotionally. For those of you didn’t know, my father passed away last July after a four and a half year battle with mantel cell lymphoma.

It was really quite therapeutic in a way. Before doing this painting, when I thought of my father it was difficult to not to see him, even in happy memories long before he was ill, in the frail and sick state he was in when he passed. After studying a portrait of him for some 30+ hours, I think I’ve finally overcome those memories and can see him again as the happy healthy man he was for his life leading up to those final few months.

The application I wrote to display the images reads in an XML file that contains paths to the separate images in the sequence. It then has the “set percent” function to display the images and fade them in between.

/**
*	@private
*	Adjust the image to show the progress at the desired percentage
*/
public function set percent(n:Number):Void {
// Make sure the percent is between 0 and 100 or throw an error
        if(0 > n or n > 100){
throw new Error(“ERROR:  percent must be between 0 and 100″);
}
// Convert the number in to a decimal
        n /= 100;
// Figure out where in the sequance of images the image should be
        var visabilityRatio:Number = (__imageMovieClips.length- 1) * n ;

// Set the “current” image to be fully visiable
        var clipAtFullVisability:Number = Math.floor(visabilityRatio);
__imageMovieClips[clipAtFullVisability]._visible = true;
__imageMovieClips[clipAtFullVisability]._alpha = 100;

// Go through and make all other images not visible so that
        // if a user skips from one percent to the next they aren’t seen
        //  This also helps with performance since invisible movieclips don’t
        // require rendering at all, where 0 alpha still process.
        var len:Number = __imageMovieClips.length;
for(var i:Number = 1; i < len; i++){
if(i != clipAtFullVisability and i != clipAtFullVisability+1){
__imageMovieClips[i]._visible = false;
}
}

// Figure out the percent of the next movie clip to show.
        if(clipAtFullVisability != __imageMovieClips.length - 1){
var percentToShowNext = (Math.round((visabilityRatio - Math.floor(visabilityRatio))*100))*.01
__imageMovieClips[clipAtFullVisability + 1]._visible = true;
__imageMovieClips[clipAtFullVisability + 1]._alpha = percentToShowNext * 100;
}
}

Hope you like it! If someone wants, I can post the entire image progression class.

Showing what you were trying to paint is always a delicate process… by switching back and forth quickly its pretty easy to see all the errors I made a long the way, but thats what makes it a painting! If I wanted an error free photo quality image, I could just keep the photo :)

3 Responses to “Anatomy of a Portrait”

  1. on 09 Jun 2007 at 8:08 amJared

    Wow, that is seriously amazing! I’m posting this to Digg.

  2. on 17 Jun 2007 at 5:32 pmJane Jochims

    Danny,
    Your portrait of your dad is a wonderful tribute to him. Bruce and I are at your mom’s house and she just showed it to us! I’m glad you found it therapeutic, too. Healing comes in small ways, a long journey. Glad you could spend the day with your mom.
    Jane

  3. on 10 Aug 2007 at 3:37 amSandeep

    I am a budding Flash developer and liked your work on it alot. Can you please send me the entire image progression class. I want to learn a few things from it.

    Sandeep Ahuja

Leave a Reply