Revision [97]
Last edited on
2007-09-19 12:25:06 by KrzysztofSobolewski
[Add note about configurability of Plotters.]
Additions:
To use a specific Plotter implementation you need to set the **global.plotter** setting (see the [[UnifiedConfigurationModel Unified Configuration Model]]). Some Plotter implementations (look for those near the word "default") can also define their own settings, under the **plotter** hierarchy (like **plotter.capped.cap**).
Deletions:
To use a specific Plotter implementation you need to set the **global.plotter** setting (see the [[UnifiedConfigurationModel Unified Configuration Model]]).
Additions:
Uh, sorry about that.
Deletions:
Uh, sorry for that.
Additions:
[[http://starmapper.sourceforge.net/api/starmapper3/trunk/jezuch/utils/starmapper3/Plotter.html Plotter]] is a pluggable object that converts raw numbers generated by Starmapper into pixels. Its mode of operation is simple: initialize a new image -> process lots of pixels -> additional post-processing pass -> return the image. In the meantime it is asked to print some [[http://starmapper.sourceforge.net/api/starmapper3/trunk/jezuch/utils/starmapper3/Font.html strings]] and draw some [[http://starmapper.sourceforge.net/api/starmapper3/trunk/jezuch/utils/starmapper3/Icon.html icons]] (to mark locations of nodes). Basically, Plotter takes care of the actual image that will be returned to the user.
So, the Plotter can do lots of different things with the data, and so do the many implementations in package [[http://starmapper.sourceforge.net/api/starmapper3/trunk/jezuch/utils/starmapper3/plotters/package-summary.html jezuch.utils.starmapper3.plotters]].
Deletions:
[[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Plotter.html Plotter]] is a pluggable object that converts raw numbers generated by Starmapper into pixels. Its mode of operation is simple: initialize a new image -> process lots of pixels -> additional post-processing pass -> return the image. In the meantime it is asked to print some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Font.html strings]] and draw some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Icon.html icons]] (to mark locations of nodes). Basically, Plotter takes care of the actual image that will be returned to the user.
So, the Plotter can do lots of different things with the data, and so do the many implementations in package [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/plotters/package-summary.html jezuch.utils.starmapper3.plotters]].
Additions:
Uh, sorry for that.
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-s.png SmoothPlotter]]**: it's much like CappedPlotter, but the dependence between influence and intensity is non-linear (it's logrithmic). This still needs a cap value (the influence can be very high very near to nodes), but it can be much lower (by default it's 5.0f).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-b.png BorderPlotter]]** (still somewhat experimental): this is the only one that requires knowledge of more than one pixel at a time to work correctly. It tries to detect borders between regions (like one competing mapper, XTreme Borders for Stars!) by proceeding like DefaultPlotter most of the time but doing a final post-processing pass when all of the pixels are known (the thickness defaults to 4 pixels). This was the motivation for adding this extra pass to the Plotter API, actually (along with additional events and modifications to the app-cli). But note that border detection is currently slower than the calculation of influences :)
Deletions:
OK, sorry for that.
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-s.png SmoothPlotter]]**: it's much like CappedPlotter, but the dependence between influence and intensity is non-linear (it's logrithmic). This still needs a cap value (the influence can be very high very near to nodes), but it can be much lower (bu default it's 5.0f).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-b.png BorderPlotter]]** (still somewhat experimental): this is the only one that requires knowledge of more than one pixel at a time to work correctly. It tries to detect borders between regions (like one competing mapper, XTreme Borders for Stars!) by proceeding like DefaultPlotter most of the time but doing a final post-processing pass when all of the pixels are known. This was the motivation for adding this extra pass to the Plotter API (along with additional events and modifications to the app-cli). But note that border detection is currently slower than the calculation of influences :)
Additions:
[[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Plotter.html Plotter]] is a pluggable object that converts raw numbers generated by Starmapper into pixels. Its mode of operation is simple: initialize a new image -> process lots of pixels -> additional post-processing pass -> return the image. In the meantime it is asked to print some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Font.html strings]] and draw some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Icon.html icons]] (to mark locations of nodes). Basically, Plotter takes care of the actual image that will be returned to the user.
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-b.png BorderPlotter]]** (still somewhat experimental): this is the only one that requires knowledge of more than one pixel at a time to work correctly. It tries to detect borders between regions (like one competing mapper, XTreme Borders for Stars!) by proceeding like DefaultPlotter most of the time but doing a final post-processing pass when all of the pixels are known. This was the motivation for adding this extra pass to the Plotter API (along with additional events and modifications to the app-cli). But note that border detection is currently slower than the calculation of influences :)
To use a specific Plotter implementation you need to set the **global.plotter** setting (see the [[UnifiedConfigurationModel Unified Configuration Model]]).
Deletions:
[[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Plotter.html Plotter]] is a pluggable object that converts raw numbers generated by Starmapper into pixels. Its mode of operation is simple: initialize a new image -> process lots of pixels -> return the image. In the meantime it is asked to print some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Font.html strings]] and draw some [[http://starmapper.sourceforge.net/api/starmapper3/jezuch/utils/starmapper3/Icon.html icons]] (to mark locations of nodes). Basically, Plotter takes care of the actual image that will be returned to the user.
- **BorderPlotter**: this experimental is the only one that requires knowledge of more than one pixel at a time to work correctly. It tries to detect borders between regions (like one competing mapper, XTreme Borders for Stars!) by proceeding like DefaultPlotter most of the time but doing a final pass when asked to return the image. This pass unfortunately includes icons, planet names and the legend, so it looks weird, to say the least ;) This is a serious limitation of the API and I think it sould be lifted some day... [or I can apply some neat tricks to simulate this effect having only limited information]
Additions:
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-d.png DefaultPlotter]]**: default and the most boring one. It finds the Region with maximum influence and paints the pixel with its colour. This is the only Plotter that returns images with indexed color model.
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-c.png CappedPlotter]]**: a simple extension of the DefaultPlotter. The pixel still has the colour of Region with the maximum influence, but the colour's intensity is proportional to the influence. Of course, the influence value can be unbounded, but the intensity can't, so there's a //cap value// at which the intensity reaches maximum (it is configurable in the constructor, but by default it's 10.0f).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-s.png SmoothPlotter]]**: it's much like CappedPlotter, but the dependence between influence and intensity is non-linear (it's logrithmic). This still needs a cap value (the influence can be very high very near to nodes), but it can be much lower (bu default it's 5.0f).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-m.png MixingPlotter]]**: this time it's not about maximum - the pixel's color is a mix of //all// colours of Regions that have an influence on this pixel. All components are calculated as a weighted average - the weights are the influences normalized so that the sum of weights gives 1. This produces really cool images on maps where nodes are dense, but looks flat like DefaultPlotter for sparse maps.
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-cm.png CappedMixingPlotter]]**: it's a mix of MixingPlotter and CappedPlotter. The colours are mixed and then scaled proportional to the sum of influences (capped at 10.0f by default).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-sm.png SmoothMixingPlotter]]**: it's a mix of MixingPlotter and SmoothPlotter. The colours are mixed and then scaled proportional to logarithm of the sum of influences (capped at 6.66f by default).
- **[[http://starmapper.sourceforge.net/demos/apocal-2510-o.png DominationPlotter]]**: this one is like DefaultPlotter, but is more strict about what it considers "maximum influence". The colour of the pixel is still the colour of the Region with maximum influence, but this time this influence must be greater than all other influences //combined// - it has to literally "dominate". This usually generates black stripes between regions (unless there are only two of them).
Deletions:
- **DefaultPlotter**: default and the most boring one. It finds the Region with maximum influence and paints the pixel with its colour. This is the only Plotter that returns images with indexed color model.
- **CappedPlotter**: a simple extension of the DefaultPlotter. The pixel still has the colour of Region with the maximum influence, but the colour's intensity is proportional to the influence. Of course, the influence value can be unbounded, but the intensity can't, so there's a //cap value// at which the intensity reaches maximum (it is configurable in the constructor, but by default it's 10.0f).
- **SmoothPlotter**: it's much like CappedPlotter, but the dependence between influence and intensity is non-linear (it's logrithmic). This still needs a cap value (the influence can be very high very near to nodes), but it can be much lower (bu default it's 5.0f).
- **MixingPlotter**: this time it's not about maximum - the pixel's color is a mix of //all// colours of Regions that have an influence on this pixel. All components are calculated as a weighted average - the weights are the influences normalized so that the sum of weights gives 1. This produces really cool images on maps where nodes are dense, but looks flat like DefaultPlotter for sparse maps.
- **CappedMixingPlotter**: it's a mix of MixingPlotter and CappedPlotter. The colours are mixed and then scaled proportional to the sum of influences (capped at 10.0f by default).
- **SmoothMixingPlotter**: it's a mix of MixingPlotter and SmoothPlotter. The colours are mixed and then scaled proportional to logarithm of the sum of influences (capped at 6.66f by default).
- **DominationPlotter**: this one is like DefaultPlotter, but is more strict about what it considers "maximum influence". The colour of the pixel is still the colour of the Region with maximum influence, but this time this influence must be greater than all other influences //combined// - it has to literally "dominate". This usually generates black stripes between regions (unless there are only two of them).
Additions:
Plotter is given an array of ""float""s (along with the coordinates of the pixel currently processed). Each elements is a value of //influence// of a region on this point (the actual function used to calculate influences is described **FIXME** uh, somewhere else... but basically it's proportional to the inverse of the distance). Plotter should know which index describes which region, because upon initialization, Plotter is also given a List of Regions (along with their colours), whose elements are in exactly the same order as in the array of influences.
- **DefaultPlotter**: default and the most boring one. It finds the Region with maximum influence and paints the pixel with its colour. This is the only Plotter that returns images with indexed color model.
- **CappedPlotter**: a simple extension of the DefaultPlotter. The pixel still has the colour of Region with the maximum influence, but the colour's intensity is proportional to the influence. Of course, the influence value can be unbounded, but the intensity can't, so there's a //cap value// at which the intensity reaches maximum (it is configurable in the constructor, but by default it's 10.0f).
- **SmoothPlotter**: it's much like CappedPlotter, but the dependence between influence and intensity is non-linear (it's logrithmic). This still needs a cap value (the influence can be very high very near to nodes), but it can be much lower (bu default it's 5.0f).
- **MixingPlotter**: this time it's not about maximum - the pixel's color is a mix of //all// colours of Regions that have an influence on this pixel. All components are calculated as a weighted average - the weights are the influences normalized so that the sum of weights gives 1. This produces really cool images on maps where nodes are dense, but looks flat like DefaultPlotter for sparse maps.
- **CappedMixingPlotter**: it's a mix of MixingPlotter and CappedPlotter. The colours are mixed and then scaled proportional to the sum of influences (capped at 10.0f by default).
- **SmoothMixingPlotter**: it's a mix of MixingPlotter and SmoothPlotter. The colours are mixed and then scaled proportional to logarithm of the sum of influences (capped at 6.66f by default).
- **DominationPlotter**: this one is like DefaultPlotter, but is more strict about what it considers "maximum influence". The colour of the pixel is still the colour of the Region with maximum influence, but this time this influence must be greater than all other influences //combined// - it has to literally "dominate". This usually generates black stripes between regions (unless there are only two of them).
- **BorderPlotter**: this experimental is the only one that requires knowledge of more than one pixel at a time to work correctly. It tries to detect borders between regions (like one competing mapper, XTreme Borders for Stars!) by proceeding like DefaultPlotter most of the time but doing a final pass when asked to return the image. This pass unfortunately includes icons, planet names and the legend, so it looks weird, to say the least ;) This is a serious limitation of the API and I think it sould be lifted some day... [or I can apply some neat tricks to simulate this effect having only limited information]
- **AbstractPlotter**: as the name says, it's not a Plotter ready to use, but a convenient base class for other Plotters.
Deletions:
Plotter is given an array of ""float""s (along with the coordinates of the pixel currently processed). Each elements is a value of //influence// of a region on this point. Plotter should know which index describes which region, because upon initialization, Plotter is also given a List of Regions (along with their Colors), whose elements are in exactly the same order as in the array of influences.
- **DefaultPlotter**: default and the most boring one. It finds the Region with maximum influence and paints the pixel with its Color. This is the only Plotter that returns images with indexed color model.