function drawCamera(canvas_inputs) {
let ctx = d3.select("#fov_image").node().getContext('2d')
let cx = width/2;
let cy = canvas_height/2;
ctx.clearRect(0, 0, width, canvas_height)
let scaled_z = canvas_inputs.z * canvas_scale;
let z_padding = canvas_z_padding * canvas_scale;
let y_adjust = -canvas_inputs.y * canvas_scale;
ctx.beginPath();
ctx.moveTo(width - z_padding - scaled_z + canvas_inputs.near_plane * canvas_scale, 0)
ctx.lineTo(width - z_padding - scaled_z + canvas_inputs.far_plane * canvas_scale, 0)
ctx.lineTo(width - z_padding - scaled_z + canvas_inputs.far_plane * canvas_scale, canvas_height)
ctx.lineTo(width - z_padding - scaled_z + canvas_inputs.near_plane * canvas_scale, canvas_height)
ctx.closePath();
ctx.fillStyle = "#ddd";
ctx.fill();
ctx.beginPath();
ctx.moveTo(width - z_padding, cy + y_adjust)
ctx.lineTo(width - z_padding - scaled_z, cy + y_adjust);
ctx.setLineDash([4, 4]);
ctx.lineWidth = 2;
ctx.stroke();
let half_fov = canvas_inputs.fov/2;
let half_fov_radians = toRadians(half_fov);
let fov_height = 2* Math.tan(half_fov_radians) * canvas_inputs.z;
ctx.setLineDash([]);
ctx.beginPath();
ctx.moveTo(width - z_padding - scaled_z, cy + y_adjust)
ctx.lineTo(width - z_padding, cy - (fov_height / 2 * canvas_scale) + y_adjust);
ctx.lineTo(width - z_padding, cy + (fov_height / 2 * canvas_scale) + y_adjust);
ctx.closePath();
ctx.strokeStyle = "purple";
ctx.lineWidth = 3;
ctx.stroke();
ctx.beginPath();
ctx.arc(width - z_padding - scaled_z, cy + y_adjust, 9, 0, Math.PI * 2, true);
ctx.lineWidth = 0;
ctx.fillStyle = "black";
ctx.fill();
ctx.beginPath();
ctx.moveTo(width - z_padding, cy - viz_height / 2 * canvas_scale);
ctx.lineTo(width - z_padding, cy + viz_height / 2 * canvas_scale);
ctx.lineWidth = 4;
ctx.strokeStyle = "blue";
ctx.stroke();
ctx.beginPath();
ctx.moveTo(width - z_padding, cy - points_radius * canvas_scale);
ctx.lineTo(width - z_padding, cy + points_radius * canvas_scale);
ctx.lineWidth = 6;
ctx.strokeStyle = "green";
ctx.stroke();
}