Blog: [Blog Home] [Archives] [Search] [Contact]

Archive for the ‘Graphics Software’ Category

Creative Coding Software Tools: Processing, openFrameworks, Cinder

Thursday, April 14th, 2016

Creative Coding Software Tools:
Creative Coding Software Tools: Processing, openFrameworks, Cinder

In my previous blog post, Fresh Brewed Coffee Digital Art, I made mention of the fact that I create my digital art using software of my own design and that for those digital artists interested in pursuing this aspect of digital art creation, there were some alternative tools available. In that post I mentioned Processing, openFrameworks, and Cinder. I would like to take this opportunity to say a little more about each of these three options.

Processing

Starting with Processing, this is a framework and programming language that is built on top of Java, an object-oriented programming language. Like Java, Processing is free and available on a variety of platforms. Personally I use Processing on both Windows 7 and Ubuntu Linux. Because the Processing programming language was created for artists and musicians with little or no programming background, beginners can quickly be up, running, and creating with this wonderfully flexible software tool. The flexibility of Processing as an environment for creative coding is expanded by the abundance of third party libraries that have been made available. It is also the most flexible tool in terms of the variety of platforms it works with. I have taken advantage of the ability to write Processing sketches for the web using the Javascript version of Processing (Processing.js) as well as for creating Android apps and for interacting with the Arduino (see The Arduino Starter Kit – Official Kit from Arduino with 170-page Arduino Projects Book). For those new to programming and creative coding, Processing is my number one recommendation.

Processing Resources

The main Processing web sites are:

Following are three books on Processing that I recommend and own. There are a number of other books on Processing that are also quite good. Please be aware that Processing is now on version 3 and version 2 is still widely used but do avoid any book that was written for version 1 of Processing.

openFrameworks

Like Processing, openFrameworks is also free and available on multiple platforms. In fact I even had the opportunity to write some openFrameworks programs on a Raspberry Pi (see CanaKit Raspberry Pi 3 Ultimate Starter Kit – 32 GB Edition) that was running the Raspbian operating system. The primary difference between Processing and openFrameworks is that whereas Processing is a framework that sits on top of the Java programming language, openFrameworks sits on top of the C++ programming language. Personally I find openFrameworks to be somewhat more challenging than Processing, particularly with respect to the use of off-frame buffers in conjunction with OpenGL. And by challenging, I am speaking in terms of the number of lines of code I must write in order to achieve some objective.

openFrameworks Resources

The main web sites for openFrameworks are:

There are not nearly as many books about openFrameworks as there are about Processing but the two that are most worthwhile are:

If you are searching on Amazon for books about Processing and/or openFrameworks, you may come across the book Programming Interactivity: A Designer’s Guide to Processing, Arduino, and openFrameworks by Joshua Noble. My advise is do not buy this book. It is quite out of date and the source code for the examples never was made available.

Cinder

Cinder is a third creative coding platform and, like openFrameworks, relies on the C++ programming language. I have no personal experience with Cinder but I will say that when I was investigating openFrameworks vs Cinder as a creative coding toolset for the C++ environment, openFrameworks won out.

Cinder Resources

The main Cinder web sites are:

There are even fewer books about Cinder than there are about openFrameworks. Two books you will find on Amazon are:

I hope you’ve found this information useful. I also hope that, even if you are not a digital artist or musician or programmer, you check one or more of these creative coding toolsets because you never know – you just might have a knack for creative coding.

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It


Learning YouTube and Movie Maker

Wednesday, September 11th, 2013

Movie Maker Masters of Lightning Screen Shot
Movie Maker Masters of Lightning Screen Shot

I’ve decided to dive into the world of publishing videos on YouTube. I had given it some thought last year after creating a CG animation but took no action. I recently created another animation and decided it was time to take action. The videos I have or plan to create are of four types:

  1. computer graphic animations I’ve created
  2. instructional CG videos based on lectures I’ve given
  3. promotional CG videos for my art
  4. videos I’ve shot at events

Before publishing any videos to YouTube I decided to do some research – which led to a trip to the library. I came away with the following books:

  • Conquering YouTube by Jay Miles, 2011
  • YouTube and Video Marketing An Hour A Day by Greg Jarboe, 2012
  • YouTube for Business, Online Video Marketing for Any Business by Michael Miller, 2009

The library had more but given the rate of change, I ignored all older books on the subject. As it was I almost took a pass on YouTube for Business as 2009 qualifies as ancient.

Conquering YouTube wins my award for Most Misnamed Book. Going through the book it became clear that the only reason that YouTube was in the title was for the book’s own marketing purposes. The book has absolutely nothing to do with YouTube. Rather it is a book of tips for creating live action videos. As a book on how to use your video camera to frame and light a scene, create special effects, and to construct a movie, the book succeeds but the book’s content ends there. Video file formats are not discussed. Post-processing on the computer is not discussed. Video software is not discussed. And using YouTube to host your video is never mentioned.

Briefly looking over YouTube for Business, Online Video Marketing for Any Business, it appears to be exactly what I was looking for with sections on:

  • Marketing Your Business Online with YouTube
  • Producing Your YouTube Videos
  • Managing Your YouTube Videos
  • Working with YouTube Video Blogs
  • Promotion and Monetization

With a publication date of 2009, there is a fair chance that some of the information is no longer accurate. For that reason I decided to focus on YouTube and Video Marketing An Hour A Day by Greg Jarboe and published last year.

Before getting into the book, I decided it would be better to first get some hands-on experience by uploading and sharing a video. Fortunately I had a video of a Masters of Lightning singing tesla coils performance collecting electronic dust on my computer. My first task was to create a title and a closing jpeg image for the video. Yes it is extra work, but it does provide the viewer with useful information and it clearly establishes the ownership of the video. To create the title and credits images I used Photoshop. This consisted of taking a screen shot of a frame from the video, adding the text, and using a layer style to enhance the text’s visual appeal.

I hate to say it but I used Microsoft’s Windows Live Movie Maker to attach the two jpegs to the video file and create the initial transition effect. Unfortunately Movie Maker only allows you to save your video as a WMV (Windows Media Video). No problem though as YouTube accepts WMV files. Uploading and filling in the required fields on YouTube was a piece of cake. The video that follows is that video.

Masters of Lightning play the Dr Who theme song at the Duckon Science Fiction Convention

Having created and published this video, I’ve started in on YouTube and Video Marketing An Hour A Day which contains the following chapters:

  1. A Short History of YouTube
  2. Map Out Your Video Marketing Strategy
  3. Month 1: Make Videos Worth Watching
  4. Month 2: create Content Worth Sharing
  5. Month 3: Customize Your YouTube Channel
  6. Month 4: Explore YouTube Alternatives
  7. Month 5: Optimize Video for YouTube
  8. Month 6: Engage the YouTube Community
  9. Month 7: Trust but Verify YouTube Insight
  10. Study YouTube Success Stories
  11. A Quick Look at the Future

This looks to be exactly the sort coverage that I was looking for. According to Greg Jarboe, the book’s author, "over three billion videos are streamed every day on YouTube." Creating a video and getting it watched on YouTube represents quite a challenge. From the book: "… more than 70 percent of all videos on YouTube make up only 1 percent of the views on the site." meaning that less than 30 percent of all videos get 99 percent of the view traffic. Clearly a challenge for every video creator out there.

Windows Live Movie Maker Tips

There are two things I’ve discovered with my initial work with Windows Live Movie Maker that I’d like to share with you.

Movie Maker Tip 1

Let’s say that you’ve imported an image into your video. Let’s also say you’re unhappy with it so you go back and make a change to the image. Movie Maker will not recognize that change. In fact if you delete the image from your video and re-import it, Movie Maker will recognize that you previously imported that image and will use its cached version instead of the file you’ve updated. I found that what worked was to save the image with a new file name and import that new file into the movie.

Movie Maker Tip 2

With respect to image resources on your computer that you have imported into your Movie Maker project, Movie Maker does not make its own copy of them inside the video. Rather it relies on linking to where the resources were at the time you imported them into Movie Maker. If you subsequently move these resources to a different directory or drive, the next time you open your project, you will see empty gray boxes where your images used to be. You will need to double-click each and every box individually to open a Windows Explorer dialog so that you can tell Movie Maker where that image is now located. My tip: make sure you keep all your resources for each video together with that video project. This makes me wonder about tip 1 – what would have happened if I had closed Movie Maker, modified the image file, and then reopened Movie Maker and the project.

Closing Thoughts

It’s always fun to learn something new on the computer and to acquire new skills. I expect that the next video I release will be a work that promotes my portrait art. For that video I’ll need to come up with a sound track – which represents yet another challenge. I hope that I”m up to it.

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It


OpenSCAD, 3D Objects, and 3D Printing

Tuesday, August 20th, 2013

OpenSCAD 3D Object as Art
OpenSCAD 3D Object as Art

I recently joined the Workshop 88#1 Google group after attending one of their meetings. In going through some of the group discussions, I came across one regarding 3D printing and the choice of software that people made in order to create 3D objects for printing. One of the software selections mentioned was OpenSCAD, an open source product that I have been aware of but never used.

The software is described on the OpenSCAD web site as follows:

OpenSCAD is software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects.

OpenSCAD is not an interactive modeller. Instead it is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file.

The power, and weakness, of OpenSCAD is its use of a programming language (script file) to build models. This is in contrast to a traditional 3D modeling program digital artists use, like Lightwave, that supports an interactive mouse-driven style of object creation.

The OpenSCAD user interface is pretty straight forward. Of course that is because the work of creating 3D objects is done via coding. One of the most common complaint about traditional 3D programs is the complexity of the user interface – which makes sense when you consider the variety and complexity of the operations users are performing interactively.

With OpenSCAD, I was able to create simple 3D objects fairly quickly by getting a handle on the scripting language’s syntax. In fact I have illustrated this article using a 3D model I created. The object is composed exclusively of cylinders on which I executed a series of translations and rotations. I should point out that for the illustration of the model I used a Photoshop adjustment layer to alter the hue of the image as rendered in OpenSCAD and used a Photoshop layer style to add a drop shadow to the image.

I do own Adobe Photoshop Extended. Photoshop Extended is the version of Photoshop that supports working in 3D with 3D objects. OpenSCAD saves 3D objects in the STL (Standard Tessellation Language – for more see the Wikipedia STL entry) format. Unfortunately STL is not a 3D format that Photoshop Extended CS4 recognizes. Also unfortunately the selection of 3D file formats that CS4 supports is extremely limited. Surprisingly neither the CS5 or CS6 upgrades have added support for any additional 3D file types. That means that if I want to work with the 3D objects created by OpenSCAD, I will either have to use software other than Photoshop or I will have to use an intermediary program to convert the STL file into one of the very few formats Photoshop recognizes. My preference is to not use Photoshop.

Will I Use OpenSCAD?

There are a plethora of 3D programs available today. Some, like OpenSCAD, are designed for the CAD market. Most aren’t. However, the explosion of 3D printing has generated new interest in CAD programs – especially within the hacker and maker community. For my part, I expect that I will continue to explore OpenSCAD and will attempt to find opportunities to make use of it. I must confess that I do find the programmatic nature of the 3D object creation process appealing.


Note #1: Workshop 88

Workshop 88 hackerspace in Glen Ellyn
Workshop 88 hackerspace in Glen Ellyn

Located in Glen Ellyn IL, Workshop 88 is a hackerspace – also referred to as a makerspace. On their web site, Workshop 88 is described as being focused on science, technology, mechanics, culture and the digital arts and offering a space where people with diverse backgrounds can socialize, collaborate and learn. For more, see the Workshop 88 web site. While my principle interest in investigating the group is to potentially teach a Processing class for them, my secondary interest is in learning more about 3D printing. Given that they have a 3D printer and I don’t, this provides an excellent opportunity to learn more about that aspect of digital creativity.

References

If you are interested in learning more about OpenSCAD and 3D model making, you may want to check out the following.

On the subject of models, I’ll leave you with a quote from John von Neumann: The sciences do not try to explain, they hardly even try to interpret, they mainly make models. By a model is meant a mathematical construct which, with the addition of certain verbal interpretations, describes observed phenomena. The justification of such a mathematical construct is solely and precisely that it is expected to work.

I’ll close by recommending that if you are interested in creating 3D models then give OpenSCAD a try – it’s free so you’ve got nothing to lose.

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It


Free Software Alternatives to Adobe CS6

Tuesday, May 14th, 2013

Adobe CS6 Alternatives
Adobe CS6 Alternatives

In 2012 Adobe released CS6. What set this release apart from previous versions was the licensing path that Adobe has chosen. For more information about the Adobe Creative Cloud model, see Adobe’s Creative Cloud FAQ.

While I have been using Photoshop since Photoshop 5, it wasn’t until CS4 was released that I bought my first full Adobe suite. Adobe Design Premium CS4 included:

  • Acrobat 9 Professional – for PDF creation
  • Dreamweaver CS4 – for web site creation
  • Fireworks CS4 – preproduction and mockup for web page creation (combines Dreamweaver and Photoshop features)
  • Flash CS4 Professional – Flash creation
  • Illustrator CS4 – for creating vector graphics and for graphic design
  • InDesign CS4 – for desktop publishing
  • Photoshop CS4 Extended – Photoshop with 3D capabilities

Of the programs that make up the Design Premium suite, Photoshop is where I live and is the application which I am most qualified to comment on. I must say that I have become increasingly disenchanted with Adobe’s approach to the software/graphics market. This has strongly influenced my decision as to whether or not to continue to upgrade my Adobe products. From one review of CS6 we have this summation:

"No creative professional will deny the need for Adobe Creative Suite, and 2012’s version, CS6, focuses on some of the toughest demands designers face in an interactive, digital, multimedia landscape."

From a corporate perspective, that is probably true. Once upon a time you could not get criticized if you bought IBM products. With the advent of the desktop computer, Microsoft became the safe buy. With respect to visual creative software, Adobe holds the corporate safe to buy crown. But I am not a corporation. Nor do I have the deep pockets that would allow me to continue to ride the Adobe Upgrade Train.

So this article is for those who are in search of an alternative to Adobe. For this article, I am only going to look at those alternatives that are free. However, I am not going to do this for every program that is a part of the Design Premium package – just those that I use.

Acrobat 9 Professional

When it comes to creating PDFs, I have never had to make use of the advanced features provided by Acrobat. Instead I have found the capabilities of OpenOffice/LibreOffice Writer’s Export to PDF function to be sufficient for my needs. I will note that Acrobat has come in quite handy when it comes to editing PDFs that I did not create.

If all you need is to create simple PDF versions of documents you’ve created then I suggest using Writer – which is available as a tool in either OpenOffice or LibreOffice.

Dreamweaver CS4

While I have experimented with using Dreamweaver as a web site creation tool, I’ve always had a certain disdain for WYSIWYG web site creation tools. Once upon a time I used NetObjects Fusion professionally. If Microsoft FrontPage was a nightmare, then Fusion was a dream. But I never opted to use Fusion for my personal web sites. I much preferred the hand-coded approach – and still do. As the focus of this article is on graphic software, I will comment no further on Dreamweaver.

Fireworks CS4

Fireworks I’ve used a couple times just to give its web page creation tools a try. As I am not engaged in web design as a full time professional pursuit, I was unwilling to devote time to learning how to use this software, preferring to create quick graphic mockups in Photoshop.

Flash CS4 Professional

I confess that I have never even opened the Flash application. I have never had an interest in using Flash to create digital art and as a web designer have deliberately avoided using Flash for the web sites I’ve done – a strategy that in hindsight appears to have been the right one to follow. So no recommendations here.

Illustrator CS4

I’ve never been much of an Illustrator user so am not really qualified to testify on its strengths and/or weaknesses. All I can say is that it has worked for me when I’ve needed it.

As to free alternative vector software it seems that Inkscape is the most popular option. It is worth noting that Draw, which is another of the software components of both OpenOffice and LibreOffice, is also used to produce vector-based art and diagrams. Draw is the one component of OpenOffice/LibreOffice that I have never used. (Note that my chief reason for migrating from Microsoft Office to OpenOffice was that I viewed OO Impress as a superior product to MS Powerpoint at that point in time). Inkscape is available for the Linux, Mac, and Windows platforms.

Inkscape – inkscape.org

InDesign CS4

My use of InDesign has been minimal. For the most part the documents I create are simple enough in terms of layout that they can be created in OpenOffice/LibreOffice Writer. However, for people who need the capabilities of a desktop publishing (DTP) application then Scribus is worth a look. This free software is available for the Linux, Mac, and Windows platforms. Oh – it is amazingly enough also available for those running OS/2 Warp (my favorite operating system of all time!).

Scribus – http://www.scribus.net/canvas/Scribus

Photoshop CS4 Extended

Photoshop – the software I love to hate due to its frequent crashes and operational glitches. I must say that it seemed to me that each new version of Photoshop crashed more often than the previous version. I was able to eliminate many of the crashes with CS4 by turning off all OpenGL features – which has the unfortunate side effect of reducing Photoshop’s functionality – but I prefer losing features to losing work!

As to free alternatives to Photoshop, there are many. The oldest and most well known of the free alternatives is GIMP. My use of GIMP has been limited but fruitful. My main problem with GIMP is that I would have to learn the GIMP way of doing things. Having used Photoshop for so long, I just know how to do what I want to do without having to think about it. Migrating to new software is always painful in that time must be spent in learning both the GUI and the tools. GIMP is available for the Linux, Mac, and Windows platforms.
GIMP – www.gimp.org

It is not just photographers using Photoshop, but artists as well. Photoshop’s paint brush engine is quite powerful and allows artists to create many painterly effects – serving as a challenge to Corel Painter. One of the free, open source painting software alternatives is Krita. Krita started out as KImageShop, a component of KOffice, a free open source office suite, which was available for Linux, Mac, and Windows. Calligra has apparently stopped development on KOffice (2012) which does not impact Krita. The next version of Krita, 2.7, is expected to be released next month.

Krita is available for Linux and Windows with a beta version available for Mac OS/X. Windows users note that the "highly experimental MSI installer" installs the entire Calligra Suite which includes the applications Words, Stage and Sheets, Flow, Braindump, Karbon and Krita.
Krita – krita.org

Another free open source painting program for artists is MyPaint which is available for the Linux and Windows platforms. What I find appealing is this part of the site’s description of their software: "MyPaint supports pressure or tilt sensitive graphic tablets and comes with an easy-to-use brush collection. There is a complex interface for creating your own brushes, focusing on brush dynamics (changes with speed, pressure, randomly)" Creating my own brushes is one of the Photoshop features that I regularly use so this capability is a must for me.
MyPaint – mypaint.intilinux.com

Adobe Camera Raw

While not listed as a separate product, Adobe Camera Raw (ACR) played a big part in my decision to upgrade from CS to CS4. Adobe did a great job with ACR. In my opinion, it was the best modification made to what was a part of my core work flow as I do a lot of digital photography.

For photographers who are looking for a free alternative to Adobe Camera Raw, one product that is highly rated is RawTherapee which is available for the Linux, Mac, and Windows platforms.

RawTherapee – rawtherapee.com

In Summary

For me, the hardest part of migrating to new software is the loss of knowledge and experience I acquired using my current software. When I started with Photoshop there really were no good alternatives out there. For my money, I prefer to stick with my CS4 software vs upgrading to CS6 or migrating to alternative solutions. However I do anticipate the arrival of a day when I judge some free alternative to my Photoshop CS4 to be of superior quality.

In closing, for artists or photographers who are just starting out and do not have a history of using Adobe products to consider and are not seeking employment that requires a knowledge of Adobe products, this is a great time to investigate the many free software options that are available to you.

Happy Computing, Jim

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It


Free Software Downloads: Bryce, Daz Studio, and Hexagon

Monday, February 6th, 2012

Bryce, Hexagon, DAZ Studio Free Download
Bryce, Hexagon, DAZ Studio Free Download

Saturday I learned that DAZ (Digital Art Zone) is making available the following software as free downloads until February 29:

  • Bryce 7 Pro 3D Landscape Software (retail price $249.95)
  • Hexagon 2.5 3D Modeling Software (retail price $149.95)
  • DAZ Studio 4 Pro 3D Software (Winner of 3D World’s 2011 Software Innovation of the Year Award) (retail price $429.95)
  • 3D Photoshop Bridge (retail price $199.00)

In addition there are a number of free models and textures available as well. The total retail price of the basket of software, models, and textures that I downloaded was $1,350. The one requirement is that you subscribe to their newsletter – meaning you give them your email address.

Note that your order will show up in the Available Downloads link from your Account Dashboard and that you are allowed 4 downloads of each product you have ordered. The serial numbers for your software are retrieved separately via the Available Serial Numbers link. All downloads are in the form of executable files. The largest downloads are:

  • Bryce 7 Content – 670 meg
  • Daz Studio 4 32-bit – 441 meg
  • Daz Studio 4 64-bit – 439 meg
  • Bryce 7 Pro – 254 meg

I’ve never used Hexagon or DAZ Studio Pro but Bryce was the first 3D software I ever used – back when it was version 3. I haven’t used it in years but I still have a large collection of Bryce files and it would be nice to perhaps resurrect some of them. The name is taken from Bryce Canyon, which I had the pleasure of visiting a few years ago (there’s a photo of me at Bryce on the bottom of my home page). The first version of Bryce was released as a Mac only product in 1994. Version 3.1 of Bryce 3D was released in 1997 by MetaCreations Corporation – this was when I first purchased Bryce. Bryce was acquired by the Corel Corporation in 2000 who released version 5 of Bryce in 2001. Bryce was sold to DAZ in 2004 who has gone on to release versions 5.5 and 6.0 with Bryce 7 being released in 2010. Bryce 3D has always been looked down upon as a package for newbies with limited capabilities. While these criticisms are true, it’s important to remember that for many digital artists, Bryce was what opened the door for them to explore the world of 3D graphics software. It’s low price and easy-to-learn interface made it a perfect software solution for those digital artists looking to get their feet wet.

Hexagon is a tool for creating 3D models. According to the DAZ web site:

Hexagon delivers all the tools a graphic artist needs to create detailed 3D models ready for final render. Packed with features such as; DAZ Studio Bridge, sculpted primitives, freehand modeling brushes, micro-displacement modeling tools, comprehensive UV-mapping modules, advanced 3D paint, and instant ambient occlusion. Hexagon provides you with all the options of expensive competitor software, but at an affordable price.

I’m not sure what to make of 3D Photoshop Bridge. The DAZ web site describes it as a " DAZ Studio plug-in designed to connect the power of Photoshop with the unlimited content possibilities of DAZ Studio. It’s the next step to maximizing your creativity. It will also save you money by eliminating the need for costly photo shoots and stock imagery, save you time with quicker rendering, and save your brain by swiftly and easily integrating the best features of DAZ Studio and Photoshop…Easily pose characters and objects three-dimensionally with the 3D Photoshop Bridge while in DAZ Studio,"

Of course it would help if I knew more about Daz Studio. In this case, download first then investigate was my motto. According to DAZ:

DAZ Studio is a feature rich 3D figure customization, posing, and animation tool that enables anyone to create stunning digital illustrations and animations. DAZ Studio is the perfect tool to design unique digital art and animations using virtual people, animals, props, vehicles, accessories, environments and more. Simply select your subject and/or setting, arrange accessories, setup lighting, and begin creating beautiful artwork.

The free 3D software is available via download only from DAZ3D.com between now and February 29, 2012:

http://www.daz3d.com/i/3d/free-3d-software-overview

Product Links:

Note that there are a number of video tutorials available for Bryce, Hexagon, and DAZ Studio on YouTube.

Here’s to happy and creative computing. Jim

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It


Tweet A Processing Sketch

Thursday, December 9th, 2010

Processing Sketch
A Processing sketch to illustrate this post

If you check out my Twitter account (http://twitter.com/digitalart), you will note that in the past I created a limerick that fit within the 140 character limit Twitter imposes.

A while back there was a Processing Tiny Sketch Competition in which the Processing community was challenged to create a complete Processing sketch with a 200 character limit for the Processing program. That contest was hosted by Rhizome (you can visit my Rhizome account).

This got me to thinking: what about creating a Processing sketch that could be tweeted. If you haven’t heard of Processing, it is an open source programming language and environment for people who want to create images, animations, and interactions. Processing is built on Java and the Java programming language is available to Processing users. It’s a wonderful programming environment for artists and programmers alike. You can see what many folks have done with Processing at the OpenProcessing web site.

So my challenge to myself was to write an entire Processing program using less than 140 characters and I wanted the resulting image to be dynamic rather than a static. Fortunately Processing is quite flexible and there are a number of ways to shrink a program. Before explaining my methodology, here is the full unshortened version of the Processing program source code:

// declare integer variables
int x;    // x for horizontal pixel coordinate
int y;    // y for vertical pixel coordinate
int r=100;// r holds default screen size
 
// Setup() function is executed once at program start
void setup() {
  size(100,100); // Set the screen size
  background(0); // Set background color to black
}
 
// The draw() function executes continuously
void draw() {
  // Cycle through every value of x
  for(x=0;x<r;x++) {
   // For each x, cycle through every value of y
   for(y=0;y<r;y++) {
     // Set the pixel at x,y to the specified color
     set(x,y,color(frameCount*r*sin(frameCount*x),
             20*r*cos(frameCount*y),
             r*frameCount*cos(x))); 
   }
 }
}

And here is the Twitter optimized version:


int x,y,r=100,t=1;void draw(){for(x=0;x<r;x++)for(y=0;y<r;y++)set(x,y,color(t*r*sin(t*x),20*r*cos(t*y),
r*t*cos(x)));t++;}

The program is just 121 characters long. I’ve named this program Scottish Tartan as the output resembles a tartan. There’s a nice tie in as I am part-Scottish via the Campbell clan. Other than omitting the comments and crlfs (carriage return line feeds), there are functionally only two differences in the two programs.

  1. I deleted the setup() function because it is optional. It is used to initialize various parameters and options and is executed just once. By removing it:
    * the canvas will default to a size that is 100 pixels wide (the x dimension) by 100 pixels tall (the y dimension).
    * the background color will default to gray.
    * the colorMode will default to RGB with 256 possible values for each color.
  2. I replaced the system variable frameCount with my own variable t. The frameCount variable is incremented each time the draw() function is executed. Substituting my own variable t saves characters.

Other strategies to shorten the program were to:

  • Keep variable names to one character (x,y,r,t)
  • Use the increment operator t++; instead of t=t+1;
  • Eliminate unnecessary for statement brackets

See the Processing program as a Twitter tweet

If you want to see what the program actually does you will need to download and install Processing. Installation is straight forward and best of all it’s free. Why not give it a try. Visit http://processing.org/ for more information and to download Processing.

Processing Books

There are a number of books that have been written about how to use Processing to create images, animations, etc. Following are books that I recommend – based on the fact that I’ve bought and used them.

In addition to the books listed above, there is a new book out on Processing that was released in August 2010. I do not have this book so can not comment on it. You may want to investigate for yourself. The book is Processing for Visual Artists: How to Create Expressive Images and Interactive Art

Merry Christmas everyone, Jim

Bookmark it:  Stumble It  Bookmark this on Delicious  Digg This  Technorati  Reddit Tweet It