![]() |
| |||
| Hello I have a problem on my brain since at least 2 years.. Maybe somebody will have a solution. In summary I want to do contour shading without having to go through "lights" ans things like Gouraud or Phong shading. Here is a more detailed overview : I have a spatial quantity which can be contoured. The representation is in 2D. Let's say for instance I want to plot a map of the temperatures over a continent. The data I have is a plane. I computed the contours based on the data. Now I want to display them filled (each interval as a different color). OK. This is done. So far so good. The next step I would like to add is shading the colors so that the middle of each interval has the color set for the interval, and each side is increasing (or decrasing) toward the color of the next interval. All the things I have looked at seems to be working either by re-computing the contours (interpolation), or by computing distances from the edges of the defining polygons, or by applying some sort of 3-D-like processing (the shading algorithms like Gouraud or Phong take into account a certain height of the light source or inclination or point of view). What I had in mind was taking solely the output image of the contour filling and being able to derive from that a new image with smooth color filling. And everytime I try, I find myself no quite at the expected result : either there is an "obstacle" effect (colors are smooth if there is no obstacle, or in the pixels in front of the obstacle, but not on the other side), or there is a "rotation" effect (if I compute on the fly the barycenter of the closest different colors, it works well enough but at some points I have steps and not smooth transitions). So my question is : does anybody have any idea on that ? how to deduce (and obviously it should be relatively quick in computing time) a shading without having to resort either to 3-D-like techniques or to the original points of the contour, but solely based on the output of the "flat"-filled contouring ? Thanks for any input.. -- |
| | ||||
| ||||
| |
| |||
| greg.michael***gmail.com wrote: > Wouldn't what you're asking for be more or less equivalent to mapping > the original data onto a colour scale? If you want the smoothing > effect of the contours, couldn't you just apply some smoothing to the > data instead? > > regards, > Greg No. The contours are computed. I do not have (or want) the data at this stage. Furthermore the data were scattered and the contours were obtained by Delaunay triangulation. Now I have the contours but I would like not to use the lines as such. I would like that to be an "after-effect".. I computed all the masks etc. to fill the display. I plotted the filled contours. And now as an option to the user I would like to add a possibility of smoothing like with a toggle... So I would prefer to have only a "visual only" solution, meaning outputing the filled contours on an image for instance, and then using this 2D color image to deduce the smoothing.. Hope this is clearer.... -- |
| |||
| greg.michael***gmail.com wrote: > Wouldn't what you're asking for be more or less equivalent to mapping > the original data onto a colour scale? If you want the smoothing > effect of the contours, couldn't you just apply some smoothing to the > data instead? > > regards, > Greg No. The contours are computed. I do not have (or want) the data at this stage. Furthermore the data were scattered and the contours were obtained by Delaunay triangulation. Now I have the contours but I would like not to use the lines as such. I would like that to be an "after-effect".. I computed all the masks etc. to fill the display. I plotted the filled contours. And now as an option to the user I would like to add a possibility of smoothing like with a toggle... So I would prefer to have only a "visual only" solution, meaning outputing the filled contours on an image for instance, and then using this 2D color image to deduce the smoothing.. Hope this is clearer.... -- |
| |||
| jano trouba wrote: > > > Hello > > I have a problem on my brain since at least 2 years.. Maybe somebody > will have a solution. > > In summary I want to do contour shading without having to go through > "lights" ans things like Gouraud or Phong shading. > > Here is a more detailed overview : > > I have a spatial quantity which can be contoured. The representation > is in 2D. Let's say for instance I want to plot a map of the > temperatures over a continent. The data I have is a plane. I computed > the contours based on the data. Now I want to display them filled > (each interval as a different color). OK. This is done. So far so > good. > > The next step I would like to add is shading the colors so that the > middle of each interval has the color set for the interval, and each > side is increasing (or decrasing) toward the color of the next > interval. > > All the things I have looked at seems to be working either by > re-computing the contours (interpolation), or by computing distances > from the edges of the defining polygons, or by applying some sort of > 3-D-like processing (the shading algorithms like Gouraud or Phong > take into account a certain height of the light source or inclination > or point of view). > > What I had in mind was taking solely the output image of the contour > filling and being able to derive from that a new image with smooth > color filling. > > And everytime I try, I find myself no quite at the expected result : > either there is an "obstacle" effect (colors are smooth if there is no > obstacle, or in the pixels in front of the obstacle, but not on the > other side), or there is a "rotation" effect (if I compute on the fly > the barycenter of the closest different colors, it works well enough > but at some points I have steps and not smooth transitions). > > So my question is : does anybody have any idea on that ? how to deduce > (and obviously it should be relatively quick in computing time) a > shading without having to resort either to 3-D-like techniques or to > the original points of the contour, but solely based on the output of > the "flat"-filled contouring ? > > Thanks for any input.. > > > So nobody in here to give me a hint ? I would have thought this is a fairly common problem .... This is a true question on which I'm hitting a wall for the past 2 years.... -- |
| |||
| jano trouba wrote: > > > Hello > > I have a problem on my brain since at least 2 years.. Maybe somebody > will have a solution. > > In summary I want to do contour shading without having to go through > "lights" ans things like Gouraud or Phong shading. > > Here is a more detailed overview : > > I have a spatial quantity which can be contoured. The representation > is in 2D. Let's say for instance I want to plot a map of the > temperatures over a continent. The data I have is a plane. I computed > the contours based on the data. Now I want to display them filled > (each interval as a different color). OK. This is done. So far so > good. > > The next step I would like to add is shading the colors so that the > middle of each interval has the color set for the interval, and each > side is increasing (or decrasing) toward the color of the next > interval. > > All the things I have looked at seems to be working either by > re-computing the contours (interpolation), or by computing distances > from the edges of the defining polygons, or by applying some sort of > 3-D-like processing (the shading algorithms like Gouraud or Phong > take into account a certain height of the light source or inclination > or point of view). > > What I had in mind was taking solely the output image of the contour > filling and being able to derive from that a new image with smooth > color filling. > > And everytime I try, I find myself no quite at the expected result : > either there is an "obstacle" effect (colors are smooth if there is no > obstacle, or in the pixels in front of the obstacle, but not on the > other side), or there is a "rotation" effect (if I compute on the fly > the barycenter of the closest different colors, it works well enough > but at some points I have steps and not smooth transitions). > > So my question is : does anybody have any idea on that ? how to deduce > (and obviously it should be relatively quick in computing time) a > shading without having to resort either to 3-D-like techniques or to > the original points of the contour, but solely based on the output of > the "flat"-filled contouring ? > > Thanks for any input.. > > > So nobody in here to give me a hint ? I would have thought this is a fairly common problem .... This is a true question on which I'm hitting a wall for the past 2 years.... -- |
| |
| |
![]() |
| Tags: contour, shading |
| Outils de la discussion | |
| Modes d'affichage | |
| |
| ||||
| Discussion | Auteur | Forum | Réponses | Dernier message |
| [tikz/pgf] Gouraud shading | P.Fradin | Newsgroup fr.comp.text.tex | 8 | 12/05/2008 12h58 |
| Re: Contour d'un nuage de points | Jean-marc | Newsgroup fr.comp.algorithmes | 10 | 10/05/2008 09h40 |
| Re: Contour d'un nuage de points | Armel | Newsgroup fr.comp.algorithmes | 0 | 26/04/2008 19h08 |
| Re: Contour des images par défaut | pher | Newsgroup microsoft.public.fr.word | 0 | 07/02/2008 10h21 |
| Faire une empreinte de contour.... | CyberPapy Henry | Newsgroup fr.rec.bricolage | 34 | 06/12/2007 18h23 |