JohnD_,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<canvas class="canvas" width="400" height="200"></canvas>
<script>
var canvas = document.querySelector(".canvas");
var ctx = canvas.getContext("2d");
function Cat(name, src) {
this.name = name;
this.img = new Image;
this.img.src = src || "cat.jpg";
}
Cat.prototype.drawing = function() {
var x = (canvas.width - 100) * Math.random() | 0;
var y = (canvas.height - 80) * Math.random() | 0;
ctx.drawImage(this.img, x, y, 100, 80);
};
var cat = new Cat("Max", "http://kinoclub.to/wp-content/uploads/2016/04/y_1483200759_47567.jpg");
cat.drawing();
</script>
</body>
</html>