Test
Aus Wiki1
(Unterschied zwischen Versionen)
(Der Versionsvergleich bezieht 4 dazwischenliegende Versionen mit ein.) | |||
Zeile 29: | Zeile 29: | ||
// Plot the temperature distribution at time t=0 | // Plot the temperature distribution at time t=0 | ||
- | var heatmap = board.create(' | + | var heatmap = board.create('polygon', [points, initialTemp], {colorscheme:'greyscale', minopacity:0.5}); |
// Animate the temperature distribution over time | // Animate the temperature distribution over time | ||
Zeile 38: | Zeile 38: | ||
var values = []; | var values = []; | ||
for (var i=0; i<points.length; i++) { | for (var i=0; i<points.length; i++) { | ||
- | + | values.push(temp(points[i][0], points[i][1], time)); | |
- | + | } | |
- | + | heatmap.updateData(values); | |
if (time >= 2) clearInterval(interval); | if (time >= 2) clearInterval(interval); | ||
}, 100); | }, 100); | ||
- | |||
</jsxgraph> | </jsxgraph> |