/*
	GEIESPICTURES - The picture language from chapter 2 of SICP
	Author: Marco Faustinelli (contacts@faustinelli.net)
	Web: http://faustinelli.net/
	     http://faustinelli.wordpress.com/
	Version: 0.1 - Requires Geieslists 1.1 and Geiesvectors 0.1

	The MIT License - Copyright (c) 2016 Geiespictures Project
*/
var P = function(L, V) {
  var make_frame = (origin, edge1, edge2) => L.ArrayToList([origin, edge1, edge2]);
  var origin_frame = frame => L.first(frame);
  var edge1_frame = frame => L.second(frame);
  var edge2_frame = frame => L.third(frame);

  var frame_coord_map = frame => vector =>
    V.add_vect(origin_frame(frame),
               V.add_vect(V.scale_vect(edge1_frame(frame),
                                       V.xcor_vect(vector)),
                          V.scale_vect(edge2_frame(frame),
                                       V.ycor_vect(vector))));

  var make_segment = (start, end) => L.ArrayToList([start, end]);
  var start_segment = segment => L.first(segment);
  var end_segment = segment => L.second(segment);

  // painter(what)(where)(canvasContext)
  var segments_painter = segments => frame => ctx => {
    var canvasWidth = ctx.canvas.clientWidth;
    var canvasHeight = ctx.canvas.clientHeight;
    var newY = y => -y + canvasHeight;
    var draw_segment = segment => {
      var coordinateMapper = frame_coord_map(frame);
      var startPoint = coordinateMapper(start_segment(segment));
      var endPoint = coordinateMapper(end_segment(segment));
      ctx.beginPath();
      ctx.moveTo(V.xcor_vect(startPoint), newY(V.ycor_vect(startPoint)));
      ctx.lineTo(V.xcor_vect(endPoint), newY(V.ycor_vect(endPoint)));
      ctx.stroke();
    }
    segments.forEach(draw_segment);
  }
  return {
    make_frame: make_frame,
    origin_frame: origin_frame,
    edge1_frame: edge1_frame,
    edge2_frame: edge2_frame,
    frame_coord_map: frame_coord_map,
    make_segment: make_segment,
    segments_painter: segments_painter
  }
}(L, V);

@@ -1134,16 +1134,57 @@
  =%3E 
+(
 ctx
- =%3E %7B
+, color) =%3E %7B%0A    color = color %7C%7C '#000000';
 %0A   
@@ -1289,19 +1289,137 @@
  new
-Y = y =%3E -y
+OriginX = canvasWidth/2;%0A    var newOriginY = canvasHeight/2;%0A    var X = x =%3E x + newOriginX;%0A    var Y = y =%3E -(y + newOriginY)
  + c
@@ -1682,24 +1682,26 @@
  ctx.moveTo(
+X(
 V.xcor_vect(
@@ -1707,29 +1707,27 @@
 (startPoint)
+)
 , 
-new
 Y(V.ycor_vec
@@ -1760,16 +1760,18 @@
 .lineTo(
+X(
 V.xcor_v
@@ -1787,13 +1787,11 @@
 int)
+)
 , 
-new
 Y(V.
@@ -1805,32 +1805,63 @@
 ct(endPoint)));%0A
+      ctx.strokeStyle = color;%0A
       ctx.stroke

Update geiespictures_0.1.js