function drawChristmasTree(ctx, x, y, size, popT, incomeT) {
ctx.beginPath();
ctx.fillStyle = "#228B22";
ctx.strokeStyle = "black";
ctx.lineWidth = 2;
const numLayers = 5;
const trunkWidth = (size / 5) * popT;
const trunkHeight = (size / 5) * popT;
for (let i = 0; i < numLayers; i++) {
const layerHeight = (size / 2) * (i / numLayers) * popT;
const layerWidth = (size / 2) * ((i + 1) / numLayers) * popT;
ctx.moveTo(x - layerWidth / 2, y - layerHeight - trunkHeight / 2);
ctx.lineTo(x + layerWidth / 2, y - layerHeight - trunkHeight / 2);
ctx.lineTo(x, y - trunkHeight / 2);
ctx.closePath();
ctx.fill();
ctx.stroke();
}
ctx.fillStyle = "brown";
ctx.fillRect(x - trunkWidth / 2, y, trunkWidth, trunkHeight);
}