I have experimental support for Gouraud-shaded pcolormeshes with the Agg 
backend only in SVN trunk.  The backend interface will likely change to 
better support PDF, where doing multiple triangles at a time is much 
more efficient.  This is just the easiest and far from optimal way to do it.

I'm not sure if Gouraud triangles (as supported by Agg, PDF and PS) are 
really sufficient for drawing interpolated quad meshes, because of the 
effect described here:

http://books.google.com/books?id=19SpFYj82owC&lpg=PA280&ots=r3gnxKn9As&dq=shading%20quadrilaterals%20with%20gouraud%20triangles&pg=PA281#v=onepage&q=&f=false

Running quadmesh_demo.py, you can see some sharp edges between triangles 
in the same quad, but it's not too bad in all places.  If anyone has any 
ideas about how to ameliorate that effect, feel free to have a crack at 
it.  I just wanted to get a proof-of-concept starting point in before 
heading on vacation for a few days.

Cheers,
Mike

Reinier Heeres wrote:
> Hi,
>
> This looks great! I'd be happy to try and work on this for mplot3d as well.
>
> Ryan: as for your patch, I'll look at it over the weekend or next week
> and see if I can apply it to trunk.
>
> Regards,
> Reinier
>
> On Fri, Aug 7, 2009 at 3:02 PM, Michael Droettboom<md...@stsci.edu> wrote:
>   
>> Nevermind -- this is in Agg 2.4 as well.  Don't know why I missed it
>> yesterday.  I'll have a look into this to see how well we can integrate it.
>>
>> Cheers,
>> Mike
>>
>> Michael Droettboom wrote:
>>     
>>> Ah -- I didn't look at Agg 2.5 at all because of the licensing issues.
>>> Isn't this a no-go for us because it's GPL'd?
>>>
>>> Cheers,
>>> Mike
>>>
>>> John Hunter wrote:
>>>
>>>       
>>>> On Thu, Aug 6, 2009 at 1:53 PM, Michael Droettboom<md...@stsci.edu> wrote:
>>>>
>>>>
>>>>
>>>>         
>>>>> Even with this, the gradient infrastructure in Agg assumes a 
>>>>> one-dimensional
>>>>> map, and here we need to at least interpolate between the three points of 
>>>>> a
>>>>> triangle.  It's not impossible, as it's easy enough to make a custom 
>>>>> shader,
>>>>> it's just that the gradient code won't help us.
>>>>>
>>>>>
>>>>>           
>>>> I checked in with the antigrain mailing list, as was pointed to
>>>> examples/gouraud.cpp.  This looks like what we want, no?
>>>>
>>>> wget http://www.antigrain.com/agg-2.5.tar.gz
>>>> tar xvfz agg-2.5.tar.gz
>>>> cd agg-2.5
>>>> make
>>>> cd examples/X11/
>>>> make gouraud
>>>> ./gouraud
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>>         
>>>       
>> --
>> Michael Droettboom
>> Science Software Branch
>> Operations and Engineering Division
>> Space Telescope Science Institute
>> Operated by AURA for NASA
>>     
>
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to