Menu

#391 another view or render bug

open
None
5
2009-08-27
2008-04-18
rheavy
No

This one could have been fixed with a previous bug but I think it may be different. Try,

cylinder %looks
view(90,40) %now missing two adjacent faces

Other azimuths that are multiples of 90 also seem to have the same problem.

Playing around with it, I've seen a pair of opposite faces disappear but I can't currently reproduce it.

Hope that is helpful.

Discussion

  • rheavy

    rheavy - 2008-04-18

    cylinder missing a face

     
  • Samit Basu

    Samit Basu - 2009-08-26

    Hi,

    Can you post the "cylinder" script? I don't seem to have it.

    Samit

     
  • Samit Basu

    Samit Basu - 2009-08-26
    • assigned_to: nobody --> samitbasu
    • status: open --> pending
     
  • Samit Basu

    Samit Basu - 2009-08-27
    • assigned_to: samitbasu --> geneing
     
  • rheavy

    rheavy - 2009-08-27

    The file cylinder.m was requested. It is a standard Matlab file and reproduced below:
    ____________________________________________________________________
    function [xx,yy,zz] = cylinder(varargin)
    %CYLINDER Generate cylinder.
    % [X,Y,Z] = CYLINDER(R,N) forms the unit cylinder based on the generator
    % curve in the vector R. Vector R contains the radius at equally
    % spaced points along the unit height of the cylinder. The cylinder
    % has N points around the circumference. SURF(X,Y,Z) displays the
    % cylinder.
    %
    % [X,Y,Z] = CYLINDER(R), and [X,Y,Z] = CYLINDER default to N = 20
    % and R = [1 1].
    %
    % Omitting output arguments causes the cylinder to be displayed with
    % a SURF command and no outputs to be returned.
    %
    % CYLINDER(AX,...) plots into AX instead of GCA.
    %
    % See also SPHERE, ELLIPSOID.

    % Clay M. Thompson 4-24-91, CBM 8-21-92.
    % Copyright 1984-2002 The MathWorks, Inc.
    % $Revision: 5.8.4.1 $ $Date: 2002/09/26 01:55:21 $

    % Parse possible Axes input
    error(nargchk(0,3,nargin));
    [cax,args,nargs] = axescheck(varargin{:});

    n = 20;
    r = [1 1]';
    if nargs > 0, r = args{1}; end
    if nargs > 1, n = args{2}; end
    r = r(:); % Make sure r is a vector.
    m = length(r); if m==1, r = [r;r]; m = 2; end
    theta = (0:n)/n*2*pi;
    sintheta = sin(theta); sintheta(n+1) = 0;

    x = r * cos(theta);
    y = r * sintheta;
    z = (0:m-1)'/(m-1) * ones(1,n+1);

    if nargout == 0
    cax = newplot(cax);
    surf(x,y,z,'parent',cax)
    else
    xx = x; yy = y; zz = z;
    end

     
  • rheavy

    rheavy - 2009-08-27
    • status: pending --> open
     

Log in to post a comment.