Pretty lines.
authorEugen Sawin <sawine@me73.com>
Sun, 18 Dec 2011 18:57:49 +0100
changeset 757b3fc980d9d7
parent 74 c0e6fb6cf6ef
child 76 681b1d7dc3a9
Pretty lines.
factory/v2012/links.html
factory/v2012/linksend.html
factory/v2012/script.js
links.html
linksend.html
script.js
     1.1 --- a/factory/v2012/links.html	Sun Dec 18 15:57:15 2011 +0100
     1.2 +++ b/factory/v2012/links.html	Sun Dec 18 18:57:49 2011 +0100
     1.3 @@ -21,25 +21,18 @@
     1.4  </li>
     1.5  </ul>
     1.6  
     1.7 -<h2>Professional</h2>
     1.8 +<h2>The People and their Sites</h2>
     1.9  <ul>
    1.10 -<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    1.11 -My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    1.12 -<a href="http://eprover.org">E</a>.
    1.13 -</li>
    1.14 -</ul>
    1.15 -
    1.16 -<h2>Friends (with websites)</h2>
    1.17 -<ul>
    1.18 -<!--<li><h4><a href="http://www.tomrocket.com">Thomas Witt</a></h4>
    1.19 -A good friend and designer for the visual arts.
    1.20 -</li>-->
    1.21  <li><h4><a href="http://www.chris-koenig.de">Christian K&ouml;nig</a></h4>
    1.22  An ex-fellow student and companion in the quest for world domination.
    1.23  </li>
    1.24  <li><h4><a href="http://www.unidentify.com">Michael Chlebek</a></h4>
    1.25  An ex-fellow student and friendly programmer.
    1.26  </li>
    1.27 +<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    1.28 +My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    1.29 +<a href="http://eprover.org">E</a>.
    1.30 +</li>
    1.31  </ul>
    1.32  
    1.33  <h2>Recursive</h2>
     2.1 --- a/factory/v2012/linksend.html	Sun Dec 18 15:57:15 2011 +0100
     2.2 +++ b/factory/v2012/linksend.html	Sun Dec 18 18:57:49 2011 +0100
     2.3 @@ -21,25 +21,18 @@
     2.4  </li>
     2.5  </ul>
     2.6  
     2.7 -<h2>Professional</h2>
     2.8 +<h2>The People and their Sites</h2>
     2.9  <ul>
    2.10 -<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    2.11 -My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    2.12 -<a href="http://eprover.org">E</a>.
    2.13 -</li>
    2.14 -</ul>
    2.15 -
    2.16 -<h2>Friends (with websites)</h2>
    2.17 -<ul>
    2.18 -<!--<li><h4><a href="http://www.tomrocket.com">Thomas Witt</a></h4>
    2.19 -A good friend and designer for the visual arts.
    2.20 -</li>-->
    2.21  <li><h4><a href="http://www.chris-koenig.de">Christian K&ouml;nig</a></h4>
    2.22  An ex-fellow student and companion in the quest for world domination.
    2.23  </li>
    2.24  <li><h4><a href="http://www.unidentify.com">Michael Chlebek</a></h4>
    2.25  An ex-fellow student and friendly programmer.
    2.26  </li>
    2.27 +<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    2.28 +My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    2.29 +<a href="http://eprover.org">E</a>.
    2.30 +</li>
    2.31  </ul>
    2.32  
    2.33  <h2>Recursive</h2>
     3.1 --- a/factory/v2012/script.js	Sun Dec 18 15:57:15 2011 +0100
     3.2 +++ b/factory/v2012/script.js	Sun Dec 18 18:57:49 2011 +0100
     3.3 @@ -8,10 +8,10 @@
     3.4      image.src = "images/logobase.png";
     3.5      $("#logo").click(handle_click);   
     3.6      $("#logo").hover(function() {
     3.7 -        $(this).css("cursor", "pointer");
     3.8 +        $(this).css("cursor", "pointer");        
     3.9      }, function() {
    3.10          $(this).css("cursor", "auto");
    3.11 -    }); 
    3.12 +    });      
    3.13  });
    3.14  
    3.15  $(document).keypress( function(event) {
    3.16 @@ -23,32 +23,33 @@
    3.17  
    3.18  var menu_width = 670;
    3.19  var menu_height = 120;
    3.20 +var menu_splits = new Array(150, 350, 545);
    3.21  
    3.22  var click_events = new Array();
    3.23  click_events["logo"] = new Array();
    3.24  click_events["logo"][0] = new Object();
    3.25  click_events["logo"][0]["min_x"] = 0;
    3.26 -click_events["logo"][0]["max_x"] = Math.round(menu_width/4);
    3.27 +click_events["logo"][0]["max_x"] = menu_splits[0];
    3.28  click_events["logo"][0]["min_y"] = 0;
    3.29  click_events["logo"][0]["max_y"] = menu_height;
    3.30  click_events["logo"][0]["func"] = switch_page;
    3.31  click_events["logo"][0]["args"] = new Array("personalwork.html");
    3.32  click_events["logo"][1] = new Object();
    3.33 -click_events["logo"][1]["min_x"] = Math.round(menu_width/4) + 1;
    3.34 -click_events["logo"][1]["max_x"] = Math.round(menu_width/2);
    3.35 +click_events["logo"][1]["min_x"] = menu_splits[0] + 1;
    3.36 +click_events["logo"][1]["max_x"] = menu_splits[1];
    3.37  click_events["logo"][1]["min_y"] = 0;
    3.38  click_events["logo"][1]["max_y"] = menu_height;
    3.39  click_events["logo"][1]["func"] = switch_page;
    3.40  click_events["logo"][1]["args"] = new Array("howiwork.html");
    3.41  click_events["logo"][2] = new Object();
    3.42 -click_events["logo"][2]["min_x"] = Math.round(menu_width/2) + 1;
    3.43 -click_events["logo"][2]["max_x"] = Math.round(menu_width/4*3);
    3.44 +click_events["logo"][2]["min_x"] = menu_splits[1] + 1;
    3.45 +click_events["logo"][2]["max_x"] = menu_splits[2];
    3.46  click_events["logo"][2]["min_y"] = 0;
    3.47  click_events["logo"][2]["max_y"] = menu_height;
    3.48  click_events["logo"][2]["func"] = switch_page;
    3.49  click_events["logo"][2]["args"] = new Array("books.html");
    3.50  click_events["logo"][3] = new Object();
    3.51 -click_events["logo"][3]["min_x"] = Math.round(menu_width/4*3) + 1;
    3.52 +click_events["logo"][3]["min_x"] = menu_splits[2] + 1;
    3.53  click_events["logo"][3]["max_x"] = menu_width - 1;
    3.54  click_events["logo"][3]["min_y"] = 0;
    3.55  click_events["logo"][3]["max_y"] = menu_height;
    3.56 @@ -116,6 +117,71 @@
    3.57              color_area("logo", p["min_x"], p["max_x"], 0, 70, white);
    3.58          }
    3.59      }
    3.60 +    drawMenuLines();   
    3.61 +}
    3.62 +
    3.63 +function drawMenuLines() {
    3.64 +    var canvas = document.getElementById("logo");
    3.65 +    var context = canvas.getContext("2d");  
    3.66 +    var image = context.getImageData(0, 0, menu_width, menu_height);
    3.67 +    var pixels = image.data;
    3.68 +    context.lineCap = "round";
    3.69 +    context.lineWidth = 1;
    3.70 +    var colour1a = new Colour(0, 0, 0, 0.1);
    3.71 +    context.beginPath();   
    3.72 +    context.moveTo(0, menu_height - 1);
    3.73 +    context.lineTo(menu_width - 1, menu_height - 1);   
    3.74 +    context.closePath();  
    3.75 +    context.strokeStyle = colour1a.str();
    3.76 +    context.stroke();   
    3.77 +var colour1b = new Colour(0, 0, 0, 0.1);  
    3.78 +    context.beginPath();   
    3.79 +    context.moveTo(50, menu_height - 1);
    3.80 +    context.lineTo(menu_width - 51, menu_height - 1);   
    3.81 +    context.closePath();  
    3.82 +    context.strokeStyle = colour1b.str();
    3.83 +    context.stroke();
    3.84 +    var colour1c = new Colour(0, 0, 0, 0.05);  
    3.85 +    context.beginPath();   
    3.86 +    context.moveTo(25, menu_height - 1);
    3.87 +    context.lineTo(menu_width - 26, menu_height - 1);   
    3.88 +    context.closePath();  
    3.89 +    context.strokeStyle = colour1c.str();
    3.90 +    context.stroke();
    3.91 +    var colour1d = new Colour(0, 0, 0, 0.05);  
    3.92 +    context.beginPath();   
    3.93 +    context.moveTo(10, menu_height - 1);
    3.94 +    context.lineTo(menu_width - 11, menu_height - 1);   
    3.95 +    context.closePath();  
    3.96 +    context.strokeStyle = colour1d.str();
    3.97 +    context.stroke();  
    3.98 +    
    3.99 +    var colour2 = new Colour(0, 0, 0, 0.2);
   3.100 +    context.beginPath();  
   3.101 +    context.moveTo(menu_splits[0], 0); 
   3.102 +    context.lineTo(menu_splits[0], menu_height - 1);
   3.103 +    context.moveTo(menu_splits[1], 0);
   3.104 +    context.lineTo(menu_splits[1], menu_height - 1);
   3.105 +    context.moveTo(menu_splits[2], 0);
   3.106 +    context.lineTo(menu_splits[2], menu_height - 1);
   3.107 +    context.closePath();
   3.108 +    context.strokeStyle = colour2.str();
   3.109 +    context.stroke();
   3.110 +
   3.111 +    context.clearRect(menu_splits[0] - 1, menu_height - 1, 2, 2);
   3.112 +    context.clearRect(menu_splits[1] - 1, menu_height - 1, 2, 2);
   3.113 +    context.clearRect(menu_splits[2] - 1, menu_height - 1, 2, 2);
   3.114 +}
   3.115 +
   3.116 +function clearMenuLines() {
   3.117 +    var canvas = document.getElementById("logo");
   3.118 +    var context = canvas.getContext("2d");  
   3.119 +    var image = context.getImageData(0, 0, menu_width, menu_height);
   3.120 +    var pixels = image.data;
   3.121 +    context.clearRect(0, menu_height - 2, menu_width - 1, 2);
   3.122 +    context.clearRect(menu_splits[0] - 1, 0, 2, menu_height - 1);
   3.123 +    context.clearRect(menu_splits[1] - 1, 0, 2, menu_height - 1);
   3.124 +    context.clearRect(menu_splits[2] - 1, 0, 2, menu_height - 1);
   3.125  }
   3.126  
   3.127  function update_logo() {
   3.128 @@ -139,7 +205,7 @@
   3.129      this.r = r;
   3.130      this.g = g;
   3.131      this.b = b;
   3.132 -    this.a = a == undefined ? 255 : a;
   3.133 +    this.a = a == undefined ? 1 : a;
   3.134  }
   3.135  Colour.prototype.equals = function(rhs) {
   3.136      for (p in this) {
   3.137 @@ -150,6 +216,9 @@
   3.138      }
   3.139      return true;
   3.140  }
   3.141 +Colour.prototype.str = function() {
   3.142 +    return "rgba(" + this.r + "," + this.g + "," + this.b + "," + this.a + ")";
   3.143 +}
   3.144  
   3.145  function setPixel(image, x, y, color) {
   3.146      var index = 4 * (x + y * image.width);
     4.1 --- a/links.html	Sun Dec 18 15:57:15 2011 +0100
     4.2 +++ b/links.html	Sun Dec 18 18:57:49 2011 +0100
     4.3 @@ -56,25 +56,18 @@
     4.4  </li>
     4.5  </ul>
     4.6  
     4.7 -<h2>Professional</h2>
     4.8 +<h2>The People and their Sites</h2>
     4.9  <ul>
    4.10 -<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    4.11 -My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    4.12 -<a href="http://eprover.org">E</a>.
    4.13 -</li>
    4.14 -</ul>
    4.15 -
    4.16 -<h2>Friends (with websites)</h2>
    4.17 -<ul>
    4.18 -<!--<li><h4><a href="http://www.tomrocket.com">Thomas Witt</a></h4>
    4.19 -A good friend and designer for the visual arts.
    4.20 -</li>-->
    4.21  <li><h4><a href="http://www.chris-koenig.de">Christian K&ouml;nig</a></h4>
    4.22  An ex-fellow student and companion in the quest for world domination.
    4.23  </li>
    4.24  <li><h4><a href="http://www.unidentify.com">Michael Chlebek</a></h4>
    4.25  An ex-fellow student and friendly programmer.
    4.26  </li>
    4.27 +<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    4.28 +My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    4.29 +<a href="http://eprover.org">E</a>.
    4.30 +</li>
    4.31  </ul>
    4.32  
    4.33  <h2>Recursive</h2>
     5.1 --- a/linksend.html	Sun Dec 18 15:57:15 2011 +0100
     5.2 +++ b/linksend.html	Sun Dec 18 18:57:49 2011 +0100
     5.3 @@ -56,25 +56,18 @@
     5.4  </li>
     5.5  </ul>
     5.6  
     5.7 -<h2>Professional</h2>
     5.8 +<h2>The People and their Sites</h2>
     5.9  <ul>
    5.10 -<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    5.11 -My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    5.12 -<a href="http://eprover.org">E</a>.
    5.13 -</li>
    5.14 -</ul>
    5.15 -
    5.16 -<h2>Friends (with websites)</h2>
    5.17 -<ul>
    5.18 -<!--<li><h4><a href="http://www.tomrocket.com">Thomas Witt</a></h4>
    5.19 -A good friend and designer for the visual arts.
    5.20 -</li>-->
    5.21  <li><h4><a href="http://www.chris-koenig.de">Christian K&ouml;nig</a></h4>
    5.22  An ex-fellow student and companion in the quest for world domination.
    5.23  </li>
    5.24  <li><h4><a href="http://www.unidentify.com">Michael Chlebek</a></h4>
    5.25  An ex-fellow student and friendly programmer.
    5.26  </li>
    5.27 +<li><h4><a href="http://www4.informatik.tu-muenchen.de/~schulz/">Dr. Stephan Schulz</a></h4>
    5.28 +My advisor during my bachelor thesis and creator of the brainiac theorem prover called 
    5.29 +<a href="http://eprover.org">E</a>.
    5.30 +</li>
    5.31  </ul>
    5.32  
    5.33  <h2>Recursive</h2>
     6.1 --- a/script.js	Sun Dec 18 15:57:15 2011 +0100
     6.2 +++ b/script.js	Sun Dec 18 18:57:49 2011 +0100
     6.3 @@ -8,10 +8,10 @@
     6.4      image.src = "images/logobase.png";
     6.5      $("#logo").click(handle_click);   
     6.6      $("#logo").hover(function() {
     6.7 -        $(this).css("cursor", "pointer");
     6.8 +        $(this).css("cursor", "pointer");        
     6.9      }, function() {
    6.10          $(this).css("cursor", "auto");
    6.11 -    }); 
    6.12 +    });      
    6.13  });
    6.14  
    6.15  $(document).keypress( function(event) {
    6.16 @@ -23,32 +23,33 @@
    6.17  
    6.18  var menu_width = 670;
    6.19  var menu_height = 120;
    6.20 +var menu_splits = new Array(150, 350, 545);
    6.21  
    6.22  var click_events = new Array();
    6.23  click_events["logo"] = new Array();
    6.24  click_events["logo"][0] = new Object();
    6.25  click_events["logo"][0]["min_x"] = 0;
    6.26 -click_events["logo"][0]["max_x"] = Math.round(menu_width/4);
    6.27 +click_events["logo"][0]["max_x"] = menu_splits[0];
    6.28  click_events["logo"][0]["min_y"] = 0;
    6.29  click_events["logo"][0]["max_y"] = menu_height;
    6.30  click_events["logo"][0]["func"] = switch_page;
    6.31  click_events["logo"][0]["args"] = new Array("personalwork.html");
    6.32  click_events["logo"][1] = new Object();
    6.33 -click_events["logo"][1]["min_x"] = Math.round(menu_width/4) + 1;
    6.34 -click_events["logo"][1]["max_x"] = Math.round(menu_width/2);
    6.35 +click_events["logo"][1]["min_x"] = menu_splits[0] + 1;
    6.36 +click_events["logo"][1]["max_x"] = menu_splits[1];
    6.37  click_events["logo"][1]["min_y"] = 0;
    6.38  click_events["logo"][1]["max_y"] = menu_height;
    6.39  click_events["logo"][1]["func"] = switch_page;
    6.40  click_events["logo"][1]["args"] = new Array("howiwork.html");
    6.41  click_events["logo"][2] = new Object();
    6.42 -click_events["logo"][2]["min_x"] = Math.round(menu_width/2) + 1;
    6.43 -click_events["logo"][2]["max_x"] = Math.round(menu_width/4*3);
    6.44 +click_events["logo"][2]["min_x"] = menu_splits[1] + 1;
    6.45 +click_events["logo"][2]["max_x"] = menu_splits[2];
    6.46  click_events["logo"][2]["min_y"] = 0;
    6.47  click_events["logo"][2]["max_y"] = menu_height;
    6.48  click_events["logo"][2]["func"] = switch_page;
    6.49  click_events["logo"][2]["args"] = new Array("books.html");
    6.50  click_events["logo"][3] = new Object();
    6.51 -click_events["logo"][3]["min_x"] = Math.round(menu_width/4*3) + 1;
    6.52 +click_events["logo"][3]["min_x"] = menu_splits[2] + 1;
    6.53  click_events["logo"][3]["max_x"] = menu_width - 1;
    6.54  click_events["logo"][3]["min_y"] = 0;
    6.55  click_events["logo"][3]["max_y"] = menu_height;
    6.56 @@ -116,6 +117,71 @@
    6.57              color_area("logo", p["min_x"], p["max_x"], 0, 70, white);
    6.58          }
    6.59      }
    6.60 +    drawMenuLines();   
    6.61 +}
    6.62 +
    6.63 +function drawMenuLines() {
    6.64 +    var canvas = document.getElementById("logo");
    6.65 +    var context = canvas.getContext("2d");  
    6.66 +    var image = context.getImageData(0, 0, menu_width, menu_height);
    6.67 +    var pixels = image.data;
    6.68 +    context.lineCap = "round";
    6.69 +    context.lineWidth = 1;
    6.70 +    var colour1a = new Colour(0, 0, 0, 0.1);
    6.71 +    context.beginPath();   
    6.72 +    context.moveTo(0, menu_height - 1);
    6.73 +    context.lineTo(menu_width - 1, menu_height - 1);   
    6.74 +    context.closePath();  
    6.75 +    context.strokeStyle = colour1a.str();
    6.76 +    context.stroke();   
    6.77 +var colour1b = new Colour(0, 0, 0, 0.1);  
    6.78 +    context.beginPath();   
    6.79 +    context.moveTo(50, menu_height - 1);
    6.80 +    context.lineTo(menu_width - 51, menu_height - 1);   
    6.81 +    context.closePath();  
    6.82 +    context.strokeStyle = colour1b.str();
    6.83 +    context.stroke();
    6.84 +    var colour1c = new Colour(0, 0, 0, 0.05);  
    6.85 +    context.beginPath();   
    6.86 +    context.moveTo(25, menu_height - 1);
    6.87 +    context.lineTo(menu_width - 26, menu_height - 1);   
    6.88 +    context.closePath();  
    6.89 +    context.strokeStyle = colour1c.str();
    6.90 +    context.stroke();
    6.91 +    var colour1d = new Colour(0, 0, 0, 0.05);  
    6.92 +    context.beginPath();   
    6.93 +    context.moveTo(10, menu_height - 1);
    6.94 +    context.lineTo(menu_width - 11, menu_height - 1);   
    6.95 +    context.closePath();  
    6.96 +    context.strokeStyle = colour1d.str();
    6.97 +    context.stroke();  
    6.98 +    
    6.99 +    var colour2 = new Colour(0, 0, 0, 0.2);
   6.100 +    context.beginPath();  
   6.101 +    context.moveTo(menu_splits[0], 0); 
   6.102 +    context.lineTo(menu_splits[0], menu_height - 1);
   6.103 +    context.moveTo(menu_splits[1], 0);
   6.104 +    context.lineTo(menu_splits[1], menu_height - 1);
   6.105 +    context.moveTo(menu_splits[2], 0);
   6.106 +    context.lineTo(menu_splits[2], menu_height - 1);
   6.107 +    context.closePath();
   6.108 +    context.strokeStyle = colour2.str();
   6.109 +    context.stroke();
   6.110 +
   6.111 +    context.clearRect(menu_splits[0] - 1, menu_height - 1, 2, 2);
   6.112 +    context.clearRect(menu_splits[1] - 1, menu_height - 1, 2, 2);
   6.113 +    context.clearRect(menu_splits[2] - 1, menu_height - 1, 2, 2);
   6.114 +}
   6.115 +
   6.116 +function clearMenuLines() {
   6.117 +    var canvas = document.getElementById("logo");
   6.118 +    var context = canvas.getContext("2d");  
   6.119 +    var image = context.getImageData(0, 0, menu_width, menu_height);
   6.120 +    var pixels = image.data;
   6.121 +    context.clearRect(0, menu_height - 2, menu_width - 1, 2);
   6.122 +    context.clearRect(menu_splits[0] - 1, 0, 2, menu_height - 1);
   6.123 +    context.clearRect(menu_splits[1] - 1, 0, 2, menu_height - 1);
   6.124 +    context.clearRect(menu_splits[2] - 1, 0, 2, menu_height - 1);
   6.125  }
   6.126  
   6.127  function update_logo() {
   6.128 @@ -139,7 +205,7 @@
   6.129      this.r = r;
   6.130      this.g = g;
   6.131      this.b = b;
   6.132 -    this.a = a == undefined ? 255 : a;
   6.133 +    this.a = a == undefined ? 1 : a;
   6.134  }
   6.135  Colour.prototype.equals = function(rhs) {
   6.136      for (p in this) {
   6.137 @@ -150,6 +216,9 @@
   6.138      }
   6.139      return true;
   6.140  }
   6.141 +Colour.prototype.str = function() {
   6.142 +    return "rgba(" + this.r + "," + this.g + "," + this.b + "," + this.a + ")";
   6.143 +}
   6.144  
   6.145  function setPixel(image, x, y, color) {
   6.146      var index = 4 * (x + y * image.width);