diff --git a/README.md b/README.md
index 5b49712..8e3fb39 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ See the [API Reference](api/README.md) for details.
## GitCDN
Use the link [https://gitcdn.xyz/repo/goessner/g2/master/g2.min.js](https://gitcdn.xyz/repo/goessner/g2/master/g2.min.js)
-for getting the latest commit as a rqw file.
+for getting the latest commit as a raw file.
In HTML use ...
```html
@@ -66,6 +66,17 @@ g2 is licensed under the terms of the MIT License.
#Change Log
+## 2.2.0 - 2016-06-20
+### Added
+
+* `g2.spline` performing 'centripetal Catmull-Rom' interpolation.
+
+### Modified
+
+* experimental `g2.State.hatch` removed.
+*
+* `g2.prototype.ply.iterator`default iterators modified for improved efficiency and working also with splines.
+
## 2.1.1 - 2016-05-15
### Modified
diff --git a/api/README.md b/api/README.md
index aaabdb1..54e93bf 100644
--- a/api/README.md
+++ b/api/README.md
@@ -38,20 +38,19 @@ Create a queue of 2D graphics commands.
* [.cir(x, y, r, [style])](#g2+cir) ⇒ object
* [.arc(x, y, r, [w], [dw], [style])](#g2+arc) ⇒ object
* [.ply(parr, [mode], args)](#g2+ply) ⇒ object
+ * [.spline(p, [closed], style)](#g2+spline) ⇒ object
* [.beg(args)](#g2+beg) ⇒ object
* [.end()](#g2+end) ⇒ object
* [.clr()](#g2+clr) ⇒ object
* [.grid([color], [size])](#g2+grid) ⇒ object
* [.use(g, args)](#g2+use) ⇒ object
* [.style(args)](#g2+style) ⇒ object
- * [.exe(ctx, [g])](#g2+exe) ⇒ object
+ * [.exe(ctx)](#g2+exe) ⇒ object
* [.cpy(g)](#g2+cpy) ⇒ object
* [.pntToUsr(x, y, [h])](#g2+pntToUsr) ⇒ object
* [.vecToUsr(x, y)](#g2+vecToUsr) ⇒ object
- * [.dump([space])](#g2+dump) ⇒ string
* _static_
* [.symbol](#g2.symbol) : object
- * [.transparent](#g2.transparent) : string
### g2.cartesian([on]) ⇒ object
@@ -368,6 +367,24 @@ Draw polygon by points.
Using iterator function for getting points from array by
```js
g2().ply([100,50,120,60,80,70]),
.ply([150,60],[170,70],[130,80]],true),
.ply({x:160,y:70},{x:180,y:80},{x:140,y:90}],'split'),
.exe(ctx);
```
+
+### g2.spline(p, [closed], style) ⇒ object
+Draw spline by points.
Implementing a centripetal Catmull-Rom spline (thus avoiding cusps and self-intersections).
Using iterator function for getting points from array by index.
It must return current point object {x,y} or object {done:true}.
Default iterator expects sequence of x/y-coordinates as a flat array [x,y,...],
array of [[x,y],...] arrays or array of [{x,y},...] objects.
+
+**Kind**: instance method of [g2](#g2)
+**Returns**: object
- this
+**See**
+
+- https://pomax.github.io/bezierinfo
+- https://de.wikipedia.org/wiki/Kubisch_Hermitescher_Spline
[Example](https://goessner.github.io/g2-svg/test/index.html#ply)
+
+
+| Param | Type | Default | Description |
+| --- | --- | --- | --- |
+| p | array
| | Array of points. |
+| [closed] | bool
| false
| Closed spline. |
+| style | object
| | Style object. |
+
### g2.beg(args) ⇒ object
Begin subcommands. Current state is saved.
Optionally apply transformation or style properties.
[Example](https://goessner.github.io/g2-svg/test/index.html#beg-end)
@@ -464,16 +481,15 @@ Apply new style properties.
g = g2();
g2().style({ fs:"#58dbfa", // Set fill style.
lw:10, // Set line width.
ls:"#313942", // Set line style.
lj:"round" }) // Set line join.
.rec(10,10,300,100)
.style({ lw:20, // Set line width.
fs:"transparent", // Set fill style.
sh:[10,0,10,"black"], // Set shadow x-translation.
ld:[1,2] }) // Set line dash.
.p().m(40,40).c(150,150,200,0,280,50).drw()
.exe(ctx);
```
-### g2.exe(ctx, [g]) ⇒ object
+### g2.exe(ctx) ⇒ object
Execute g2 commands. It does so automatically and recursively with 'use'ed commands.
**Kind**: instance method of [g2](#g2)
**Returns**: object
- g2
-| Param | Type | Default | Description |
-| --- | --- | --- | --- |
-| ctx | object
| | Context. |
-| [g] | object
| this
| g2 Object to execute. This argument is set by 'g2' and usually not by the user. |
+| Param | Type | Description |
+| --- | --- | --- |
+| ctx | object
| Context. |
### g2.cpy(g) ⇒ object
@@ -519,17 +535,6 @@ Get user coordinates from device coordinates for unbound vector.
| x | float
| x-value in device units. |
| y | float
| y-value in device units. |
-
-### g2.dump([space]) ⇒ string
-Debug helper method.
Convert g2 command queue to JSON formatted string.
-
-**Kind**: instance method of [g2](#g2)
-**Returns**: string
- JSON string of command queue.
-
-| Param | Type | Description |
-| --- | --- | --- |
-| [space] | string
| Number of spaces to use for indenting JSON output. |
-
### g2.symbol : object
Namespace for symbol objects. A symbol can be used by `use("symbolname")`.
@@ -539,8 +544,3 @@ Namespace for symbol objects. A symbol can be used by `use("symbolname")`.
```js
g2.symbol.cross = g2().lin(5,5,-5,-5).lin(5,-5,-5,5); // Define symbol.
g2().use("cross",{x:100,y:100}) // Draw cross at position 100,100.
.exe(ctx); // Render to context.
```
-
-### g2.transparent : string
-Current version.
Using semantic versioning 'http://semver.org/'.
-
-**Kind**: static constant of [g2](#g2)
diff --git a/examples/catrom-quarter-works-unexpectedly.html b/examples/catrom-quarter-works-unexpectedly.html
deleted file mode 100644
index 278416c..0000000
--- a/examples/catrom-quarter-works-unexpectedly.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-