Skip to content

Commit

Permalink
geom3d: code cleanup in drawing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dlegland committed Jul 23, 2024
1 parent e202258 commit 8c23683
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion matGeom/geom3d/drawCapsule.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
%
%
% See also
% crawCylinder, drawDome, drawSphere
% drawCylinder, drawDome, drawSphere
%

% ------
Expand Down
2 changes: 1 addition & 1 deletion matGeom/geom3d/drawCircle3d.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
end

% Extract circle data
if length(varargin) == 1
if isscalar(varargin)
% get center and radius
circle = varargin{1};
xc = circle(:,1);
Expand Down
2 changes: 2 additions & 0 deletions matGeom/geom3d/drawTorus.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
for i = 1:nTorus
% create base torus
circle = circleToPolygon([r1(i) 0 r2(i)], nTheta);
% duplicate last vertex to manage mesh periodicity
circle = circle([1:end 1], :);
[x, y, z] = revolutionSurface(circle, linspace(0, 2*pi, nPhi));

% transform torus
Expand Down

0 comments on commit 8c23683

Please sign in to comment.