{"id":880,"date":"2024-02-08T10:46:15","date_gmt":"2024-02-08T15:46:15","guid":{"rendered":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/?p=880"},"modified":"2026-01-30T11:49:50","modified_gmt":"2026-01-30T16:49:50","slug":"creating-a-flight-tracking-dashboard-part-1-visualizing-an-aircraft","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/2024\/02\/08\/creating-a-flight-tracking-dashboard-part-1-visualizing-an-aircraft\/","title":{"rendered":"Creating a Flight Tracking Dashboard, Part 1: Visualizing an Aircraft"},"content":{"rendered":"<div class=\"rtcContent\">\n<div>\n<table style=\"background-color: #e2f0ff\">\n<tbody>\n<tr>\n<td style=\"width: 120px;padding: 3px;vertical-align: middle\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft wp-image-832\" src=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/kdeeley-150x150.jpg\" alt=\"\" width=\"110\" height=\"110\" \/><\/td>\n<td style=\"vertical-align: middle;padding: 3px\"><strong>Guest Writer: <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/2987674\">Ken Deeley<\/a><br \/>\n<\/strong><\/p>\n<div class=\"content\">\n<div class=\"SectionBlock first active\">\n<div class=\"SD57BF6401\">Ken is an application engineer in Cambridge, UK, supporting MathWorks users with their technical computing projects. Ken joined the MathWorks customer training team in 2011 after research work in mathematics with applications to motion planning for autonomous guided vehicle (AGV) robotics. Ken specializes in software development, machine learning, and financial applications, with a particular focus on graphics and app development. He enjoys training MathWorks users on best practices, working with customers on consulting projects, and capturing common customer workflows and requirements to inform future MathWorks development activities.<\/div>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr \/>\n<p><a href=\"https:\/\/matlab.mathworks.com\/open\/github\/v1?repo=MATLAB-Graphics-and-App-Building\/matlab-gaab-blog-2024&amp;file=FlightTrackingDashboard\/FlightTrackingDashboard_Part1.mlx\" target=\"_blank\" rel=\"nofollow noopener\"><img decoding=\"async\" class=\"\" src=\"https:\/\/www.mathworks.com\/images\/responsive\/global\/open-in-matlab-online.svg\" alt=\"Open in MATLAB Online\" \/><\/a><\/p>\n<h1 id=\"H_701E9FF1\" style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">Overview<\/span><\/h1>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">MATLAB provides a large suite of visualization functions tailored to scientific and engineering applications. In addition, MATLAB enables you to develop domain-specific visualizations. These can be embedded in all data analytics workflows, ranging from small-scale interactive <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2023b\/matlab\/develop-live-editor-tasks.html\">tasks<\/a> to more complex <a href=\"https:\/\/www.mathworks.com\/products\/matlab-report-generator.html\">reports<\/a>, <a href=\"https:\/\/www.mathworks.com\/products\/matlab\/app-designer.html\">apps<\/a> and <a href=\"https:\/\/www.mathworks.com\/products\/matlab-web-app-server.html\">web apps<\/a> such as dashboard-like front ends.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Let's assume that we've been tasked with developing a custom dashboard for monitoring an aircraft during a flight. Over the course of this three-part blog series, we'll see how to put together this dashboard by breaking it down into several simpler steps.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Here's a screenshot of what we'll be laying out. We'll be including visualizations for tracking the aircraft during its flight, and flight instruments to display the flight data. There will also be some controls for configuring the appearance of the dashboard.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"618\" class=\"size-large wp-image-2625 alignnone\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1.mlx-1--1024x618.png\" alt=\"\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">In this first blog post, we'll focus on creating an important part of the dashboard - a visualization to display a model of the aircraft together with its current attitude (roll, pitch, and yaw). We'll learn some general visualization techniques such as working with stereolithography (STL) files, 3D surfaces, and transforming 3D graphics.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">In the <a href=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/2024\/07\/31\/creating-a-flight-tracking-dashboard-part-2-developing-an-aircraft-chart\/\">next post in this series<\/a>, we'll see how to encapsulate the 3D graphics and helper functions in a custom aircraft chart. This approach is more suited to modular application development. In the third and final post, we'll see how to connect the aircraft chart with other controls and displays in the final dashboard.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Let's get started!<\/div>\n<div style=\"margin-bottom: 20px;padding-bottom: 4px\">\n<div style=\"margin: 0px;padding: 10px 0px 10px 5px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: bold;text-align: start\"><span style=\"font-weight: bold\">Table of Contents<\/span><\/div>\n<div style=\"margin: -1px 0px 0px;padding: 10px 0px 10px 7px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: start\"><a href=\"#H_BFF2152C\">Import and visualize a 3D aircraft model.<br \/>\n<\/a><a href=\"#H_49C97311\">Improve the default 3D visualization of the aircraft.<br \/>\n<\/a><a href=\"#H_A8FEAB7A\">Prepare the aircraft for geometric transformation.<br \/>\n<\/a><a href=\"#H_EC6FA2C0\">Adjust the aircraft's attitude using the transform.<br \/>\n<\/a><a href=\"#H_1ED2C0EE\">Summary<br \/>\n<\/a><a href=\"#H_DF49B339\">Roll, pitch, and yaw functions.<br \/>\n<\/a><a href=\"#H_EDEFD8E3\">References<\/a><\/div>\n<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><\/div>\n<h2 id=\"H_BFF2152C\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Import and visualize a 3D aircraft model.<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We need a 3D aircraft model for our dashboard, so let's download one. We'll download a generic airplane design by Yorchmur on <span style=\"font-weight: bold;font-family: monospace\">printables.com<\/span> [1]. It's common for 3D models to be saved in <a href=\"https:\/\/en.wikipedia.org\/wiki\/STL_(file_format)\"><span style=\"font-weight: bold\">STL<\/span><\/a> (stereolithography) files. These contain a surface triangulation (vertices, edges and faces) in a structured format. MATLAB provides the <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/stlread.html\"><span style=\"font-weight: bold;font-family: monospace\">stlread<\/span><\/a> function for importing data from STL files.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">The output of this function is a <a href=\"https:\/\/mathworks.com\/help\/matlab\/ref\/triangulation.html\"><span style=\"font-weight: bold;font-family: monospace\">triangulation<\/span><\/a>, containing vertices, edges, and faces. A triangulation is an efficient way to represent a large or complex surface. The <span style=\"font-weight: bold;font-family: monospace\">Points<\/span> property of the triangulation stores the vertices. The <span style=\"font-weight: bold;font-family: monospace\">ConnectivityList<\/span> property specifies how the vertices are connected within the triangulation - each row of this matrix represents a triangle.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">url = <span style=\"color: #a709f5\">\"https:\/\/files.printables.com\/media\/prints\/34767\/stls\/343468_b085a064-c28f-4861-b1a0-6a559929a7e2\/avion31.stl\"<\/span>;<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">opts = weboptions(<span style=\"color: #a709f5\">\"ContentReader\"<\/span>, @stlread);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">tr = webread(url, opts);<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">disp(tr)<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsTextElement\" style=\"width: 1175px;font-style: normal;font-size: 12px\" data-testid=\"output_0\">\n<div class=\" textElement eoOutputContent\" style=\"max-height: 261px;font-style: normal;font-size: 12px\" role=\"article\" data-previous-available-width=\"1138\" data-previous-scroll-height=\"46\" data-hashorizontaloverflow=\"false\">triangulation with properties:<br \/>\nPoints: [261401\u00d73 double]<br \/>\nConnectivityList: [519617\u00d73 double]<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">It's easy to visualize the 3D surface defined by this triangulation. Triangulations have several dedicated visualization functions, including <a href=\"https:\/\/mathworks.com\/help\/matlab\/ref\/trisurf.html\"><span style=\"font-weight: bold;font-family: monospace\">trisurf<\/span><\/a>, <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/trimesh.html\"><span style=\"font-weight: bold;font-family: monospace\">trimesh<\/span><\/a>, and <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/triplot.html\"><span style=\"font-weight: bold;font-family: monospace\">triplot<\/span><\/a>. We'll use <span style=\"font-weight: bold;font-family: monospace\">trisurf<\/span> to render our aircraft using a smooth surface plot. In fact, <a href=\"https:\/\/mathworks.com\/help\/matlab\/ref\/trisurf.html\"><span style=\"font-weight: bold;font-family: monospace\">trisurf<\/span><\/a> creates a <a href=\"https:\/\/mathworks.com\/help\/matlab\/ref\/patch.html\"><span style=\"font-weight: bold;font-family: monospace\">patch<\/span><\/a> for optimal performance.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">figure<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">trisurf(tr)<\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_1\">\n<div class=\"figureElement eoOutputContent\" role=\"article\">\n<p><img decoding=\"async\" class=\"figureImage figureContainingNode\" style=\"width: 560px\" src=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1.mlx-02-08-24_2.png\" \/><\/p>\n<div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer navigationFocusLayer doNotExport\" role=\"application\" aria-hidden=\"false\" aria-label=\"figure output \"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"H_49C97311\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Improve the default 3D visualization of the aircraft.<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We can see an aircraft-shaped blob in our axes, but this visualization won't win any prizes. Let's improve our aircraft visualization by customizing some <span style=\"font-weight: bold;font-family: monospace\">axes<\/span> and <span style=\"font-weight: bold;font-family: monospace\">patch<\/span> properties. These objects are highly customizable - see <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/matlab.graphics.axis.axes-properties.html\"><span style=\"font-weight: bold\">Axes Properties<\/span><\/a> and <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/matlab.graphics.primitive.patch-properties.html\"><span style=\"font-weight: bold\">Patch Properties<\/span><\/a> for further details.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We'll paint the aircraft, add lighting to the scene from directly above, and make the aircraft skin extra shiny using the <a href=\"https:\/\/mathworks.com\/help\/matlab\/ref\/material.html\"><span style=\"font-weight: bold;font-family: monospace\">material<\/span><\/a> function.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">The lighting properties for <span style=\"font-weight: bold;font-family: monospace\">patch<\/span> and <span style=\"font-weight: bold;font-family: monospace\">surface<\/span> objects are only activated when there is a <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/light.html\"><span style=\"font-weight: bold;font-family: monospace\">light<\/span><\/a> object in the axes. See <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/creating_plots\/lighting-overview.html\"><span style=\"font-weight: bold\">Lighting Overview<\/span><\/a> for further details.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">First, we'll create a two-color scheme for painting the aircraft, using gray and blue. The colormap will have 500 points, comprising 250 gray and 250 blue points. This means that any point on the aircraft with <span style=\"font-family: STIXGeneral-webfont, serif;font-style: italic;font-weight: 400\">z<\/span>-coordinate below 500 will be colored gray, whereas any point with <span style=\"font-family: STIXGeneral-webfont, serif;font-style: italic;font-weight: 400\">z<\/span>-coordinate above 250 will be blue. The choice of 250 corresponds to the <span style=\"font-family: STIXGeneral-webfont, serif;font-style: italic;font-weight: 400\">z<\/span>-coordinate of the base of the aircraft's tail.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">blue = [0, 0.447, 0.741];<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">gray = 0.95 * ones(1, 3);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">onesMatrix = ones(250, 3);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px 0px 4px 4px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">paintJob = [gray .* onesMatrix; blue .* onesMatrix];<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Here, the units are arbitrary and could be rescaled if needed.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">x = [-2000, 2000];<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">y = [-2500, 4500];<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px 0px 4px 4px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">z = [-2500, 2500];<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Create the <span style=\"font-weight: bold;font-family: monospace\">figure<\/span> and <span style=\"font-weight: bold;font-family: monospace\">axes<\/span>.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">f = figure;<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ax = axes(<span style=\"color: #a709f5\">\"Parent\"<\/span>, f, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"Colormap\"<\/span>, paintJob, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"View\"<\/span>, [225, 25], <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"DataAspectRatio\"<\/span>, [1, 1, 1], <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"XLim\"<\/span>, x, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"YLim\"<\/span>, y, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"ZLim\"<\/span>, z, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"XTickLabel\"<\/span>, [], <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"YTickLabel\"<\/span>, [], <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"ZTickLabel\"<\/span>, [], <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"NextPlot\"<\/span>, <span style=\"color: #a709f5\">\"add\"<\/span>);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">aircraft = trisurf(tr, <span style=\"color: #a709f5\">\"Parent\"<\/span>, ax, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"FaceAlpha\"<\/span>, 0.9, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"FaceColor\"<\/span>, <span style=\"color: #a709f5\">\"interp\"<\/span>, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"EdgeAlpha\"<\/span>, 0, <span style=\"color: #0e00ff\">...<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0<span style=\"color: #a709f5\">\"FaceLighting\"<\/span>, <span style=\"color: #a709f5\">\"gouraud\"<\/span>);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">title(<span style=\"color: #a709f5\">\"Aircraft Attitude\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">light(ax, <span style=\"color: #a709f5\">\"Position\"<\/span>, [0, 0, 1])<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">material(ax, <span style=\"color: #a709f5\">\"shiny\"<\/span>)<\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_2\">\n<div class=\"figureElement eoOutputContent\" role=\"article\">\n<p><img decoding=\"async\" class=\"figureImage figureContainingNode\" style=\"width: 560px\" src=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1.mlx-02-08-24_3.png\" \/><\/p>\n<div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer navigationFocusLayer doNotExport\" role=\"application\" aria-hidden=\"false\" aria-label=\"figure output \"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"H_A8FEAB7A\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Prepare the aircraft for geometric transformation.<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Great, now we have a visualization of the aircraft that looks reasonable. However, the aircraft has a fixed attitude, with zero pitch, roll, and yaw. To visualize the changing attitude of the aircraft during a flight, we need the ability to set the pitch, roll, and yaw angles to any value.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We'll approach this task using a <span style=\"font-style: italic\">transform.<\/span> In this context, a <span style=\"font-style: italic\">transform<\/span> is a geometric operation such as a rotation, scaling, or translation applied to a graphics object within a 3D axes.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">MATLAB provides the <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/hgtransform.html\"><span style=\"font-weight: bold;font-family: monospace\">hgtransform<\/span><\/a> function to create transform objects. The idea is that the transform is a container in which we can place any number of 3D graphics objects. When we apply a geometric transformation on this container, it takes care of moving all its constituent graphics objects.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Rather than perform the calculations needed to update the coordinates of each graphics object when we want to apply a transform, we instead manipulate the <span style=\"font-weight: bold;font-family: monospace\">Matrix<\/span> property of the transform. This is a 4-by-4 matrix representing the required transform, with default value equal to the 4-by-4 identity matrix, representing the null transform.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">For further details on how this matrix is used to transform objects in 3D coordinate systems, see Cleve's excellent blog posts (<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/04\/matrices-in-action-grafix-2-0\/\">[2]<\/a> and <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/\">[3]<\/a>) describing his interactive <span style=\"font-weight: bold;font-family: monospace\">Grafix<\/span> tool.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Let's create a new transform in the axes, and place our aircraft inside.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">tf = hgtransform(<span style=\"color: #a709f5\">\"Parent\"<\/span>, ax);<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">aircraft.Parent = tf;<\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_3\">\n<div class=\"figureElement eoOutputContent\" role=\"article\">\n<p><img decoding=\"async\" class=\"figureImage figureContainingNode\" style=\"width: 560px\" src=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1.mlx-02-08-24_3.png\" \/><\/p>\n<div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer navigationFocusLayer doNotExport\" role=\"application\" aria-hidden=\"false\" aria-label=\"figure output \"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"H_EC6FA2C0\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Adjust the aircraft's attitude using the transform.<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We're now ready to adjust the aircraft's attitude. We'll use the three functions <span style=\"font-weight: bold;font-family: monospace\">roll<\/span>, <span style=\"font-weight: bold;font-family: monospace\">pitch<\/span>, and <span style=\"font-weight: bold;font-family: monospace\">yaw<\/span> defined below to do this. For example, here is the code listing for the <span style=\"font-weight: bold;font-family: monospace\">roll<\/span> function, which in turn relies on the <span style=\"font-weight: bold;font-family: monospace\">rotate<\/span> helper function.<\/div>\n<div class=\"preformatted-matlab\" style=\"margin: 10px 3px 10px 55px;padding: 10px 10px 10px 5px\">\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">function <\/span>roll(aircraft, theta)<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">rotate(aircraft, theta, <span style=\"color: #a709f5\">\"y\"<\/span>)<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">function <\/span>rotate(aircraft, theta, rotationAxis)<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">arguments <\/span>(Input)<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">\u00a0\u00a0\u00a0\u00a0aircraft<span style=\"color: #a0522d\">(1, 1) matlab.graphics.primitive.Patch<\/span><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">\u00a0\u00a0\u00a0\u00a0theta<span style=\"color: #a0522d\">(1, 1) double {mustBeReal, mustBeFinite}<\/span><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">\u00a0\u00a0\u00a0\u00a0rotationAxis<span style=\"color: #a0522d\">(1, 1) string {mustBeMember(rotationAxis, [\"x\", \"y\", \"z\"])}<\/span><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">theta = deg2rad(theta);<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">tf = aircraft.Parent;<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">tf.Matrix = tf.Matrix * makehgtform(rotationAxis + <span style=\"color: #a709f5\">\"rotate\"<\/span>, theta);<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">The <span style=\"font-weight: bold;font-family: monospace\">roll<\/span> function accepts the aircraft triangulation and an angle (specified in degrees). These values are passed onto the <span style=\"font-weight: bold;font-family: monospace\">rotate<\/span> function, together with the string <span style=\"font-weight: bold;font-family: monospace\">\"y\"<\/span>, representing a rotation around the <span style=\"font-family: STIXGeneral-webfont, serif;font-style: italic;font-weight: 400\">y<\/span>-axis. The <span style=\"font-weight: bold;font-family: monospace\">rotate<\/span> function then converts the angle from degrees to radians (using <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/deg2rad.html\"><span style=\"font-weight: bold;font-family: monospace\">deg2rad<\/span><\/a>) for compatibility with <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/makehgtform.html\"><span style=\"font-weight: bold;font-family: monospace\">makehgtform<\/span><\/a>. This is a convenience function for creating the required 4-by-4 transformation matrix for a broad range of common operations, including the rotations we need to implement attitude adjustments to the aircraft. The <span style=\"font-weight: bold;font-family: monospace\">pitch<\/span> and <span style=\"font-weight: bold;font-family: monospace\">yaw<\/span> functions are implemented in a similar way.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">As an example, the following code creates the transformation matrix representing a rotation of 15 degrees about the z-axis. This corresponds to changing the aircraft's yaw.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">yawAdjustment = makehgtform(<span style=\"color: #a709f5\">\"zrotate\"<\/span>, deg2rad(15));<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">disp(<span style=\"color: #a709f5\">\"Transformation matrix for a 15 degree rotation about the z-axis:\"<\/span>)<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsTextElement\" style=\"width: 1175px;font-style: normal;font-size: 12px\" data-testid=\"output_4\">\n<div class=\" textElement eoOutputContent\" style=\"max-height: 261px;font-style: normal;font-size: 12px\" role=\"article\" data-previous-available-width=\"1138\" data-previous-scroll-height=\"17\" data-hashorizontaloverflow=\"false\">Transformation matrix for a 15 degree rotation about the z-axis:<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 6px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">disp(yawAdjustment)<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsTextElement\" style=\"width: 1175px;font-style: normal;font-size: 12px\" data-testid=\"output_5\">\n<div class=\" textElement eoOutputContent\" style=\"max-height: 261px;font-style: normal;font-size: 12px\" role=\"article\" data-previous-available-width=\"1138\" data-previous-scroll-height=\"61\" data-hashorizontaloverflow=\"false\">0.96593 -0.25882 0 0<br \/>\n0.25882 0.96593\u00a0 0 0<br \/>\n0\u00a0 \u00a0 \u00a0 \u00a00\u00a0 \u00a0 \u00a0 \u00a0 1 0<br \/>\n0\u00a0 \u00a0 \u00a0 \u00a00\u00a0 \u00a0 \u00a0 \u00a0 0 1<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Next, apply this transformation to our aircraft. Note that if we want to apply a sequence of transformations represented by the matrices <span style=\"vertical-align: -6px\">$ T_1, T_2, \\dots, T_n $<\/span> to our aircraft, we multiply the transformation matrices on the right (<span style=\"vertical-align: -6px\">$ T_1T_2\\cdots T_n $<\/span>) to accumulate the changes. This property of transformation matrices makes it easy to adjust the aircraft's attitude thoughout the flight.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px;padding: 6px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">tf.Matrix = tf.Matrix * yawAdjustment;<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Finally, we'll use the <span style=\"font-weight: bold;font-family: monospace\">roll<\/span> function to create an animation of our aircraft performing a loop.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">for <\/span>k = 1:72<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0roll(aircraft, 5)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0pause(0.05)<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_6\">\n<div class=\"figureElement eoOutputContent\" role=\"article\">\n<div class=\"outputLayer selectedOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-921 alignnone\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/aircraft-1.gif\" alt=\"\" width=\"560\" height=\"420\" \/><\/div>\n<div class=\"outputLayer activeOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer scrollableOutputDecorationLayer doNotExport\" aria-hidden=\"true\"><\/div>\n<div class=\"outputLayer navigationFocusLayer doNotExport\" role=\"application\" aria-hidden=\"false\" aria-label=\"figure output \"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"H_1ED2C0EE\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Summary<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We've seen how to import STL model data into MATLAB and create a customized visualization of the corresponding 3D surface. We also introduced the concept of transforms, and how to use these to move 3D graphics objects around in a convenient way.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">In the next post, we'll see how to encapsulate the 3D graphics and <span style=\"font-weight: bold;font-family: monospace\">roll<\/span>, <span style=\"font-weight: bold;font-family: monospace\">pitch<\/span>, and <span style=\"font-weight: bold;font-family: monospace\">yaw<\/span> functions in a custom aircraft chart. This approach is more suited to modular application development, and enables us to share the visualization with colleagues or embed it in a larger application.<\/div>\n<h2 id=\"H_DF49B339\" style=\"margin: 3px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Roll, pitch, and yaw functions.<\/h2>\n<div style=\"background-color: #f5f5f5;margin: 10px 15px 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">function <\/span>roll(aircraft, theta)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">rotate(aircraft, theta, <span style=\"color: #a709f5\">\"y\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">function <\/span>pitch(aircraft, theta)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">rotate(aircraft, theta, <span style=\"color: #a709f5\">\"x\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">function <\/span>yaw(aircraft, theta)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">rotate(aircraft, theta, <span style=\"color: #a709f5\">\"z\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">function <\/span>rotate(aircraft, theta, rotationAxis)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">arguments <\/span>( Input )<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0aircraft<span style=\"color: #a0522d\">(1, 1) matlab.graphics.primitive.Patch<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0theta<span style=\"color: #a0522d\">(1, 1) double {mustBeReal, mustBeFinite}<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">\u00a0\u00a0\u00a0\u00a0rotationAxis<span style=\"color: #a0522d\">(1, 1) string {mustBeMember(rotationAxis, [\"x\", \"y\", \"z\"])}<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">theta = deg2rad(theta);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">tf = aircraft.Parent;<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">tf.Matrix = tf.Matrix * makehgtform(rotationAxis + <span style=\"color: #a709f5\">\"rotate\"<\/span>, theta);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px 0px 4px 4px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><span style=\"color: #0e00ff\">end<\/span><\/div>\n<\/div>\n<\/div>\n<h2 id=\"H_EDEFD8E3\" style=\"margin: 20px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">References<\/h2>\n<ul style=\"margin: 10px 0px 20px;padding-left: 0px;font-family: Helvetica, Arial, sans-serif;font-size: 14px\">\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">[1] <span style=\"font-style: italic\">Airplane<\/span> by Yorchmur, <a href=\"https:\/\/www.printables.com\/model\/34767-airplane\"><span style=\"font-weight: bold;font-family: monospace\">https:\/\/www.printables.com\/model\/34767-airplane<\/span>,<\/a> accessed in November 2023, licensed under the Creative Commons Attribution 4.0 International License.<\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">[2] <span style=\"font-style: italic\">Matrices in Action, Grafix 2.0<\/span>, by Cleve Moler, <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/04\/matrices-in-action-grafix-2-0\/\"><span style=\"font-weight: bold;font-family: monospace\">https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/04\/matrices-in-action-grafix-2-0\/<\/span><\/a><\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">[3] Grafix Users' Guide, by Cleve Moler, <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/\"><span style=\"font-weight: bold;font-family: monospace\">https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/<\/span><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<\/div>\n<p><script type=\"text\/javascript\">\n{ let css = '.eoOutputWrapper { width: calc(90vw - 10px) !important; } \/* Styling that is common to warnings and errors is in diagnosticOutput.css *\/.embeddedOutputsErrorElement {    min-height: 18px;    max-height: 550px;} .embeddedOutputsErrorElement .diagnosticMessage-errorType {    overflow: auto;} .embeddedOutputsErrorElement.activeOutput .eoOutputContent {    user-select: text;    -webkit-user-select: text;} .embeddedOutputsErrorElement.activeOutput .eoOutputContent button {    user-select: none;    -webkit-user-select: none;} .embeddedOutputsErrorElement .eoOutputContent ::selection {} .embeddedOutputsErrorElement.inlineElement {} .embeddedOutputsErrorElement.rightPaneElement {} \/* Styling that is common to warnings and errors is in diagnosticOutput.css *\/.embeddedOutputsWarningElement {    min-height: 18px;    max-height: 550px;} .embeddedOutputsWarningElement .diagnosticMessage-warningType {    overflow: auto;} .embeddedOutputsWarningElement.activeOutput .eoOutputContent {    user-select: text;    -webkit-user-select: text;} .embeddedOutputsWarningElement .eoOutputContent ::selection {} .embeddedOutputsWarningElement.inlineElement {} .embeddedOutputsWarningElement.rightPaneElement {} \/* Copyright 2015-2023 The MathWorks, Inc. *\/\/* In this file, styles are not scoped to rtcContainer since they could be in the Dojo Tooltip *\/.diagnosticMessage-wrapper {    font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;    font-size: 12px;} .diagnosticMessage-wrapper.diagnosticMessage-warningType {    \/*This fallback value will be used for appdesigner warnings*\/    color: var(--rtc-warning-output-color, var(--mw-color-matlabWarning));} .diagnosticMessage-wrapper.diagnosticMessage-warningType a {    \/*This fallback value will be used for appdesigner warnings*\/    color: var(--rtc-warning-output-color, var(--mw-color-matlabWarning));    text-decoration: underline;} .rtcThemeDefaultOverride .diagnosticMessage-wrapper.diagnosticMessage-warningType,.rtcThemeDefaultOverride .diagnosticMessage-wrapper.diagnosticMessage-warningType a {    color: var(--mw-color-matlabWarning) !important;} .diagnosticMessage-wrapper.diagnosticMessage-errorType {    \/*This fallback value will be used in appdesigner error tooltip text*\/    color: var(--rtc-error-output-color, var(--mw-color-matlabErrors));} .diagnosticMessage-wrapper.diagnosticMessage-errorType a {    \/*This fallback value will be used in appdesigner error tooltip text*\/    color: var(--rtc-error-output-color, var(--mw-color-matlabErrors));    text-decoration: underline;} .rtcThemeDefaultOverride .diagnosticMessage-wrapper.diagnosticMessage-errorType,.rtcThemeDefaultOverride .diagnosticMessage-wrapper.diagnosticMessage-errorType a {    color: var(--mw-color-matlabErrors) !important;} .diagnosticMessage-wrapper .diagnosticMessage-messagePart,.diagnosticMessage-wrapper .diagnosticMessage-causePart {    white-space: pre-wrap;} .diagnosticMessage-wrapper .diagnosticMessage-stackPart {    white-space: pre;} .embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {    white-space: pre;    word-wrap:  initial;    min-height: 18px;    max-height: 550px;} .embeddedOutputsTextElement .textElement,.embeddedOutputsVariableStringElement .textElement {    overflow: auto;} .embeddedOutputsTextElement.activeOutput .eoOutputContent,.embeddedOutputsVariableStringElement.activeOutput .eoOutputContent {    user-select: text;    -webkit-user-select: text;} \/*embeddedOutputsTextElement has a different dom structure than embeddedOutputsVariableStringElement.Unlike variableString, the text output has both TEXT nodes and elements as children. Hence we needa selector for each.*\/.embeddedOutputsTextElement .eoOutputContent::selection,.embeddedOutputsTextElement .eoOutputContent ::selection,.embeddedOutputsVariableStringElement .eoOutputContent ::selection {} .textElement,.rtcDataTipElement .textElement {    padding-top: 2px;} .embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {} .inlineElement .textElement {} .embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement {    min-height: 16px;} .rightPaneElement .textElement {    padding-top: 2px;    padding-left: 9px;}';\nlet head = document.head || document.getElementsByTagName('head')[0];\nlet style = document.createElement('style');\nhead.appendChild(style);\nstyle.type = 'text\/css';\nif (style.styleSheet) {\n    style.styleSheet.cssText = css;\n} else {\n    style.appendChild(document.createTextNode(css));\n}<\/p>\n<p>}<\/script><a href=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1-1.mlx\"><button class=\"btn btn-sm btn_color_blue pull-right add_margin_10\">Download Live Script<\/button><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2024\/02\/FlightTrackingDashboard_Part1.mlx-02-08-24_5.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div>\n<p>Guest Writer: Ken Deeley<\/p>\n<p>Ken is an application engineer in Cambridge, UK, supporting MathWorks users with their technical computing projects. Ken joined the MathWorks customer training team... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/2024\/02\/08\/creating-a-flight-tracking-dashboard-part-1-visualizing-an-aircraft\/\">read more >><\/a><\/p>\n","protected":false},"author":198,"featured_media":874,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,11,2,1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/880"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/users\/198"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/comments?post=880"}],"version-history":[{"count":16,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":3639,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/880\/revisions\/3639"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/media\/874"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/media?parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/categories?post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/tags?post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}