Showing posts with label Processing. Show all posts
Showing posts with label Processing. Show all posts

Monday, April 29, 2013

JAVA: Genetic Algorithms {Week 12}


Chapter Nine in our text book, Nature of Code, the author discusses 3 strategies to implement genetic algorithm theories in software.  
  • The traditional computer science method
  • Interactive selection
  • Ecosystem simulation   

From my understanding, these theories are used mostly in the research side of the computing field, especially in AI and evolutionary computation.   After our class trip to ORNL last week, I imagine that most of the fields using the super computers also use evolutionary computation somewhere in their research. 



I think the fact that this chapter was my favorite chapter in the whole book, is a strong indication that I would have a lot of fun working on a team doing simulations in astrophysics at ORNL.  Or maybe in their brand new 3-D visualization lab…..  If I could just keep my head out of those clouds.  **Sigh**  

My Project for WEEK 12:  Sexy Lady Creator

Method:  Interactive Selection

Heredity and Variation:  Value ranges assigned by me (using the Nature of Code algorithm)

Selection:  "Fitness" levels are chosen by the user (after all, beauty is in the eye of the beholder)




Existing Variables:
Body Curvature
Body Height
Breast Radius
Smile Curvature
Smile Length

Other Possible Variables:
Eye Size/Color
Eye lashes
Lip thickness
Hair length/Color/Thickness
Skin Color
Personality

Notes:
This project was inspired by several subjects I have studied over the past few years including, Art History, Psychology, Statistics, and (obviously) Programming.  The basic idea I was forming with this project was an application that could be used for fun or to gather data on what people perceive as beauty.  The idea of gathering data on people's opinions of beauty is nothing new, but for some reason it never seems to get boring.   Maybe because the variables seem to change with every culture and generation.  I have read studies where scientists use pictures of real faces to survey what we think is attractive - based on overall measurements or bone structure.

My project is quite different, mainly because I use basic shapes that are "drawn" and merely imply a female figure.   I chose to use the female figure for this project (in my class of ALL guys) in hopes that I would get extra credit for the use of boobs.  :)  HaHa.  An application like this could have a much wider range of use though.  The basic concept of organizing shapes and lines in a way that is aesthetically pleasing is useful in every industry - architecture, marketing, advertising (print and web), manufacturing - people want to see beautiful things.  In my project, I was trying to focus more specifically on figuring out what design elements are aesthetically pleasing in animation.  Considering the recent reports that the global animation industry pulled in over $222 Billion last year, a fully developed application of this kind could be useful.   

I haven't done much research yet on the animation industry, but I'm sure there are studies out there on what users find pleasing in animation.  I have heard that eyes are a major factor in animation.... In fact, even Dr. Doofenshmirtz tried to use his "Big Sad Eye Inator" to rule the tri-state area in this Phineas and Ferb episode.   Here's a clip of the show for anyone who is not familiar with this hilarious series...



  

Monday, April 22, 2013

JAVA: Fractals {Week 11}

Moving right along in this Java class.... fractals.   Last semester was the first time I had ever knowingly been introduced to recursion and fractals.  At the time, calling a function from inside itself seemed messy, complicated, and cannibalistic.  I hardly understood what a function was, so I was not ready to think about how I could use recursion in my code.  I still found the Mandelbrot Set interesting and I thought the colors and patterns were very pretty, but that was as far as I could go with it at the time.

I found a random quote on Instagram one day that I don't completely understand, but for some reason it reminded me of me.  I had forgotten about it, but coincidentally, I thought of it again while looking at these fractals in class this week....
"Easily attracted, dangerous to distract me."
What does that even mean?  I don't know, but I'm sure there was a good reason it popped into my head that day, and I'm sure it relates to fractals... well, because, doesn't everything?

After this chapter, my new thoughts on Recursion: it is beautiful, powerful, and magical.  This time, looking at a section of the Mandelbrot set, I was completely intrigued by the patterns that were forming in the background space with one of the color combinations.


The strange thing is, I guess that's not really the background.... it's all fractal code, there is no background, it goes forever.  When we zoomed in and I saw the 3 dimensional effect, with the varied wobbly overlapping petals I just had to try and draw it!  I couldn't even come close.  I haven't kept a sketch book in years, and it shows. I probably could render something close (in greyscale with a pencil) if I spent some time on it.  





If I spent even more time, I could probably create a similar effect with acrylic paint too.  That's the thing though - I already know I can do those things.  I will always love working with materials with my hands, but I am in complete awe of how this effect is being produced with pixels on a screen.  That's actually one of the reasons I chose programming - it's all brand new to me.


In some ways, a screen doesn't seem that much different from paper.... except  paint is a pigment- it's a layer.  Pixels are light?   Anyways, seems like a fun new hobby for summer... you loose some you win some.



Local Fractal Artist:
I ran across the website of a fractal artist in East Tennessee - Steven Lareau - He has been working with Mandelbulbs - a 3-D version of Mandelbrot!  I thought it was pretty cool and I love to share the work of local artists, so check it out if you can.


Fractal Tree Branching

(click picture to see in action)



 My fractal field needs more work.  This will be all for now.