BarBot
Visual Interaction and Planning algorithms
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.9/p5.min.js"></script>
JavaScript
var top_tray, bot_tray;
function setup() {
createCanvas(300, 300);
top_tray = new Plane(2 * width / 3);
bot_tray = new Plane(3 * width / 4);
noFill();
}
function draw() {
bot_tray.show();
top_tray.show();
}
function Plane(size) {
this.targets = [];
this.size = size;
this.show = function() {
ellipse(width/2, height/2, this.size, this.size);
};
this.update = function() {
// TODO
};
}
function Target() {
// TODO
}