September 29, 2011

A good day for patterns

I added a couple more rendering modes into a cellular automaton pattern generator I made in Processing. The results were amazing. Here is a slideshow showing some of the patterns. This is a neat way to visualize cellular automatons.

Here are a few highlights from the slide show:

September 14, 2011

More Voronoi

Some more Voronoi tessellations. These use non-random generating points (such as spirals, nested circles, and other curves), plus some good ol' Perlin noise in some cases.

While Voronoi tessellations look really cool, they are not the most visually intriguing patterns I've come across. My fascination with them lies more in the nature of what the patterns represent. They describe a kind of Utopian equilibrium among any group of points in space. Those points in space can be a generalization of real systems such as people in a crowd or cells in an organism.

September 5, 2011

my Voronoi

I recently learned of something known as a Voronoi tessellation. This is a really intriguing way of dividing a space up into a group of cells. The grid basically consists of a set of constructor points (the black dots in the pictures below) that are in some way distributed into the available space (randomly in this case). Each cell consists of all the points that are closer to a particular constructor than any other constructor. This creates natural divisions in the space that define the "personal space" of each constructor. This pattern represents a certain kind of equilibrium and is one of those things that occurs extensively in nature. In the crowding of cells for example. Understanding it allows those patterns to be uncovered and taken advantage of. I've read that it is used in determining which cell tower a cell phone is closest to (each tower being a constructor and the phone being a regular point in the grid).

In any case, I wanted to write my own algorithm to generate these patterns. I would have liked to have done this in a formal mathematical way. I settled for a more procedural approach. I wound up making two arrays. One to store the constructor points and one to store a random color for each constructor. I then iterate through every point in the grid. For each point I check its distance to every constructor and save the index of the nearest one. I then use that index to get a color and set the current pixel to that color.  This approach could be improved as it has some obvious inefficiencies. It's also not nearly as cool as defining the regions mathematically would be but it dose effectively display Voronoi tessellations for the given constructor points.

Here are some examples of the output:

 Read more to see more examples.

August 11, 2011

Tiny Patterns

I made a interactive pattern generator in Processing. Aspects of the pattern are controlled by moving the scrubs around the outside of the circle. It should be capable of generating over 4 billion unique patterns (some nicer than others). Here are a couple screen shots of it in action:

The patterns it produces tend to be quite intricate. You might need to look up close at your screen in order to really appreciate each pattern (not recommended with CRT's). These following images are the direct output from the program (click to see there full size (which actually isn't a whole lot bigger)).

Continue reading to see many more.

August 9, 2011

Paper Dome

I found a great project that an aspiring architect had made. They created a certain pattern in Rhino and then had that pattern cut out via a laser cutter. They then turned the cut 2D pattern into a 3D structure by placing a support rod in its center. The result was an inspiring and beautiful creation.

I decided to take on the task of creating one of these structures for myself. The main difference is that they had literally thousands of dollars worth of program and equipment at their disposal and I did not.

So my first step was to create the pattern in a printable format. In a few hours I wrote a program that generates the pattern based on a few customizable variables and exports it to PDF for easy printing. I wrote the program in Processing so this part was completely free. I made a few variations of the pattern and took them over to the print shop. I printed $0.90 worth of copies. Then I choose one I liked the most and spent about a half hour cutting each line by hand with a razor knife.

Here is the pattern I went with (it's scaled down a bit and saved as a PNG because Blogger won't let me post the PDF):
I found some cardboard, tape, and a nail that I already had around the house. Here are my final results:

For a total materials cost cost of under a dollar, and using a program I wrote myself, I'm pretty happy with the results. No question a laser cuter would create a more perfect structure though. The small deviations in the cuts by hand lead to uneven tension in the top of the dome. However, the individual dome you see here has an out of pocket cost of 15 cents. All and all, this was a fun experiment and I am quite happy with the results.

June 19, 2011

waves and ripples

    Here are some screenshots and video capture of a Processing sketch I made to show wave motion on a plane in 3D. This sketch is a lot of fun to mess with and it produces some really amazing looking results.

    Unfortunately neither the images or video show the beauty of watching these run at full speed in their native environment. The video is not good at all. I haven't found a nice way to capture video on my computer yet, the files are huge, the quality is poor, and the worst part is that doing the capture bogs down my computer making the sketch run abnormally slow and choppy. At least you can get a sense of what the motion looks like though. The images, while free of these issues, just don't capture the beauty of watching the plane freely wave and ripple. I think that, despite the limitations, these images and videos are still pretty awesome though and I hope you enjoy them.

Note: I forgot to turn off the [non-working] sound when doing the screen capture. Thats why the video has those crazy sounds.

This is a basic sign wave propagating from the center pf the plane.

From straight above:

and from other perspectives:

June 18, 2011

music visualization

A short low quality screen capture video of a music visualization I made in Processing. Unfortunately there is also no audio but the sketch in the video was reacting to the music playing at the time. This visualization built off work I've been doing with manipulating a grid of points in 3D. I will probably post more on that later.

June 11, 2011

Pattern Interference

Here are some interference patterns made from various manipulations on two overlaid point grids. Created with Processing.

June 10, 2011

More Intermediate Beauty

    Programming is an art and a science. Like most things in life, the fun is in the journey.
    Here I was working on creating my own noise generation algorithm. I had hoped to make something like Perlin noise. I wanted to take a shot at it before studying how others (including Ken Perlin) approached it. After making these I decided I better start studying. So far I've come to realize Perlin pretty much made his algorithms to avoid the approach I took (for really good reason). Still, I made some pretty pictures.


These were just a couple of screenshots from another project, I thought they looked awesome though.

Angle Reference Circle in Processing

When I think back to trig, I seam to remember 0 degrees always being horizontal and to the right of the center. That turns out to be pretty arbitrary. Different programming languages tend to have different ideas about what angle is considered 0. It's not a problem, just something you need to know in order to get the angels your expecting. The following image is of a sketch I made in Processing to show what it considers 0. Turns out it's down and vertical. I went ahead and made the whole circle with some tick marks for practice. The labels show the angle in both degrees and radians. The lines in the center are random, the numbers on them just show the order in which they were created. The code to create them later served as the base for the branches in the random recursion tree from my last post.
I made a screen shot and used it as a reference to help visualize angles while programming but without the overhead of having a Processing sketch running. Perhaps it could be useful to someone else as well. If someone wants a cleaner version without the center lines, let me know and i will add it. Or just make your own. Here is the code I used, simplified a bit though so it just draws the main circle with tick marks and labels but does not put those random lines in the center.

May 31, 2011

Random Recursion Tree

One of my favorite things about programming is all the interesting mistakes along the way. Here are a few screenshots during my progress towards creating a tree using recursion.

This one was my favorite. I just wanted to print the angles at each vertex. I forgot to dial down the number of branches and was presented this awesome number tree.

At this point I more or less had it working. I still plan to do more but here are a few shots of a working randomly generated tree using recursion.

April 16, 2011

You are what you speak

    Have you ever had a non-native English speaker tell you, "I speak in English but I think in my native language". Although I disagree with the details of that statement, I believe there are some interesting and meaningful thoughts to be taken from it.
    First of all, we don't think in any language. Our minds think in terms of concepts. In some situations, we associate words to our thoughts so quickly that it might be easy to reach the conclusion that we are thinking only in terms of those words. Also, it may be easy to confuse the process of internally preparing an idea for communication with the process of actually having that idea. Even when we don't actually plan to communicate the idea to others, language is such a part of daily life that we often create an inner-dialog for ourselves. This goes the other way as well. We quickly associate real meaning (the best that we can) with the words that we are encountering. So much so, that it can be easy to believe that a new idea was the product of those words, while forgetting that our minds first had to associate a real conceptual meaning with them. So quickly we move passed our own inner thoughts and start preparing them to be communicated.
    I would argue that there are many concepts and thoughts that words don't even begin to describe. For example, when we walk down the street or draw a picture, we invoke many concepts, we process (think about) those concepts, and we act upon them. And not just "subconsciously", or through "muscle memory". I mean real fully conscious thinking using the concepts that are at our minds disposal. It is not always necessary to put them into words.
    That being said, often times it is necessary to put our thoughts into words. Using words allows us to formalize our minds' concepts for communication. In general, an idea has more value if it can be passed on to others. Because of this, language does have a huge impact on our thought patterns. Communication is so important in our daily lives that we probably do restrict a lot of our thinking to what can be communicated. Some people might do this more than others. Perhaps when a person attests to acting on a feeling instead of reason, they are acting on a concept or group of concepts that are in fact meaningful to them yet can not be adequately adapted into the more formal nature of language. This does not mean that they were not thinking.
    I am a native English speaker. Often I've learned words from other languages that can not translate to a particular word in English. At best, there would only by synonyms for the foreign word. I assume the reverse is true as well. This is because the languages between varying cultures are derived from the use of different concepts. The concepts are not always radically different though. Occasionally I learn a foreign word that just 'fits' better than any English words I know. In those cases, it would take several English words to modify the base concept in order to communicate the same idea expressed by the single foreign word. For many of those cases, no amount of English words seem to describe the exact meaning.
    The words we know and use, also help us to build up a familiarity with certain concepts. This increases how likely we are to invoke those particular concepts. For example, I recently re-acquainted my self with the word factitious. Now I find myself using it several times a day. It can actually be quite irritating. I don't really want to think about that particular concept so often. So I am left with the conclusion that my thoughts are influenced by the words I use to describe them.
    This is the best argument I know for learning new words. Not just in your own language but in others as well. The words we know are tools for thinking as well as communication. They are not how we think, but they certainly affect what we think.