Tuesday, July 29, 2014

Today's quote: 29th, July

Remind yourself regularly that you are better than you think you are

Saturday, July 19, 2014

Industry 4.0

Before some days I came to know very IoT specific use case.
I collected some details from websites and tried to put important things together.
The term "Industry 4.0" refers to the fourth industrial revolution. The first industrial revolution was the mechanization of production using water and steam power, it was followed by the second industrial revolution which introduced mass production with the help of electric power, followed by the digital revolution, the use of electronics and IT to further automate production.

The term was first used in 2011 at the Hanover Fair.[8] In October 2012 the Working Group on Industry 4.0 chaired by Siegfried Dais ( Robert Bosch GmbH ) and Kagermann (acatech) presented a set of Industry 4.0 implementation recommendations to the German federal government. On 8 April 2013 at the Hanover Fair the final report of the Working Group Industry 4.0 was presented.

Characteristic for industrial production in an Industry 4.0 environment are the strong customization of products under the conditions of high flexibilized (mass-) production. The required automation technology is improved by the introduction of methods of self-optimization, self-configuration,  Self-diagnosis, cognition and intelligent support of workers in their increasingly complex work. The largest project in Industry 4.0 at the present time is the BMBF leading-edge cluster "Intelligent Technical Systems OstWestfalenLippe (it's OWL)". Another major project is the BMBF project RES-COM, as well as the Cluster of Excellence "Integrative Production Technology for High-Wage Countries".

The potential benefits are huge. A report from Cisco estimates that the potential bottom-line value that can be created or will migrate among manufacturing industries globally (Value at Stake) could be US$ 3.88 Trillion over the next decade. This commercial value can be realized through reduced time-to-market, eliminated waste, greater efficiency, reduced cost and extra business from individualized products.

Information collected from:
1. http://en.wikipedia.org/wiki/Industry_4.0
2. http://in.renesas.com/edge_ol/global/12/index.jsp

Wednesday, July 16, 2014

Experiments with Two.js: Getting started

Some basic experiments with two.js.

Write in comments if getting stuck in running below example.

Lets go step by step.
1. var type defines type of content delivered by the two.js drawing as per request / automatic detection using url.js javascript.
          var type = /(canvas|webgl)/.test(url.type) ? url.type : 'svg';

2. Now, we are ready with content type. We can define two.js object using below code.

          var two = new Two({
            type: Two.Types[type],
            fullscreen: true,
            autostart: true

This defines type of the drawing i.e. canvas/webgl. fullscreen behaviour, autostart options and many more things as described here. The last line "appendTo()" decides where our two.js drawing will be rendered. Here, we have taken webpage's body directly to render two.js drawing.

<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Two.js: Rubber Ball</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <link rel="image_src" href="http://jonobr1.github.io/two.js/images/logo.gif">
    <script src="jquery.js"></script>
    <script src="two.js"></script>
    <script src="url.js"></script>
      * { margin: 0; padding: 0; cursor: none; }
      body { background: #fcb215; } 
  <body style="overflow: hidden; margin: 0px; padding: 0px; top: 0px; left: 0px; right: 0px; bottom: 0px; position: fixed;">
    <div class="scripts">
    var type = /(canvas|webgl)/.test(url.type) ? url.type : 'svg';
          var two = new Two({
            type: Two.Types[type],
            fullscreen: true,
            autostart: true

          Two.Resoultion = 32;

          var delta = new Two.Vector();
          var mouse = new Two.Vector();
          var drag = 0.33;
          var radius = 50;

          var shadow = two.makeCircle(two.width / 2, two.height / 2, radius);
          shadow.noStroke().fill = 'rgba(0, 0, 0, 0.2)';
          shadow.offset = new Two.Vector(- radius / 2, radius * 2);
          shadow.scale = 0.85;

          var ball = two.makeCircle(two.width / 2, two.height / 2, radius);
          ball.noStroke().fill = 'white';

          _.each(ball.vertices, function(v) {
            v.origin = new Two.Vector().copy(v);

          two.bind('update', function() {


            _.each(ball.vertices, function(v, i) {

              var dist = v.origin.distanceTo(delta);
              var pct = dist / radius;

              var x = delta.x * pct;
              var y = delta.y * pct;

              var destx = v.origin.x - x;
              var desty = v.origin.y - y;

              v.x += (destx - v.x) * drag;
              v.y += (desty - v.y) * drag;






 function moveSensor(){
 mouse.x = Math.floor((Math.random() * 1000) + 1);
 mouse.y = Math.floor((Math.random() * 600) + 1);
 shadow.offset.x = 5 * radius * (mouse.x - two.width / 2) / two.width;
 shadow.offset.y = 5 * radius * (mouse.y - two.height / 2) / two.height;
 var auto_refresh = setInterval("moveSensor()", 1000);