%% Create and Auto-Scale Sphere Mesh
% Create an extendedObjectMesh object and auto-scale the object to the required dimensions.
% Construct a sphere mesh of unit dimensions.

sph = extendedObjectMesh('sphere');

% Auto-scale the mesh to the dimensions in dims.

dims = struct('Length',5,'Width',10,'Height',3,'OriginOffset',[0 0 -3]);
sph = scaleToFit(sph,dims);

% Visualize the mesh.

show(sph);

% Copyright 2021 The MathWorks, Inc.