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: drawCircle3d.m
    path of file: ./repos/matGeom/matGeom/geom3d
    
    the code of the file until where you have to start completion: function varargout = drawCircle3d(varargin)
%DRAWCIRCLE3D Draw a 3D circle.
%
%   Possible calls for the function:
%   drawCircle3d([XC YC ZC R THETA PHI])
%   drawCircle3d([XC YC ZC R], [THETA PHI])
%
%   where XC, YC, ZY are coordinates of circle center, R is the circle
%   radius, PHI and THETA are 3D angles in degrees of the normal to the
%   plane containing the circle:
%   * THETA between 0 and 180 degrees, corresponding to the colatitude
%       (angle with Oz axis).
%   * PHI between 0 and 360 degrees corresponding to the longitude (angle
%       with Ox axis)
%   
%   drawCircle3d([XC YC ZC R THETA PHI PSI])
%   drawCircle3d([XC YC ZC R], [THETA PHI PSI])
%   drawCircle3d([XC YC ZC R], THETA, PHI)
%   drawCircle3d([XC YC ZC], R, THETA, PHI)
%   drawCircle3d([XC YC ZC R], THETA, PHI, PSI)
%   drawCircle3d([XC YC ZC], R, THETA, PHI, PSI)
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI)
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI, PSI)
%   Are other possible syntaxes for this function.
%   
%   H = drawCircle3d(...)
%   return handle on the created LINE object
%
%   Example
%     % display 3 mutually orthogonal 3D circles
%     figure; hold on; 
%     drawCircle3d([10 20 30 50  0  0], 'LineWidth', 2, 'Color', 'b');
%     drawCircle3d([10 20 30 50 90  0], 'LineWidth', 2, 'Color', 'r');
%     drawCircle3d([10 20 30 50 90 90], 'LineWidth', 2, 'Color', 'g');
%     axis equal;
%     axis([-50 100 -50 100 -50 100]);
%     view([-10 20])

    
function varargout = drawCircle3d(varargin)
%DRAWCIRCLE3D Draw a 3D circle.
%
%   Possible calls for the function:
%   drawCircle3d([XC YC ZC R THETA PHI])
%   drawCircle3d([XC YC ZC R], [THETA PHI])
%
%   where XC, YC, ZY are coordinates of circle center, R is the circle
%   radius, PHI and THETA are 3D angles in degrees of the normal to the
%   plane containing the circle:
%   * THETA between 0 and 180 degrees, corresponding to the colatitude
%       (angle with Oz axis).
%   * PHI between 0 and 360 degrees corresponding to the longitude (angle
%       with Ox axis)
%   
%   drawCircle3d([XC YC ZC R THETA PHI PSI])
%   drawCircle3d([XC YC ZC R], [THETA PHI PSI])
%   drawCircle3d([XC YC ZC R], THETA, PHI)
%   drawCircle3d([XC YC ZC], R, THETA, PHI)
%   drawCircle3d([XC YC ZC R], THETA, PHI, PSI)
%   drawCircle3d([XC YC ZC], R, THETA, PHI, PSI)
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI)
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI, PSI)
%   Are other possible syntaxes for this function.
%   
%   H = drawCircle3d(...)
%   return handle on the created LINE object
%
%   Example
%     % display 3 mutually orthogonal 3D circles
%     figure; hold on; 
%     drawCircle3d([10 20 30 50  0  0], 'LineWidth', 2, 'Color', 'b');
%     drawCircle3d([10 20 30 50 90  0], 'LineWidth', 2, 'Color', 'r');
%     drawCircle3d([10 20 30 50 90 90], 'LineWidth', 2, 'Color', 'g');
%     axis equal;
%     axis([-50 100 -50 100 -50 100]);
%     view([-10 20])
% 
%     % Draw several circles at once
%     center = [10 20 30];
%     circ1 = [center 50  0  0];
%     circ2 = [center 50 90  0];
%     circ3 = [center 50 90 90];
%     figure; hold on;
%     drawCircle3d([circ1 ; circ2 ; circ3]);
%     axis equal;
%
%   See also 
%     circles3d, drawCircleArc3d, drawEllipse3d, drawSphere
%

% ------
% Author: David Legland
% E-mail: david.legland@inrae.fr
% Created: 2005-02-17
% Copyright 2005-2023 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas)

%   Possible calls for the function, with number of arguments :
%   drawCircle3d([XC YC ZC R THETA PHI])            1
%   drawCircle3d([XC YC ZC R THETA PHI PSI])        1
%   drawCircle3d([XC YC ZC R], [THETA PHI])         2
%   drawCircle3d([XC YC ZC R], [THETA PHI PSI])     2
%   drawCircle3d([XC YC ZC R], THETA, PHI)          3
%   drawCircle3d([XC YC ZC], R, THETA, PHI)         4
%   drawCircle3d([XC YC ZC R], THETA, PHI, PSI)     4
%   drawCircle3d([XC YC ZC], R, THETA, PHI, PSI)    5
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI)         6
%   drawCircle3d(XC, YC, ZC, R, THETA, PHI, PSI)    7

% extract handle of axis to draw on
[hAx, varargin] = parseAxisHandle(varargin{:});

% extract drawing options
if verLessThan('matlab', '7.8')
    ind = find(cellfun('isclass', varargin, 'char'), 1, 'first');
else
    ind = find(cellfun(@ischar, varargin), 1, 'first');
end