Diff of /inst/geom2d/triangleGrid.m [347d75] .. [fc6c4c]  Maximize  Restore

  Switch to side-by-side view

--- a/inst/geom2d/triangleGrid.m
+++ b/inst/geom2d/triangleGrid.m
@@ -22,40 +22,40 @@
 ## CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {@var{pts} = } triangleGrid (@var{bounds}, @var{origin}, @var{size})
-## Generate triangular grid of points in the plane.
-##
-##   usage
-##   PTS = triangleGrid(BOUNDS, ORIGIN, SIZE)
-##   generate points, lying in the window defined by BOUNDS, given in form
-##   [xmin ymin xmax ymax], starting from origin with a constant step equal
-##   to size. 
-##   SIZE is constant and is equals to the length of the sides of each
-##   triangles. 
-##
-##   TODO: add possibility to use rotated grid
-##
-## @end deftypefn
-
-function varargout = triangleGrid(bounds, origin, size, varargin)
-
-  dx = size(1);
-  dy = size(1)*sqrt(3);
-
-  # consider two square grids with different centers
-  pts1 = squareGrid(bounds, origin, [dx dy], varargin{:});
-  pts2 = squareGrid(bounds, origin + [dx dy]/2, [dx dy], varargin{:});
-
-  # gather points
-  pts = [pts1;pts2];
-
-
-  # process output
-  if nargout>0
-      varargout{1} = pts;
-  end
-
-endfunction
-
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{pts} = } triangleGrid (@var{bounds}, @var{origin}, @var{size})
+## Generate triangular grid of points in the plane.
+##
+##   usage
+##   PTS = triangleGrid(BOUNDS, ORIGIN, SIZE)
+##   generate points, lying in the window defined by BOUNDS, given in form
+##   [xmin ymin xmax ymax], starting from origin with a constant step equal
+##   to size. 
+##   SIZE is constant and is equals to the length of the sides of each
+##   triangles. 
+##
+##   TODO: add possibility to use rotated grid
+##
+## @end deftypefn
+
+function varargout = triangleGrid(bounds, origin, size, varargin)
+
+  dx = size(1);
+  dy = size(1)*sqrt(3);
+
+  # consider two square grids with different centers
+  pts1 = squareGrid(bounds, origin, [dx dy], varargin{:});
+  pts2 = squareGrid(bounds, origin + [dx dy]/2, [dx dy], varargin{:});
+
+  # gather points
+  pts = [pts1;pts2];
+
+
+  # process output
+  if nargout>0
+      varargout{1} = pts;
+  end
+
+endfunction
+

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks