Archive Page 5
Sftp with Java / Processing
1 Comment Published June 4th, 2007 in java, library, p5, processing.org, programming, sftpI know, I know, you’ve been waiting your whole life for this.
Download beta SFTP Processing library (source included in zip).
Download example Processing sketch.
The library uses JSch (Java Secure Channel).
Copyright (c) 2002,2003,2004,2005,2006,2007 Atsuhiko Yamanaka, JCraft, Inc.
import sftp.*;
Sftp sftp;
void setup() {
size(200,200);
background(0);
// Create the SFTP object
// if 3rd arg = false, you must set the password in your code
// if 3rd arg = true, you will be prompted to enter your password
sftp = new Sftp("www.hostname.com","login", true);
// sftp.setPassword("XXXXXX");
sftp.start(); // start the thread
noLoop();
}
void mousePressed() {
// At any point you can execute an SFTP command
// Not all commands are currently implemented
// but you do have "ls" and "get"
// Gosh, I should implement "put", sorry!
sftp.executeCommand("ls");
sftp.executeCommand("get file.txt");
}
My 2002 (my goodness, that’s 5 years ago!) piece Swarm is part of Right click - Open source new art media exhibition at the Kapok gallery in Hong Kong. Swarm uses an implementation of Craig Reynolds’ flocking algorithm and the Processing source is available in my nature of code tutorials. The show also includes Josh Minor’s wonderfully addictive Video Pong.
Airport Installation
5 Comments Published May 18th, 2007 in airport, blog, installation, java, p5, terminal01I’m working on an interactive kiosk for the Toronto Airport, part of Terminal Zero One. Two early sketches:
“Tradition being what it is, even organizations that pine for new ideas struggle with how to change their cultures to support them. The Interactive Telecommunications Program at New York University provides a longstanding example of why they should keep trying.”
Read the article here. If you are in the NYC area, drop by and check out the the Spring Show!
Flight404’s recent exquisite work with additive blending and particles led me to return to an old project of mine. Of course, these days, revisiting a project translates to “add more LCD screens.”
We’ve successfully added support for passing larger amount of data across clients in the multi-screen framework and this has led to some nice experiments, including having one client capture video for the entire system. The demo below involves 3 client computers, 6 LCD screens, and 2 video cameras. Did I mention this is all works with Processing???
Multi-Screen Video Particles on Vimeo
Now, I have to admit. I have a problem. When I had one screen, I wished for two. When two came, I wished for 3. Then 6. Now, I wish for 12. (Well, I would really quite prefer in the vincinity of 96 screens, but I have to be realistic.)
Thanks to Michael DelGaudio for appearing in the video.
Run Lola, Ruuuuuuuuuuuuun!
6 Comments Published March 27th, 2007 in ITP, blog, mpe, p5, teaching_, vlog
Click to Watch
Working on a demo for the MPE system consisting a grid of cells, each playing the film Run Lola Run at 60×32 pixels. Each cell is one frame behind (or ahead) of its left (or right) neighbor. The idea here is to ultimately have enough pixel space to display the entire movie all at once (much like Brendan Dawes’ Cinema Redux), only in motion. Too bad this is quite a blatant copyright violation.
(Special thanks goes to Chris Kairalla for suggesting “Run Lola Run” as the source content.)
Single Parent Ecosystem
4 Comments Published March 27th, 2007 in ITP, blog, evolution, p5, teaching_This week, in The Nature of Code, we’re talking about genetic algorithms. A genetic algorithm is a search technique that involves a simulated population of candidate “solutions” (represented by virtual chromosomes) that evolve towards an optimal state. The process is a computational model of principles from biological evolution, such as selection, inheritance, crossover, and mutation.
One of the more challenging aspects to developing a genetic algorithm is coming up with a good “fitness function” for your candidate solutions, i.e. how well does this candidate solve the problem? Without a good fitness function, you won’t get anywhere since the function determines the likelihood of reproducing for the next generation. This is Survival of the Fittest in code.
Nevertheless, as per Flake, a better natural selection catch-phrase might be “Survival of the Survivors.” In the biological world, there is no fitness “function.” The longer you survive, the more likely you are to reproduce.
With that in mind, the above example is a simple evolution simulation, where the simple ability to live longer affords creatures (called “bloops”) a greater chance of having a child (the example uses asexual reproduction for simplicity, but could be modified to incorporate two parents). A bloop’s DNA determines its size and speed (the larger it is, the slower it moves.) The bloops wither away and die unless they find food, in which case their strength increases, causing them to they survive longer and hopefully reproduce.
There’s nothing inherently interesting about this example (other than as a demonstration of the technique itself) and it yields a fairly obvious result:
Bloops that are too big can’t move, don’t find food, die, and aren’t very likely to have children. Bloops that are tiny can move around very quickly, but aren’t terribly likely to find food either because of their small size. After about 10 minutes or so of running, the bloops evolve towards a “midpoint” where a reasonably sized, reasonably fast family of bloops take over (see above screenshots for “before” and “after.)
Since color is encoded into the genes, you can follow bloops from generation to generation (though it should be noted that color plays no role whatsoever in a bloop’s ability to survive.)
I’ve posted a brief tutorial on using JWNL, a Java library for accessing WordNet.
“WordNet® is a large lexical database of English, developed under the direction of George A. Miller. Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept. Synsets are interlinked by means of conceptual-semantic and lexical relations.”
I wonder how useful it would be to create a Processing library with some basic WordNet functionality (or that simply exists as an interface to JWNL for all things WordNet.) There are many lovely examples of text-based Processing work out there. Two that jump to mind are State of the Union by Brad Borevitz as well as anything ever made by Ariel Malka.
The power of WordNet is not that it provides access to word meanings (which it does), but that it provides information about the relationships between words (and when I say “word,” I really mean set of synonyms, or synset). It’s the myspace for semantic concepts. You’re probably familiar with synonyms and antonyms. In addition, WordNet provides links for less well-known semantic relationships, such as hypernymy, hyponymy, meronymy, troponymy, and entailment. Do I see some sort of tree / network visualization in Processing’s future?
Tech Trek TV!
2 Comments Published March 5th, 2007 in ITP, blog, java, p5, programming, teaching_, vlog
March 4th 2007. New York City
3 Minutes
Wherein we pick a name we like (Tech Trek: Inside ITP) and catch ITP researcher and teacher Dan Shiffman working on 6, 32-inch TVs. His project is was just up and running when we talked to him. It’s an open source Java framework for spanning real-time graphics applets/applications across multiple screens.
- More Info: Dan Shiffman: www.shiffman.net
Search
You are currently browsing the daniel shiffman weblog archives.
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- April 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
Categories
- airport (3)
- API (1)
- asterisk (3)
- big screens (8)
- bigscreens (4)
- blog (108)
- book (3)
- email (1)
- evolution (1)
- exhibition (1)
- General (9)
- iac (7)
- installation (13)
- interview (1)
- ITP (68)
- java (30)
- jepson (2)
- learning processing (1)
- library (6)
- mpe (19)
- netflix (2)
- neural (3)
- numbers (1)
- openframeworks (1)
- p5 (90)
- phone (3)
- php (1)
- poker (2)
- processing.org (37)
- programming (18)
- qrcode (1)
- random (1)
- run lola run (1)
- sftp (1)
- simplicity (3)
- swarm (1)
- Teaching (1)
- teaching_ (53)
- terminal01 (3)
- text (1)
- vague terrain (1)
- video (1)
- videowall (3)
- vlog (20)
- voronoi (3)
- wordnet (1)
- xbee (1)
- yahoo (1)
- Zoog (1)












