octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8912] add function reducepatch


From: Markus Mützel
Subject: [Octave-patch-tracker] [patch #8912] add function reducepatch
Date: Thu, 18 Feb 2016 09:47:02 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <http://savannah.gnu.org/patch/?8912>

                 Summary: add function reducepatch
                 Project: GNU Octave
            Submitted by: mmuetzel
            Submitted on: Do 18 Feb 2016 09:47:01 GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This patch is to add the function "reducepatch" to Octave.

I think it covers almost all use cases that are covered in MathWorks
documentation of the function. 

The only missing bit is probably that it relies on the given patches to
consist of triangles only. Otherwise, it fails with a specific error. Since
the current implementation of "isosurface" seems to give patches that consist
of only triangles, this limitation should not be too hard. And it should be
reasonably easy to implement the triangulation later if really needed.

The approach taken for the reduction is the one discribed e.g. here [1]
(simple shortest-edge-midpoint cost/placement strategy).
There are probably better ways (taking e.g. "curvature" at the vertices into
consideration). And Matlab seems to do it in a more clever way. However, the
taken approach is easy and more or less fast (and probably a good start for
later improvement?).

Vertices of neighboring faces must be shared for the reduction to give a
correct result. To detect and unite shared vertices, I took the same approach
as for "isosurface" in bug #46946 with the same considerations that there is
probably a more efficient way to do it.

Since "isosurface" is using the same functionality, I put this part of the
code into the function "__unite_shared_vertices__" which should be put into
the common private folder of the two functions "reducepatch" and
"isosurface".

I am going to update the patch in bug #46946 to use this private function,
too. Should I attach "__unite_shared_vertices__" to the other bug, too? Or do
you deem it better to maintain the function only in this patch and give a link
to it in the bug #46946 ?

[1] http://libigl.github.io/libigl/tutorial/tutorial.html#meshdecimation





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Do 18 Feb 2016 09:47:01 GMT  Name: reducepatch.m  Size: 16kB   By:
mmuetzel

<http://savannah.gnu.org/patch/download.php?file_id=36378>
-------------------------------------------------------
Date: Do 18 Feb 2016 09:47:01 GMT  Name: __unite_shared_vertices__.m  Size:
3kB   By: mmuetzel

<http://savannah.gnu.org/patch/download.php?file_id=36379>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8912>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]