JavaScript Function doc.Support LQDN banner

Posts Tagged ‘Experience


 

Video poetic experiment, with the sound of David Law.
Originally done for a video projection while the band were on stage.

 

Pictures/Video/Edit by molokoloco 2003
Soundtrack by David Law and Thibault Jeanson
Album : La solitude du cosmonaute

  1. La solitude du cosmonaute 4:56
  2. Je te promet la lune 4:17
  3. Ce corps de glace 4:13 (Sorry for the cut !)

… and a special thank to Carla for the featuring !

 

Download : molokoloco_accroissance.avi (720p | 280Mo)

Shared by molokoloco

The first example shows a “””simple””” web-based Darkroom that allows you to perform color correction on an image : http://people.mozilla.com/~vladimir/demos/darkroom/darkroom.html

This post is by Vladimir Vukićević and is a re-post from his personal weblog.

Fast JavaScript is a cornerstone of the modern web. In the past, application authors had to wait for browser developers to implement any complex functionality in the browser itself, so that they could access it from script code. Today, many of those functions can move straight into JavaScript itself. [...]

My first step with SVG… and http://raphaeljs.com



See the demo : http://www.b2bweb.fr/graphs/


I want to show tags connexions between some random articles, here the code !


The PHP WordPress code is added in a declared new page,
named ./wp-content/themes/mytheme/graphs.php :

/*
Template Name: Graphs
*/
 
get_header(); 
 
query_posts('cat=16,92&posts_per_page=60&orderby=rand');
 
$articles = array();
$max = 15;
$count = 1;
if (have_posts()) :
	while (have_posts()) : the_post();
		$posttags = get_the_tags();
		$taggs = array();
		foreach((array)$posttags as $tag) {
			$taggs[] = addslashes($tag->name);
		}
		if (count($taggs) > 2) {
			$title = the_title('', '', false);
			if (strpos($title, '&#') === FALSE) { // for the moment, i cannot un_html_entities() that, some titles in the blog came from strange rss feed...
				$title = str_replace('’', '\'', $title);
				$title = stripTags(un_html_entities(utf8_decode($title)));
				if (strlen($title) > 40) $title = substr($title, 0, 40).' (...)';
				$articles[] = "{href:'".get_permalink()."', title:'".utf8_encode(addslashes($title))."', tags:'".implode(',', $taggs)."'}";
 
				if ($count >= $max) break;
				else $count++;
			}
		}
	endwhile;
	$articles = implode(',', $articles);
endif;
 
wp_reset_query();

The JavaScript in ./wp-content/themes/mytheme/graphs.php :
View source

 
$(window).load(function () {
 
	var shapes = [], connections = [];
	var W = 600, H = 800;
 
	var r = Raphael('holder', W, H);
 
	var dragger = function () {
		this.ox = this.attr('x');
		this.oy = this.attr('y');
		//this.animate({fill:'#666'}, 500);
		this.attr({fill:'#666'});
	};
 
	var move = function (dx, dy) {
		var att = {x: this.ox + dx, y: this.oy + dy};
		this.attr(att);
		$(this).data(att);
		for (var i = 0, ii = connections.length; i < ii; i++) {
			r.connection(connections[i]);
		}
		r.safari();
	};
 
	var up = function () {
		//this.animate({fill:'#BBB'}, 1000);
		this.attr({fill:'#1E91D4'});
	};
 
	var titlesY = [];
	for (var i = 0, ii = articles.length; i < ii; i++) {
		var tags = articles[i]['tags'].split(',');
 
		// Built title
		shapes[i] = r.text(0, 0, articles[i]['title']).attr({font:(Math.floor(tags.length*2.5) + 10)+'px Helvetica, Verdana', fill:'#1E91D4', cursor:'move'});
 
		// Adjust with text width
		var b = shapes[i].getBBox();
		var bx = 30 + Math.floor(Math.random() * (W- 60 - (b.width / 2)));
		var by = 0;
		while(true) { // Check if not so close from an other title
			by = 30 + Math.floor(Math.random() * (H - 60 - (b.height / 2)));
			for (var y = 0, yy = titlesY.length; y < yy; y++) {
				if (Math.abs(by - titlesY[y]) < (b.height + 20)) continue;
			};
			break; 
		}
		titlesY[i] = by;
		shapes[i].attr({x:bx, y:by});
 
		// Raphael drag & drop
		shapes[i].drag(move, dragger, up);
 
		// Article link...
		$(shapes[i]).data({'href':articles[i]['href'], x:bx, y:by}); // jQuery to stock original position before motor() start
		shapes[i].dblclick(function() { window.open($(this).data('href'), '_win'+i); });
	}
 
	// On recommence maintenant que l'on a toutes les shapes.. let's build connections..
	var connected = []; // To build only one connection between 2 articles with same tag
	for (var i = 0, ii = articles.length; i < ii; i++) {
		var tags = articles[i]['tags'].split(',');
		for (var j = 0, jj = tags.length; j < jj; j++) { // Pour chaque tag de l'article
			for (var k = 0, kk = articles.length; k < kk; k++) { // On regarde tous les autres articles
				if (k == i) continue; // not himself
				if (articles[k]['tags'].indexOf(tags[j]) >= 0) {
					var exist = false;
					for (var c = 0, cc = connected.length; c < cc; c++) {
						if (!connected[c]) continue;
						for (var d = 0, dd = connected[c].length; d < dd; d++) {
							if ((c == i && d == k) || (c == k && d == i)) {
								exist = true;
								c = cc; d = dd; // break;
							}
						}
					}
					if (!exist) {
						connections.push(r.connection(shapes[i], shapes[k], '#CACED1', '', tags[j]));
						if (!connected[i]) connected[i] = [];
						connected[i].push(k); // Stock connection that exist
						break;
					}
				}
			} 	 
		}
	}
 
	// Animate
	var frameRate = 1000 / 25; // 25f/s
	var motor = setInterval(function(coef, inc, connections_, r_) {
		for (var i = 0, ii = shapes.length; i < ii; i++) { // 
			if (!inc[i]) inc[i] = (Math.random() / 10);
			if (!coef[i] && coef[i] !== 0) coef[i] = Math.floor(Math.random() * 10);
			else coef[i] += inc[i];
			shapes[i].attr({
				x: Math.floor($(shapes[i]).data('x') + (Math.sin(coef[i]) * 15)),
				y: Math.floor($(shapes[i]).data('y') + (Math.cos(coef[i]) * 15))//,
				//'fill-opacity': 0.5 + ((shapes[i].attr('y') - $(shapes[i]).data('y')) / 100)
			});
		}
		for (var j = 0, jj = connections_.length; j < jj; j++) r_.connection(connections_[j]);
 
	}, frameRate, [], [], connections, r);
 
	r.safari();
});

See the demo : http://www.b2bweb.fr/graphs/

Download : http://www.b2bweb.fr/wp-content/graphs.php

Ne cliquez pas !!!

In Shared Items | 11 Jul 2010

Pour les neuneux que nous sommes voici un concept on ne peut plus simpliste. Oubliez le clic de votre souris tout ce contrôle avec le curseur.

Ca s’appel don’t click it et je vous laisse cliquer sur l’image pour y accéder (paradoxal oui).

We’ve seen several implementations of Conway’s Game of Life that run in the browser — probably because Dr. Conway’s exercise in generative, automated systems is both simple enough for programmers to reproduce easily and pretty enough to watch that it quickly captures one’s imagination.

Here’s the latest: an HTML5 version of Life, as built by British programmer Joseph Mansfield. He says he tackled the “mini-project” to have fun with the HTML5 canvas element.

Here’s a primer on Life from Math.com. Visit Mansfield’s site and try out some different patterns and see [...]

Relighting Sylvia

Inspired by the research of Paul Debevec on photographic relighting, I’ve created this Flash experiment showing a real-time relighted scene of my girlfriend with her netbook. Watch it here. Please note it requires a fast computer to run at full framerate.

The scene has been captured without any special hardware, just a common reflex camera (Nikon D70) with its remote, a tripod and the netbook as the only light source. The time for shooting all the photos required for the relighting process was about 3-4 minutes, where Silvia — the Spanish for Sylvia — stayed amazingly [...]

Tags : ,

Dancing Typography

In Shared Items | 19 Jun 2010

Dancing Typography screenshots

In this experiment/new visual effect, the letters from a lyric of a popular song – Never Gonna Give You Up — are repositioned to compose the images of its singer — Rick Astley — dancing in fluid motion. Take a look of it here.

It is an evolution of an experiment I did a month ago where text compose a static image. In this case, I modified the algorithm to achieve the smooth motion by making the  letters move the less as possible to be adapted to the next frame in the video.

As the previous experiment, this was thought to be done with Javascript/CSS, but I’ve finally had [...]

L’expérience Panopticlick de l’EFF démontre clairement que l’ouverture actuelle des navigateurs Internet quand à leur configuration technique représente un moyen de traçabilité très puissant des internautes. Ce moyen est indépendant de leur volonté d’être suivi ou non….

Sebastian Deutsch has a nice new experiment that uses HTML5 audio + Processing (which uses Canvas) to visualize Twitter streams sync’d to music.

In their words:

We’ve created a litttle experiment which loads 100 tweets related to HTML5 and displays them using a javascript-based particle engine. Each particle represents a tweet – click on one of them and it’ll appear on the screen.

The original particle engine was ported from a Flex/AS3 project to javascript. We’re using processing.js for particle rendering on canvas which is a very useful graphics library created by John [...]

Tout d’abord Google Labs a bénéficié d’un lifting : sa présentation a changé et il vous est possible d’être tenu au courant de toutes les nouveautés à venir en vous abonnant au flux RSS qui est disponible. Vous pouvez aussi installer un gadget iGoogle entièrement dédié à Google Labs…

Trouver des images similaires avec Google Labs

Google Similar Images

Cette expérimentation Google Images vous permet d’afficher des images similaires à celle que vous allez trouver en fonction de votre recherche de départ.
Saisissez votre mot-clé puis cliquez sur une des images qui sont visibles.
Cliquez ensuite sur le lien [...]

2 pages