diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-27 12:42:48 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-09-27 12:42:48 -0400 |
| commit | 210e8feae2fb4842bfb2de38666e6c41671fef3c (patch) | |
| tree | cbdafa34b1a6260bb20236d7e9de9eb1b690a1c5 /www/lib/vis/examples/graph2d/06_interpolation.html | |
| parent | e7e7baeaad90229ccb3e0f45f4ebd77be7d79b14 (diff) | |
removed lib
Diffstat (limited to 'www/lib/vis/examples/graph2d/06_interpolation.html')
| -rw-r--r-- | www/lib/vis/examples/graph2d/06_interpolation.html | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/www/lib/vis/examples/graph2d/06_interpolation.html b/www/lib/vis/examples/graph2d/06_interpolation.html deleted file mode 100644 index 9daa7e07..00000000 --- a/www/lib/vis/examples/graph2d/06_interpolation.html +++ /dev/null @@ -1,101 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> - <title>Graph2d | Interpolation</title> - <link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" /> - <style type="text/css"> - body, html { - font-family: sans-serif; - } - </style> - - <script src="../../dist/vis.js"></script> - -<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head> -<body> -<h2>Graph2d | Interpolation</h2> -<div style="width:700px; font-size:14px; text-align: justify;"> - The Graph2d makes use of <a href="http://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline" target="_blank">Catmull-Rom spline interpolation</a>. - The user can configure these per group, or globally. In this example we show all 4 possiblities. The differences are in the parametrization of - the curves. The options are <code>uniform</code>, <code>chordal</code> and <code>centripetal</code>. Alternatively you can disable the Catmull-Rom interpolation and - a linear interpolation will be used. The <code>centripetal</code> parametrization produces the best result (no self intersection, yet follows the line closely) and is therefore the default setting. - <br /><br /> - For both the <code>centripetal</code> and <code>chordal</code> parametrization, the distances between the points have to be calculated and this makes these methods computationally intensive - if there are very many points. The <code>uniform</code> parametrization still has to do transformations, though it does not have to calculate the distance between point. Finally, the - linear interpolation is the fastest method. For more on the Catmull-Rom method, <a href="http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf" target="_blank">C. Yuksel et al. have an interesting paper titled ″On the parametrization of Catmull-Rom Curves″</a>. -</div> -<br /> -<div id="visualization"></div> - -<script type="text/javascript"> - // create a dataSet with groups - var names = ['centripetal', 'chordal', 'uniform', 'disabled']; - var groups = new vis.DataSet(); - groups.add({ - id: 0, - content: names[0], - options: { - drawPoints: false, - interpolation: { - parametrization: 'centripetal' - } - }}); - - groups.add({ - id: 1, - content: names[1], - options: { - drawPoints: false, - interpolation: { - parametrization: 'chordal' - } - }}); - - groups.add({ - id: 2, - content: names[2], - options: { - drawPoints: false, - interpolation: { - parametrization: 'uniform' - } - } - }); - - groups.add({ - id: 3, - content: names[3], - options: { - drawPoints: { style: 'circle' }, - interpolation: false - }}); - - var container = document.getElementById('visualization'); - var dataset = new vis.DataSet(); - for (var i = 0; i < names.length; i++) { - dataset.add( [ - {x: '2014-06-12', y: 0 , group: i}, - {x: '2014-06-13', y: 40, group: i}, - {x: '2014-06-14', y: 10, group: i}, - {x: '2014-06-15', y: 15, group: i}, - {x: '2014-06-15', y: 30, group: i}, - {x: '2014-06-17', y: 10, group: i}, - {x: '2014-06-18', y: 15, group: i}, - {x: '2014-06-19', y: 52, group: i}, - {x: '2014-06-20', y: 10, group: i}, - {x: '2014-06-21', y: 20, group: i} - ]); - } - - var options = { - drawPoints: false, - dataAxis: {visible: false}, - legend: true, - start: '2014-06-11', - end: '2014-06-22' - }; - var graph2d = new vis.Graph2d(container, dataset, groups, options); - -</script> -</body> -</html>
\ No newline at end of file |
