Genetic Crossings (ICM Final Project Presentation)

[see more documentation: proposal, part 2, part 1]

Focus

For Heather Dewey-Hagborg’s Intro to Computational Media class at NYU’s Interactive Telecommunications Program, I decided my final project would involve creating a simulation incorporating the traits of people, nations, and religions, creating offspring who are summations of their genetics and environments.

Processing is a great language for easily visualizing data.  I early on realized I wanted to make a visualization as a study for Galapag.us, my eventual thesis for developing a reputation and identity system that centralizes all the data you’ve ever created about yourself and what others say about you so that you can develop algorithms and formulas for evaluating and comparing your results with others.

Inspirations

Visually, I was interested in karyograms, Punnett squares, chromosome stainings, and representations of solar systems.

 

Application

The sketch initializes a world and fills it with 5 people to start off with, Albert Einstein and Gisele Bundchen, and 3 random individuals.  Time begins, with each pass of the draw() loop aggregated and calculated into a rough approximation of years in time.

People have innate traits and characteristics saved into variables: strength, intelligence, wisdom, charisma, stamina, wit, humor, education, creativity, responsibility, discipline, honesty, religiosity, entrepreneurialism, appearance, money, gracefulness, stress, health, luck, talent at math, talent at art, talent at sports, whether employed, happiness, nationality, religion.  They are on a scale from 1-10, with 1 implying the most negative state and 10 being the best. (e.g. poor health vs. superb health, ugly vs. gorgeous, a stressed-out person vs. a carefree one, etc.)

They are born into nationalities/regions: USA, UK, Africa, China, South America, with the traits security, innovation, job opportunity, immigration policy, life expectancy, education, sanitation, standard of living, pollution, biodiversity, crime, political freedom, and nutrition.

They have religions/ways of life: Christianity, Catholicism, Judaism, Islam, Taoism, Buddhism, Confucianism, with the traits commercial, morality, hierarchy, and portability.

You can already see the terminology isn’t precise (nations vs. regions), and I’m missing tons of variables.  Had I more time to code in more negative effects, I would add personality traits like deception, violence, libido, etc.

God is in the sketch.  All people are connected with him.  He also has baller stats:

// who art in Heaven
  god = new Person(-1, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    0, 0, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, "God", "null", -2, -2, -1, 0, -1, 0, 1, 1100, 600);

Every pass through draw(), it’s determined whether 1) there’s a potential match (via the flirt() function), matching a male and a female (sorry, I didn’t have time to code in adoption et al), 2) there’s chemistry, and 3) if so, then sex().  Chemistry() requires a degree of likeness in appearance, money, religiosity, and some other superficial requirements. Then again, there’s also the matingDance.beer() function, which I’m particularly proud of:

else if (matingDance.beer(flirter1, flirter2)) {}

Social lubrication — some of the basic requirements for chemistry are, um, degraded, leading to easier baby-making.  This is also good for preventing my sketch from not having enough chemistry to produce offspring between the people.

Women between ages 18 and 50-ish are fertile (I had to adjust the numbers so that the sketch would work throughout its duration instead of the whole civilization losing an ability to breed by becoming too old) and need at least 5 “years” or something between babies before they can have another child.

boolean checkFertile(int _flirter1, int _flirter2) {
    int female = 0;
    boolean fertile = false;
    if (person[_flirter1].gender == "female" && person[_flirter1].alive == true) {
      female = 1;
      if ((currentYear - person[_flirter1].lastBaby > gestationRate) &&
       (person[_flirter1].age >= 18) && (person[_flirter1].age = 18)) {
        fertile = true;
      }
    }
    else if (person[_flirter2].gender == "female" && person[_flirter1].alive == true) {
      female = 2;
      if ((currentYear - person[_flirter2].lastBaby > gestationRate) &&
       (person[_flirter2].age >= 18) && (person[_flirter2].age = 18)) {
        fertile = true;
      }
    }
    return fertile;
  }

Children are created through matingDance.punnettSquare() of their parents.  The parents’ traits are averaged together and then some mutation is introduced for variability in the children.  I think I coded it so some traits change more than others, and some don’t change at all.

People can reach somewhere around 65-ish before death becomes a regular reality.  Once people die, they are removed from the population size, which is capped at 40 — allowing another child to be born somewhere if there’s less than 40 people alive.  The maximum number for the duration of the sketch is 90 people, so if 40 people are dead, up to 50 others can be alive.  The sketch starts to slow down once there’s more and more computation via people objects.

The orange-yellow buttons toggle between the main universe-like view and another view, which contains system stats and karyogram-like views of each person’s traits.  The traits are displayed as circles, with their sizes representing the size of the traits.

I made some formulas (or evolutions, as I call them) for actual vs. potential well-being.  This computes someone’s traits as he is born with, and after they are adjusted for quality of the nation and his religion.  This is then divided by the maximum well-being one could have in the same religion and nation.  Thus you get a ratio of actual vs. potential.  The goal is to bring these numbers as close together as possible, to see if a society is running at full efficiency.

In my fairly generous, unscientific, unsystematic world, people are STILL running far below efficiency.  The best of human achievement is squandered daily, not just by peoples’ own personalities and time constraints, but by poor maximization policy and by inflexible religious traditions.

I also coded in a happiness evolution:

int happiness(int i) {
    int happiness = person[i].health + person[i].money + person[i].stress + person[i].creativity + person[i].religiosity +
    round(nation[person[i].nationality].standardOfLiving / 10) + round(nation[person[i].nationality].pollution / 10) +
    round(nation[person[i].nationality].security / 10) + round(nation[person[i].nationality].crime / 10) + person[i].employed * 10;
    return happiness;
}

This computes someone’s happiness based on personal health, stress levels, creativity, religiosity, and his nation’s standard of living, pollution levels, national security, crime levels, etc.  It also relies on whether someone is employed or not.  Obviously this evolution needs a ton of work and far more variables.

My "EUDAIMONIA" Tattoo

The happiness metric and the actual/potential well-being ratio are key metrics that I want to spend more time nailing down.  I think these metrics are chasing Aristotle’s concept of eudaimonia, which I also have tattooed on my arm.  There’s more to life than money.  There’s all these other variables.  It could be said we are happiest (in a bigger sense) when we feel we are running at our maximum potential and can contribute to the world.  We need to be able to measure this and push it down to the individual level, so people can make better choices towards bettering themselves, and up to government level, so policymakers can make better policy to maximize a nation’s human and social capital.

Download/View

The code is too long to post here, but here’s a direct .txt link to the source .pde (w/ combined classes).  You can go see the sketch running at OpenProcessing.org!  Only thing about that is that it will run in a reduced-size window.  You can try to view the Mac .app version or the Windows .exe version, too.

The code is also now at Github.

Difficulties and Lessons Learned

I used a Hashtable at first, to try it out, but I quickly ran into limitations I didn’t know how to get around.  I would use pretty length functions to recast strings as integers and vice versa, and so on.  Eventually I got so pissed that I rewrote a lot of the code and Person classes so that everything was saved as an integer and then I could look up its “name” in a table via a function.  So the nations are coded as 0-5 or whatever, with 1 equaling the UK, etc.  Much easier to manipulate.  It also meant I could use the ID integer with arrays.

My code got long and complex quickly, so I had to split everything up into classes, just for organization’s sake:  Death, DrawFuncs, Evolutions, GetFuncs, MatingDance, Nation, Person, Religion.   I don’t think at this level of sophistication, I could really build more objects into the sketch.  I wanted to practice inheritance and polymorphism stuff but it didn’t come up.  Any ideas for refactoring?

I really hated recasting strings and integers.

I want to spend more time coding on happiness and actuality vs. potentiality.  What I learned was that you have to build a really large system sandbox before you can begin to tackle those metrics.  This includes modeling and simulating an environment to such a degree that it can begin to calculate and visualize your concept of what happiness is, since it pulls from so many dimensions of one’s life. (not just money, but also charity, family life, employment, etc.)

Ways to Expand

Still want to use real-time data from Galapag.us, fed in from its database into Processing.  Too much to do right now though.  I’d have to redesign my database as well as fix the sketch variables!

The algorithms and equations need a lot of tweaking to be more realistic.  For Galapag.us, I’m hoping to crowdsource algorithms for the most accurate ways to calculate somewhat qualitative figures.

I wanted to be able to introduce outside shocks (natural disasters, etc.) into the system, to see how it would affect various nations and personality types, to see who would be more resilient.

I would like to give random people innate superpowers or traits that are unique or very rare.  So that maybe when they turn 30, something is unlocked within them.  I guess I could also give them random diseases and genetic predispositions.

Conclusion

This project helped me get pretty solid on classes and functions and how to organize a sketch.  If I were to rewrite this, it would be far cleaner and more compact.  Mostly I’m appreciative of how much work it takes just to get to a level where you can start doing interesting network effects on large systems.  I barely scratched the surface, in about 1,590 lines of code, but I did manage to achieve perhaps 90% of the infrastructure that I hoped to build.  All of this helps me build a better reputation and identity system for Galapag.us and for my thesis.  I’m hoping the more solid I get on the infrastructure, the bigger breakthroughs I will have on the algorithms and crowdsourcing enablers that will be at the heart of Galapag.us.

8-Bit DNA

My ITP classmate Matthew Epler did his intro to computational media midterm on turning poetry into RGB colors, after playing with the concept of digital characters as ASCII values (see the ASCII Table).

“This project is the beginning of what I suspect will be an ongoing investigation of the relationship between language and code. In “Color of Language,” poems are translated into color via Processing, and then passed through a series of iterations involving one simple mathematical equation.”

This made me think about our example sketches where we could break down GIF images into pixels and then display each pixel differently (turn the pixels into ellipses, or search/sort them by brightness).

As I’ve been playing with the look of karyograms and DNA in other projects, I wanted to visually display 8-bit Nintendo characters as their representative digital DNA.  This brief Processing sketch reads in every pixel of the .gif image and outputs it all on one line instead of as an image with width and height, to give it a unique linear signature. Here is the result:

It would be pretty hard to guess the characters just from this representation, but each one definitely has its own digital signature.

The characters:

 = Link (Legend of Zelda)

 = Samus Aran (Metroid)

 = Mario (Super Mario Bros.)

 = Kid Icarus

 = Scrooge McDuck (Duck Tales)

noStroke();
background(255);
size(1400, 500);

PImage thisImg;

int numImgs = 5;
thisImg = loadImage("link.gif"); // filler

for (int i=0; i < numImgs; i++) { 
  switch (i) {
  case 0:
    thisImg = loadImage("link.gif");
    break;
  case 1:
    thisImg = loadImage("samus.gif");
    break;
  case 2:
    thisImg = loadImage("mario.gif");
    break;
  case 3:
    thisImg = loadImage("kidicarus.gif");
    break;
  case 4:
    thisImg = loadImage("scrooge.gif");
    break;
  }

  // displays 1 pixel x 20 pixel DNA lines for each Nintendo character

  color[] imgPixels = thisImg.pixels;
  int z = 0;
  for (int x = 0; x < thisImg.width; x++) {
    for (int y = 0; y < thisImg.height; y++) {
      color c = imgPixels[x + y * thisImg.width];
      fill(c);
      rect(z*1, 25*i, 1, 20);
      z++;
    }
  }
}

ICM: Final Project, Genetic Crossing

For my final project in Intro to Computational Media, I intend to improve upon my genetic crossing sketches. The sketch already has some rudimentary functions to combine traits from two parents to create offspring. I want to expand the procreation to include an averaging of the parents’ trait values, then adding in randomized “luck” which may skew offspring’s traits quite a bit. Ideally, I also want to implement age, which affects traits over time as well, but this means I’ll also have to code in the phenomenon of death. I might try to make height and weight fluctuate, and have certain traits improve or worsen over time.

Screenshot from the last iteration I worked on

I talked to my professor, Heather Dewey-Hagborg, and she recommended that I look into genetic algorithms to push myself further in this project.  This led me to Professor Daniel Shiffman’s “Nature of Code” class, which does deal with genetic algorithms and has sample sketches with functions named darwin() and classes named DNA, and deals with the concept of “fitness” for evolution.

I am not sure I want to implement “fitness” but I think I understand what it’s for when doing these sorts of sketches.  The ratios of influences upon the development of people (and things) fascinate me.  So I am very interested in how a person’s makeup of traits combines with environment and profound events (breakups, parents divorcing, personal trauma, etc.) and one’s innate personality to lead to how people become successful, mature adults.

I want to implement to a larger degree specific balances of traits within equations and algorithms for defining people, since that directly relates to my eventual thesis project, Galapag.us, an ecosystem for identity and reputation.  I would like the individuals to have loyalties to countries and to communities, and have that reflected in some degree by gravity, pulling them in certain directions.

I would like to have a pan-able interface where you can drag around the screen, like moving around on Google Maps.  Also I’d like to be able to zoom in and out to find interesting areas.  Heather and I talked about visualizing my entities/data better, perhaps changing from the differently-sized circles around a central circle, to more of an amoeba/cell-like look where the traits are contained within the cell’s walls/cytoplasm.

This led me to look at how others are doing data visualization in Processing.  I found Jer Thorp‘s guide, which was very useful.  It made me think about whether I could make the visualizations look more like chromosome staining/karyograms.

 

Instead of connecting to a MySQL database, which may get tricky, I might dump a comma-separated value document from the MySQL database and then read that into my sketch — the upside of this is that it’ll force me to be more proactive on the Galapag.us/database side of things.  The downside is I don’t want to try to do too much with the limited time I have to complete this project.

Part of my primary challenge is to visualize the data in a manner that makes at least some sense to a viewer, even with context pop-ups and menus, while still using a flexible data input source.  All of this within a framework that accurately demonstrates procreation, attraction, and movement according to human gravitational rules to create some signs of mass-scale life and A.I.

ICM, Genetic Crossing Part 2

[UPDATED for 11-10-27 homework: I intend to expand upon this sketch for my final project.  I’ve added functionality for offspring taking an average of the parents’ traits, but of course this is only one small aspect of where we believe we get our genes/traits/habits from.  While we may be born to smart parents, we may end up dumb.  So maybe weighing genetics vs. luck vs. environment vs. whatever will need to be the preferred future model.  Which is great, because it will dovetail nicely into my plans to create Galapag.us’s “evolutions”, or formulae hypothesizing what characters people are made up of.  So someone’s numbers may be range-bound via genetics but may leap way out of bounds with other factors playing a part.  What is the role of which country one’s parents are identified with in how one turns out?  I also need to add aging, and tracking of offspring from parents, perhaps seeing how the code determines procreation likelihood.

I would also like to patch the Processing sketch into my already-existing user database for Galapag.us in MySQL.  I suspect Processing might have some nice data visualization libraries I can use to feltronize the data I have already.]

For our homework this week, we were supposed to write some Processing code that creates multiple instances of an object. I took my genetic crossing homework from last week and expanded it.

Most notably, all the “persons” were turned into an array of Person objects.  I hashed out the sex() function more, but didn’t do a blend of all the characteristics, leaving it a randomized process for the time being.  But offspring of offspring could now reproduce via the flirt(), chemistry(), and sex() functions that calculate whether two random male-female pairs (sorry, I didn’t make adopt() or insemination() functions yet) find an attraction and mate.

I also added a new class for nations, creating the US, China, and EU.  I thought about checking each person object to see if it would be more attracted to a certain nation and thus gravitate towards it, but I was having problems either with how to move the persons accurately (weighting between preferences for the three nations) and also how to keep them from bunching up together so much that they are unreadable.  Everything is there though except for the requisite movement functions.  The nations draw squares based on the rating (1-10 scale) of their security, innovation, jobOpportunity, and immigrationPolicy.  Obviously this doesn’t include all variables but some to just test to see if it works.  I wanted the person-nation attraction to be based on intelligence vs. innovation (which I realize is not a very strong relationship always).

Pressing the space bar stops the looping so you can get a look at the non-moving sketch.  Mousing over the different person nodes pops up a box with that node’s precise data.

Demo and code below the jump:

Read More »

ICM, Genetic Crossings

For this week’s intro to computational media assignment, we were to re-factor some of our old code into a more object-oriented programming style.  It turns out my code from past weeks didn’t really make use of anything that could be turned into objects or modules, though I ended up using some Strings and some imported objects.  So I decided to write some new code focusing on the classes, constructors, and objects, so I could get some good practice with the concept.  OOP is extremely important to understand and I’ve had trouble learning it in the past when I’ve tried reading books on Java programming.

So my code this week is for genetic crossings in Galapag.us.  Genetic crossings, Punnett squares, remember those from high school?  You’d take two parents, map out the dominant vs. recessive genes, and predict what the offspring would look like.  And Galapag.us is my reputation ecosystem for calculating numbers using all the data each of us has generated in our lives, and pumping out formulas for different realms of our lives (like work, school, religion, reading, etc.).

I made a Person class so I could instantiate multiple people with different values for their “characteristics” like strength, intelligence, education, religiosity, etc.  Two people were instantiated with random values, and the other two were Gisele Bundchen and Albert Einstein.  I had each person randomly placed on the palette with each characteristic (18 in all, most on a scale from low to high, 1 to 10) represented by a circle filled in with a randomly generated color.  The circles are randomly placed around each person’s main body circle (full black).

I then wanted to make a sex() function that returned a new Person object.  So I had Albert and Gisele mate with each other.  This was more of a proof of concept than a fully-fleshed-out (giggedy) function, since all it does is average the values of Albert’s and Gisele’s “appearance” characteristic.  As you may expect, Gisele has a high attractiveness and Albert doesn’t (I didn’t have time to code in sexiness growing over time and relativity (heyohh) to intellect or charm).  The result of sex() generates a new object, person3, which is then displayed via draw() and person3.display().

I did manage to create a Hashtable object to store the characteristics and their values.  I still hate strict typecasting and the inability to create variable variables or arrays with string keys.  I am partial to PHP which is made for non-coders and also made for the web — I’m not used to having to be so strict about everything. :(

I also managed to figure out how to reference variables within specific objects (e.g. this.trait.get(“appearance”)) and then convert it to a string, then to a float, then to an int.  It shouldn’t be that hard though.  But I guess that’s Java-style and I’m not really using it in a real-worldy kind of way for this app.

screenshot

Obviously the design needs work.  Sometimes the people overlap each other, and the sizes of the circles don’t really reveal much of anything interesting.  It would have been nice to create mini-relationships between the different people, such as people in the same family sharing similar characteristics.  Or I could have randomized the sex() function based on appearance, intellect, compatibility (both single?), etc.

This seems like a good place to start for Galapag.us though, a building block for having peoples’ “characteristics” interact with each other so I can create formulas which compare the two or predict offspring or whatnot.

YAY FOR OOP! <3

Demo, code, and links below the jump.

Read More »

Intro to Computational Media: In This Together

Tonight came the dreadful news of Steve Jobs’ death.  The man was brilliant and dragged us all forward into a better world.  Unfortunately he was also very secretive and he did not allow us to embrace him and thank him and love him while we all knew he was dying.  For all he had given us, he could have let us given back.  But maybe that was his way.  He didn’t need us.  But I think we probably needed him.

Apparently Earthlink/Mindspring decided tonight to hold a night of internet silence in his honor, because my internet’s been down all evening.  Now I’m tethered to my Android phone, blogging on my MacBook Air.

Our assignment for ICM this week was to come up with a chance composition, similar to Iannis Xenakis or John Cage and their reactions against the chaos of the World Wars.  I feel like I’d come up with a chance composition with the “Call Your Mum” piece but wanted to do something similar to the Sol LeWitt drawing 92.  At the same time, I happened somehow across the OpenCV library, that also directly supports Processing. After a simple install, you can import the library into a Processing sketch and pull in a live video feed from your webcam, and then manipulate it.

After that, I quickly knew I wanted to add a pixelated random RGB color filter to grit it up, which lent itself to a low-fi pirate shortwave kind of look.  Then I was thinking about Desmond from LOST and his attempts to contact Penny.  Then I thought about the movies Children of Men and Minority Report and V for Vendetta and other dystopian future movies which I love.  But since once of my goals in the NYU-ITP program was to come back to positive themes, I made the user’s chat with the love interest, “cipher”, open to improving the situation through human connection, even if just through a shell prompt.  Once contact is established, the palette turns yellowish, with hopeful photos being shown subliminally.  When cipher wants to hear “it” one last time, almost anyone should understand that cipher wants to hear “I love you” one last time before it’s all over.  The user either figures it out, causing the tint to turn pink, for love, or the signal begins to get jammed, resulting in an inevitable disconnection without resolution of feelings.  The code is called “In This Together”, a reminder of the Nine Inch Nails song.

One thing I had some trouble understanding in the code was how strings are treated.  Since I’m used to PHP, I’m used to just declaring strings like any other variable, but Java treats arrays more strictly as something relating to single character arrays and pointers (at least, that’s what it seems like to me), so I’m not too sure I could safely navigate more string-based projects without running into huge errors.

To sum up, I don’t think I really did any functions within functions (sup dawg) to produce fractals or a random stochastic process composition like Xenakis did.  However, I did create some external functions and used the randomized RGB codes to create a pixelated video filter.  I did take in user input and use an algorithm within a function.

Demo movie:

Screenshots:


Code, download links, etc. below the jump:

Read More »

ICM Homework: Interactive Art Sketch

For this week’s homework in ICM, we were to create interactive art that was set up in a way that the end output will always be what you expect, regardless of what the user does to it.

I think some people interpreted these instructions as a call for a game, which I find interesting; why should games come to mind when the mind is pre-loaded with the words “goals”, “rules”, “structure”?  Isn’t there something to be said for Calvinball?

I’ve been mesmerized by my classmate Engin Ayez’s sketch “Disappearing Ideas” ever since he showed it in class.  I wanted to play with the idea a little further.  So full props to him for the creativity and inspiration.  What I wanted to do was convey a certain key message, “CALL YOUR MUM”, with the Processing language.

The structure of this is that each letter of the phrase is drawn in its own sector only during certain times (# of times the draw() function has been called), while ellipses are drawn periodically on top of the letterings, making them appear to fade out over time.

The ellipses were chosen because I felt they made the sketch look more like a painting than they would with drawn rectangles, which would give the sketch more of an algorithmic or mathematical fading away effect.

I also coded the ellipses to be drawn only when the user’s mouse is not in the correct sector, to symbolize how not focusing on the task (calling one’s mum) causes the idea to fade away from one’s mind.  The structure of the thought can be completely recalled and put back on track at any time, though, through re-focusing.

On key presses, the sector layouts with letterings will be drawn.  On mouse presses, the phrase will be printed out to screen at a random angle rotation and the user can draw the letters anywhere on screen.

Two things about the keyPressed() and mousePressed() functions.  They don’t seem to react reliably — I assume you have to time it right for when the draw() function is inactive.  Also, those functions seem to halt the draw() function during runtime…  I think I would prefer having separate events going off at the same time.

The redundant if..then loops could probably be reduced to a tighter looping algorithm, but there were so many variable parts that it didn’t seem worth the time at this scale.

Code, demo, etc. below the jump:

Read More »

ICM, Week 2: Nyan Cat Demonstrates Animation

For Week 2’s homework in my NYU-ITP intro to computational media course, we were supposed to rotate, animate, and translate an image.

We had been rotating circles in class, which made it deceptive for the homework, since a rotating quadrilateral or other non-circular shape will show a spinning object-type rotation instead of an orbit.  For example, here is my orbital circle code from messing around in class (JavaScript, Java).  We were supposed to draw a Sol DeWitt piece of progressively bigger circles radiating out from the midpoints of the four sides of the drawing area.

For my homework, I mostly wanted to play with animation via translation, not rotation, and I wanted to mess with the mouse pointer’s coordinates, having seen functions and variables for them in the Processing cheat sheet.

I was also looking for 8-bit sprites while in class and found that many libs existed.  One of my questions: how feasible is it to draw a 50×50 sprite into Processing like, say, a sprite of Mario?

Anyway, somehow I happened upon Nyan Cat, an internet meme featuring a flying Pop Tart-bodied cat, accompanied by a fast-paced cute cat song.  “Nyan” being the Japanese equivalent of “meow”.  In keeping with my goal of doing happy projects at ITP, Nyan Cat seemed perfect!

The result is this (static screenshot):

Demo, code, Java all below the jump:

Read More »

ICM, Week 1: Self-Portrait in Processing

For our first homework assignment in NYU-ITP intro to computational media, we were supposed to do a self-portrait in Processing. Being that I hate to be precise, but I’m also not an artist, I tried to mess with some code and experiment a bit, instead of coming up with pixel-perfect shapes. It’s no cubist work but it was a good exercise for just starting Processing. There are some loops in there, layering (making sure certain shapes fill below other shapes), etc.  I was trying to represent the circle loop from the class exercise, as well as include some primary colors from different tribes I’ve been a part of, along with text labels for explaining what they mean to an outside observer.

I’m horrible at drawing faces so mine ended up looking a little like a Lego.  The American flag for the torso, as that is what represents me most to an outsider, does not quite fit since I don’t know if one can fill a shape with an external image.  A more cubist, cartoony visage seemed to be more compatible with my drawing skills.  I enjoyed Ingen’s sketch of himself, where he just used sparse lines to create the shape of his face, as well as Kojo’s sketch, which was a great use of colored shapes, fewer bold lines, and more of a digital avatar-like appearance.

If I had more time, I’d probably want to make the whole image variable in size, so that I could duplicate it across the area of the “screen” size, to make it like a Warhol painting. It would also make the code more scalable, if I could adjust all the dimensions at once.

Here is a demo from the Javascript export (using Processing.js). If that doesn’t work, here’s the .jar.

Screenshot:

Demo and code below the jump:

Read More »