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

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

[Octave-bug-tracker] [bug #57567] Interpolation techniques for patch ()


From: Hg200
Subject: [Octave-bug-tracker] [bug #57567] Interpolation techniques for patch () triangles
Date: Thu, 9 Jan 2020 15:58:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

URL:
  <https://savannah.gnu.org/bugs/?57567>

                 Summary: Interpolation techniques for patch () triangles
                 Project: GNU Octave
            Submitted by: hg200
            Submitted on: Thu 09 Jan 2020 08:58:50 PM UTC
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: Any

    _______________________________________________________

Details:

i.) Create a patch triangle and put the colors R, G and B into the vertices
and plot the triangle with a *jet* map + interpolation. One edge goes directly
from blue to red (without green). In matlab R2018 the whole colormap appears
over the edges.

ii.) In older matlab releases (R2013) the "exact" interpolation was used for
patch plots containing less 120 triangles. For plots > 120 triangles same
interpolation as in octave was used. In R2018 this is changed: Interpolation
is "exact" for any number of triangles. [Since the "cool" map is not affected
my guess is also that was the reason why the pdetools did use "cool".]

iii.) There are some "okay maps". Examples:

++
## rgb=[0, 1, 1; 1, 0, 1];
## rgb=[1, 1, 0; 1, 0, 1];
rgb=[1, 0, 0; 0, 0, 1];
okmap = interp1 (linspace (0, 1, 2), rgb, linspace (0, 1, 64));
--

iv.) Both pictures show the difference between R2018 and Octave for jet and
cool. One picture shows the solution of the laplace equation derived with P1
(linear) finite elements on an unstructured triangular mesh. This lets me to
the assumption that *barycentric interpolation* from the corners into the
triangle area is the correct interpolation technique.

I am very interested if somebody can tell me where the interpolation is done
inside the source code.

MWE attached.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 09 Jan 2020 08:58:50 PM UTC  Name: patchinterpolation.png  Size:
50KiB   By: hg200

<http://savannah.gnu.org/bugs/download.php?file_id=48191>
-------------------------------------------------------
Date: Thu 09 Jan 2020 08:58:50 PM UTC  Name: patchinterpolation.m  Size: 373B 
 By: hg200

<http://savannah.gnu.org/bugs/download.php?file_id=48192>
-------------------------------------------------------
Date: Thu 09 Jan 2020 08:58:50 PM UTC  Name: patchinterpolationlaplace.png 
Size: 573KiB   By: hg200

<http://savannah.gnu.org/bugs/download.php?file_id=48193>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57567>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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