Using the Aerospace toolbox for rendering an aircraft

Part of the assignment in A02 part 2 is to modify the existing wireframe provided:

[Paper plane figure]

Using knowledge gained from MATLAB courses in CPD, and researching the MATLAB documentation. I came across graphical objects that could be displayed to a figure with many more vertices and faces than would be possible using the provided method.

Initially I found the patch function which can be used in a similar way to fill3 that is used in the code provided, however, I noticed a set of input parameters which included ‘Vertices’ and ‘Faces’ as inputs to the patch function. This allows for much more complex geometry to be created, as you can define the vertices in one array and then define how these vertices connect to create faces in another array:

"V specifies vertex values and F defines which vertices to connect. Specifying only unique vertices and their connection matrix can reduce the size of the data when there are many polygons. Specify one vertex per row in V. To create one polygon, specify F as a vector. To create multiple polygons, specify F as a matrix with one row per polygon. Each face does not have to have the same number of vertices. To specify different numbers of vertices, pad F with NaN values.”

From this I found an example for

Leave a Reply

Your email address will not be published. Required fields are marked *