You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: UPVRobotGeometricCoords.m
    path of file: ./repos/A-Lab/include/Measurements/Special Research - UPV Robot/Methods
    
    the code of the file until where you have to start completion: function [X,Y,Z] = UPVRobotGeometricCoords(app)
% This function generates the coordinates of different geometric shapes:
% - circumference
% - circle (multiple circumferences)
% - rectangle
% - polygon
% - sphere (equal surface sphere)
%
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

type = app.ExtVar.UPVRobot.GeometricCoords.Shape;
plane = app.ExtVar.UPVRobot.GeometricCoords.Plane;

% General parameter

% Robot parameter
XLen = app.ExtVar.UPVRobot.XLen;
YLen = app.ExtVar.UPVRobot.YLen;
ZLen = app.ExtVar.UPVRobot.ZLen;

    
function [X,Y,Z] = UPVRobotGeometricCoords(app)
% This function generates the coordinates of different geometric shapes:
% - circumference
% - circle (multiple circumferences)
% - rectangle
% - polygon
% - sphere (equal surface sphere)
%
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

type = app.ExtVar.UPVRobot.GeometricCoords.Shape;
plane = app.ExtVar.UPVRobot.GeometricCoords.Plane;

% General parameter

% Robot parameter
XLen = app.ExtVar.UPVRobot.XLen;
YLen = app.ExtVar.UPVRobot.YLen;
ZLen = app.ExtVar.UPVRobot.ZLen;


switch lower(type)
    
    case 'circumference'
        % =======================================================================
        
        % Parameters
        x0 = app.ExtVar.UPVRobot.GeometricCoords.CircumCenterX;
        y0 = app.ExtVar.UPVRobot.GeometricCoords.CircumCenterY;
        z0 = app.ExtVar.UPVRobot.GeometricCoords.CircumCenterZ;
        radius = app.ExtVar.UPVRobot.GeometricCoords.CircumRadius;
        circres = app.ExtVar.UPVRobot.GeometricCoords.CircumRes;
        
        % Generate circumference
        theta = linspace(0, 2*pi, circres+1); % Angles
        theta(end