From: Michael S. <mic...@ph...> - 2006-06-11 14:20:34
|
Hello. On 10.06.06, John Owens wrote: > Thanks for such a long and detailed reply. I'll try to be clearer this > time around. :) ;-) > palette.getColor(0, n) => gives the first point's color > palette.getColor(1, n) => gives the second point's color > etc. > > Now, under the hood, that's implemented as a linear interpolation. > Also, the need to specifically make that call is hidden, which is > cool; it's all done under the hood as well. But somewhere in the code > this calculation is made, and it's a function of the point number > (first point, second point, etc.) and the total number of points. > > My first question, then, is where specifically is this done? I admit I > haven't dived in too deep, but I'm fairly sure the linear interpolant > is calculated as "point_number / total_number_of_points", and I don't > know where it's done in the code. You mention to start (below) in > "plotitems" so I'll start poking around there; any further pointers > would be appreciated. To answer your first question: See module color.py lines 334 to 340. Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. |