xxxxxxxxxx
50
// Shorthand createVector function alias
function v(x, y) {
return createVector(x, y);
}
// Define the pixel heart points with "vectors"
function makeHeart() {
h = [
// Row 1
v(-2, -2.5),
v(-1, -2.5),
v(1, -2.5),
v(2, -2.5),
// Row 2
v(-3, -1.5),
v(-2, -1.5),
v(-1, -1.5),
v(0, -1.5),
v(1, -1.5),
v(2, -1.5),
v(3, -1.5),
// Row 3
v(-3, -0.5),
v(-2, -0.5),
v(-1, -0.5),
v(0, -0.5),
v(1, -0.5),
v(2, -0.5),
v(3, -0.5),
// Row 4
v(-2, 0.5),
v(-1, 0.5),
v(0, 0.5),
v(1, 0.5),
v(2, 0.5),
// Row 5
v(-1, 1.5),
v(0, 1.5),
v(1, 1.5),
// Row 6
v(0, 2.5),
];
return h;
}