Art Is but Engineered Reality
Generating your own landscapes, moonscapes and sheepscapes right on your desktop.
by Marcel Gagné
Dare I say, François, that this 1999 Côte-Rôtie is transcendent? Sipping a fine wine like this, I am transported to new planes of existence. Of course not really, François, it is only an expression. It is a compliment that I pay the vintner for such a fine wine. Am I not still here with you in this very restaurant, looking at the menu for this month's engineering focus issue?
Reality and perception are uniquely personal experiences, mon ami, experiences all Linux users may explore if they wish. One of the great joys of the Linux environment is the freedom it provides to talented programmers the world over to create alternative ways of working and playing. Those of us who merely use, prepare and serve their creations can then share in those visions as well.
François, where are you, mon ami? Your attention seems drawn elsewhere. Ah, mes amis! Welcome to Chez Marcel. I did not realize you were already here. François, Vite! Fetch more of this wonderful wine for our guests immédiatement. Please sit, everyone. Be comfortable. François will return momentarily with more of the 1999 Côte-Rôtie I was just sampling, er, I mean, subjecting to quality control, of course. It may seem strange, mes amis, but François and I were just discussing the nature of reality and perception.
I have never truly gotten over my first view of a great fractal landscape. The breathtakingly real mountainous panorama, with its snowcapped mountains and nestled lakes, made me understand the sheer beauty of mathematics. If something as complex as a landscape or a fern or a galaxy could be reduced to a series of mathematical symbols replayed over and over again, there is definitely something starkly beautiful at the heart of the universe.
Using a little program called xmountains, you can recreate those dreamlike landscapes for yourself. Go to author Stephen Booth's web site (www.epcc.ed.ac.uk/~spb/xmountains) and get yourself the latest version of his program. Engineer a little reality, manipulate it and dress up your desktop.
With that, it is time to extract and build the source. Notice that I have created a temporary directory into which the source can be extracted. The files are, unfortunately, not saved within their own directory. Building xmountains consists of these simple steps:
mkdir temp_dir cd temp_dir tar -xzvf xmountains_2.6.tar.gz xmkmf make
Then you can copy the resulting binary (called xmountains) to wherever you see fit (perhaps /usr/local/bin). There are many ways to tweak the program's output with command-line switches, but in its simplest form you can just type xmountains & and watch the show. A full-screen window will open up with a randomly generated landscape. Every ten seconds the landscape will scroll a little bit to the left with newly generated terrain. To see the available options, use the -h option. Have a look at Figure 1 for a sample of xmountains' output.

Figure 1. A Mountainous Virtual Reality
Depending on the window manager you are using, it is possible to modify xmountains to write directly to the root window, thus providing a constantly changing fractal landscape. By default, the code does not allow for this, and the effect doesn't work well on all window managers. Consequently, the author did not make this option a default for the program. I decided to go ahead and make the changes. Perhaps, mes amis, you will try it as well. The change is an easy one. Modify your Makefile and look for the line that reads PROJECT_DEFINES =, and change it to look like this:
PROJECT_DEFINES = -DVROOT
Now do a make clean followed by a make and rerun the program with the -b switch. The resulting pixmap will be written to your desktop's root window. The results under KDE weren't great, but everything worked beautifully under Window Maker. As they say, mes amis, the mileage, it varies, non?
Creating virtual landscapes is just one of the many applications of creating art with fractals. If you would rather just get in there and start generating a little eye candy, you may not need to install any software whatsoever. Most Linux distributions come with a package called xscreensaver that includes a collection of, well, screensavers. What you may not know is that each screensaver is a program unto itself with its own capabilities. For instance, drift is a program for drawing recursive fractal flames. It can be called from the xscreensaver program or directly, like this:
/usr/X11R6/lib/xscreensaver/drift -background "Wheat"
This will open a window with drift endlessly generating fractal flames on a wheat-colored background. The default is black but you can play with the colors. If you would like a larger window, (for instance, 800 × 600) try adding the -geometry 800x600 flag. Remember that talk about the root window when we discussed xmountains? As far as window managers go, the same rule applies here, but you certainly can launch the program to generate dynamic art on your desktop with the -root flag:
/usr/X11R6/lib/xscreensaver/drift -rootDo you long for the call of nature? A little joke, mes amis. Perhaps mountains are not your thing but, rather, the untamed beauty of the forest. Maybe a little window in the corner of your desktop is in order—try forest from the same package. The path to the executable will vary depending on your installation. On my test system, these all live under /usr/X11R6/lib/xscreensaver.
forest -geometry 300x200When you are tired of this, try hopalong and experiment with fractal planes. You might also call up julia for some animated julia set fractals. What is that, you ask? Well, according to the documentation, the program “uses ifs {w0 = sqrt(x-c), w1 = -sqrt(x-c)} with random iteration to plot the julia set, and sinusoidally varied parameters for the set, and plots parameters with a circle.” (Aren't you glad you asked?) To round out the xscreensaver offerings for today, consider one of my personal favorites, imsmap. Figure 2 offers a view of my rather busy desktop with many of these programs running simultaneously.

Figure 2. Fractals, as far as the eye candy can see.
Your Linux system is a treasure trove of programs when it comes to creating virtual landscapes of surrealistic art. Another package that was likely installed as part of your distribution is netpbm or netpbm-progs. As part of that package, you'll find a program called pgmcrater that will create a cratered terrain using fractals, so that you end up with a virtual lunar landscape (as in Figure 3). Try this:
pgmcrater -x 800 -y 600 > crater.out convert crater.out crater.jpg
The second command is part of the ImageMagick toolset. The pgmcrater program generates images in a raw portable graphics format that gets dumped to a temporary file. I then convert the raw image into a JPEG, a format I can use to set a background image for my desktop. Incidentally, we could make those two commands into one with the following:
pgmcrater -x 800 -y 600 | convert - crater.jpg <center>

Figure 3. Is it the moon or pgmcrater
ppmforge -hour 10.5 -glaciers .5 -tilt 23.5 -ice .5 -width 800 -height 600 -stars 70 | display - <center>

Figure 4. Strange, new worlds are yours to create!
For those of you who are fans of backgrounds comprised of blue sky dotted with clouds, ppmforge does the trick as well. Try this version of the command:
ppmforge -clouds -width 800 -height 600 | display -
As you can see, inspiration is as close as your desktop. François, our guests are thirsty. Please, more wine.
One of your humble chef's favorite movies is Bladerunner, based on Philip K. Dick's novel Do Androids Dream of Electric Sheep?, a fascinating picture of reality if ever there was one. Dick's novel is the inspiration for our next encounter with alternative reality, Scott Drave's electric sheep. When you are lost for inspiration, pull your hands away from the keyboard, wait for this fascinating screensaver to kick in and prepare for a little electronic dreaming.
Here is the premise: when the screensaver starts, your screen will blank for a moment as the program connects to the server. Then, an animated “sheep” will appear. This sheep is actually an animated fractal frame created by the collaborative processing efforts of networked clients. New sheep (the resulting animation) are created every 15 minutes, 24 hours a day. It's hard to say that this is as useful as the Seti@HOME Project (another part of electric sheep's inspiration), but it is certainly very cool, non?
The nature of the high-resolution animations generated pretty much demands some kind of high-speed internet connection; a 56K modem may not be sufficient. If you are hungry to try it, may I recommend that you begin with a visit to electricsheep.org for your copy. Then, extract and build it like this:
tar -xzvf electricsheep-2.1.tar.gz.html cd electricsheep-2.1 ./configure make su -c "make install"
You can start the program and test it without going into screensaver mode by simply typing electricsheep. In this mode, it will occupy the root window background, so you may have to minimize your active windows. You can also pass the --help flag for a list of options. To use it as a screensaver with the xscreensaver package, modify (or create) your .xscreensaver file with electric sheep listed as one of the programs. In the following example, I have also set my screensaver timeout to two minutes:
timeout: 0:02:00 lock: True lockTimeout: 0:02:00 programs: \ electricsheep --nick "ChefMarcel" \nThen, start up xscreensaver with the command xscreensaver -nosplah & and wait. Figure 5 shows off one of the many sheep that appeared on your humble chef's screen.

Figure 5. Does your Linux system dream of electric sheep?
Speaking of dreams, mes amis, the hour grows late and we must soon close the restaurant. In order to help you sleep more comfortably tonight, François will refill your glasses a final time. François, s'il vous plaît. As usual, your visit to Chez Marcel has been a real pleasure. Dare I say dreamy? Non.
Finish your wine. Enjoy. Until next month. A votre santé! Bon appétit!

Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Trying to Tame the Tablet
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- Developer Poll
- Looking Good
1 hour 44 min ago - Hey God - You may not be
5 hours 57 min ago - Reply to comment | Linux Journal
8 hours 30 min ago - Drupal is an Awesome CMS and a Crappy development framework
13 hours 9 min ago - IT industry leaders
15 hours 32 min ago - Reply to comment | Linux Journal
1 day 8 hours ago - Reply to comment | Linux Journal
1 day 10 hours ago - Reply to comment | Linux Journal
1 day 12 hours ago - great post
1 day 12 hours ago - Google Docs
1 day 13 hours ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
Very Interesting Stuff
I am an avid fractal creator myself, and have recently gotten into using Ubuntu more often. I am going to have to try some of these out as it looks like I would enjoy creating other bits of eye candy as well.