context.lineTo(zoom * wing_span / 2, zoom * (sweep_dist + tip_chord)); context.lineTo(0, zoom * root_chord); context.lineTo(zoom * wing_span / -2, zoom * (sweep_dist + tip_chord)); context.lineTo(zoom * wing_span / -2, zoom * sweep_dist); context.closePath(); context.strokeStyle="#000000"; context.stroke(); context.beginPath(); context.moveTo(0, 0); context.lineTo(0, zoom * root_chord); context.lineWidth = 1.0; context.stroke();}function paint_mac_lines(){ context.beginPath(); context.moveTo(0, 0); context.lineTo(0, zoom * -tip_chord); context.lineTo(zoom * wing_span / 2, zoom * (sweep_dist + tip_chord + root_chord)); context.lineTo(zoom * wing_span / 2, zoom * (sweep_dist + tip_chord)); context.lineWidth = 0.5; context.strokeStyle="#ff00ff"; context.stroke(); context.beginPath(); context.moveTo(0, zoom * root_chord); context.lineTo(0, zoom * (root_chord + tip_chord)); context.lineTo(zoom * wing_span / 2, zoom * (sweep_dist - root_chord)); context.lineTo(zoom * wing_span / 2, zoom * sweep_dist); context.stroke();}function paint_mac(){ context.beginPath(); context.moveTo(zoom * mac_x, zoom * le_mac_y); context.lineTo(zoom * mac_x, zoom * te_mac_y); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.stroke(); context.beginPath(); context.moveTo(0, zoom * cg_dist); context.lineTo(zoom * mac_x, zoom * cg_dist); context.stroke(); var cg_radius = 10; context.beginPath(); context.arc(0, zoom * cg_dist, cg_radius, 0, Math.PI * 2.0, false); context.strokeStyle="#000000"; context.stroke(); context.beginPath(); context.arc(0, zoom * cg_dist, cg_radius, 0, Math.PI * 0.5, false); context.lineTo(0, zoom * cg_dist); context.arc(0, zoom * cg_dist, cg_radius, Math.PI * 1.0, Math.PI * 1.5, false); context.lineTo(0, zoom * cg_dist); context.fillStyle="#000000"; context.fill();}function paint_wing_span(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(zoom * wing_span * -0.5, -5); context.lineTo(zoom * wing_span * -0.5, -25); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span * 0.5, -5); context.lineTo(zoom * wing_span * 0.5, -25); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span * -0.5, -15); context.lineTo(zoom * wing_span * 0.5, -15); context.stroke();}function paint_root_chord(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(-15, 0); context.lineTo(-35, 0); context.stroke(); context.beginPath(); context.moveTo(-15, zoom * root_chord); context.lineTo(-35, zoom * root_chord); context.stroke(); context.beginPath(); context.moveTo(-25, 0); context.lineTo(-25, zoom * root_chord); context.stroke();}function paint_sweep_dist(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(zoom * wing_span / 2 - 15, 0); context.lineTo(zoom * wing_span / 2 - 35, 0); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span / 2 - 15, zoom * sweep_dist); context.lineTo(zoom * wing_span / 2 - 35, zoom * sweep_dist); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span / 2 - 25, 0); context.lineTo(zoom * wing_span / 2 - 25, zoom * sweep_dist); context.stroke();}function paint_sweep_ang(){ var a = sweep_ang * Math.PI / 180; context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.arc(0, -10, 40, 0, a, false); context.stroke(); context.beginPath(); context.moveTo(75, -10); context.lineTo(0, -10); context.lineTo(0 + Math.cos(a) * 75, -10 + Math.sin(a) * 75); context.stroke();}function paint_tip_chord(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(zoom * wing_span / 2 - 15, zoom * sweep_dist); context.lineTo(zoom * wing_span / 2 - 35, zoom * sweep_dist); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span / 2 - 15, zoom * (sweep_dist + tip_chord)); context.lineTo(zoom * wing_span / 2 - 35, zoom * (sweep_dist + tip_chord)); context.stroke(); context.beginPath(); context.moveTo(zoom * wing_span / 2 - 25, zoom * sweep_dist); context.lineTo(zoom * wing_span / 2 - 25, zoom * (sweep_dist + tip_chord)); context.stroke();}function paint_mac_distance(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(0, -5); context.lineTo(0, -25); context.stroke(); context.beginPath(); context.moveTo(zoom * mac_x, -5); context.lineTo(zoom * mac_x, -25); context.stroke(); context.beginPath(); context.moveTo(0, -15); context.lineTo(zoom * mac_x, -15); context.stroke();}function paint_mac_length(){ context.beginPath(); context.strokeStyle="#ff0000"; context.lineWidth = 1.0; context.moveTo(zoom * mac_x + 15, zoom * le_mac_y); context.lineTo(zoom * mac_x + 35, zoom * le_mac_y); context.stroke(); context.beginPath(); context.moveTo(zoom * mac_x + 15, zoom * te_mac_y); context.lineTo(zoom * mac_x +