Search This Blog

Wednesday, July 26, 2017

Be Still My Random Heart

Be still my random heart! My entry at an impromptu Valentine's Day hackaton at work. Classification of random points done by a neural net created by JMP software and converted to JavaScript. Visualization by D3.js. Details and source code here.

Tuesday, July 25, 2017

Constance: an experiment with Object Constancy

This is a little experiment based on Mike Bostock's writings about object constancy and Jeffrey Heer's paper on Animated Transitions in Statistical Data Graphics.

The idea of animating the transition between data visualizations - keeping object constancy as they change - is to allow the user to track elements of interest. The animation allows the user to make a connection between the different facets surfaced by each visualization.

This technique animates between D3.js layout calculations. Rectangles are converted to circles and vice-versa through the manipulation of the rx and ry attributes of the SVG rect element.

You can play with the demo here:
Constance demo

Monday, June 26, 2017

Surprise Me

"Ignorance is bliss."
 -- Cypher 

"It is not real."

The thought appeared as he adjusted the haptic gloves. That would be the Skeptic, he told himself. He gave this name to the side of his psyche that resisted the Electric Memories. Naming "the voices in your head" was part of the Mind Bus technique, a suggestion of the Suspension of Disbelief department. It amused him to think about this crossover between tech support and psychotherapy. But the important thing was that it worked. The resistance was still there, but his experiences had improved. Engaging was also part of the technique, so he replied as he reached for the sensory helmet.

"I know. But memories aren't real either. They are how we remember facts, not the facts themselves."
"They are based on real things. Things that actually happened."

Oh boy. "Memories are stories we tell ourselves. They change over time. So what if we improve them with have a little help from the Assistant, like we do with everything else?"

As if on cue, the Assistant's avatar materialized in the virtual waiting room. Its feminine voice came through the headphones. "Hello, X. Your health indicators are good today. There are no pressing messages. Would you like an Electric Memory?"


"Very well. When would you like to go?"

"Surprise me."

Over time, he learned to trust the Assistant's choices. They were made using Emotion Modelling, the technology behind the Electric Memory smart agents, applied to himself as opposed to friends and relatives. Emotion Modelling evolved from sentiment analysis decades ago, becoming a new branch of science. Every word, video, picture, and voice recording was correlated with biometric databases and buying habits repositories and then used as training data for massive deep learning models. It turned out that the ability to model emotions was the key to predicting - and simulating - behavior. 

The loading bar appeared. The Skeptic tried again.

"It is just a game."

Sigh. "OK, it uses much of the same tech. Immersive environments. Haptic and sensory feedback. Realistic avatars. Smart agents animating non-playable characters, only ones that remembered everything your friends ever did, behaved just like they would. But there is no monster to defeat, no gold to hoard. It is not a game."

The bar was almost full. He thought that was the end of it when a final question hit him.

"But then what is the point?"

He hesitated. That was the question he had been avoiding, finally revealing itself. Why did he keep going back?

"The point is reconnecting. Honoring the memories of the people I loved by creating new ones. They are all long gone, and I am still here. I am not ready to let them go. Not yet."

The loading bar faded away. The details of a crowded pub slowly came into focus. Laughter and music, sweat and cheap perfume. Even before he heard his friends calling, he knew when he was.

All doubts gone, all disbelief suspended, he smiled and walked to their table.

Friday, August 7, 2015

A Software Developer's Career, visualized

Or, from developer (using C++) to manager (using Flex) and back again.

Created with JMP.

Sunday, May 17, 2015

Yin-Yang Animation

The yin-yang symbol (called taijitu) looked to me like a snapshot of a system in motion. A moment where everything is suspended in perfect balance. But also a pause before an imminent change, where this balance is lost and later restored, over and over again. Having learned how to create animations in D3.js thanks to tutorials like Jerome Cukier's Creating Animations and Transitions With D3 and examples like Roland Dunn's attrTween in a Transition to Move an Element Using a Function I decided to give this idea a try. I quickly realized that I also needed a better understanding of the SVG coordinate system and how it is affected by nested transformations. To that end Sara Soueidan's tutorial on SVG transformations was invaluable.
This experiment breaks down the taijitu into components, represented as SVG circles and arcs. The initial angle of each component is calculated and used as the starting point of an animated transition covering a full cycle. At each step, the circles are scaled, translated to compensate for the change in position introduced by the scaling, and then rotated using a polar to cartesian transformation.
Every aspect of the animation is parameterized. In a future version I might look into adding a simple control panel to expose the parameters for experimentation. That will likely require a change on how the continuous animation is achieved, replacing the "recursive" callback call made by transition.end() with d3.timer().

Thursday, March 5, 2015