@@ -15,7 +15,8 @@ There is not much to say about the axis itself, the *LineChartRasterizer* does n
...
@@ -15,7 +15,8 @@ There is not much to say about the axis itself, the *LineChartRasterizer* does n
## **Line rasterizing algorithm**
## **Line rasterizing algorithm**
The *LineChartRasterizer* currently uses the **bresenham** algorithm to draw a line between two datapoints as nearly to the ideal line as possible. Because **bresenham** assumes an equal distant grid, there is a conversion to be done between the geometrical position (for example in milimetres) and the dot position, measured in braillecell/ dots. The current implementation looksup the nearest point, which is why there are sometime aritfact points.
The *LineChartRasterizer* currently uses the **bresenham** algorithm to draw a line between two datapoints as nearly to the ideal line as possible. Because **bresenham** assumes an equal distant grid, there is a conversion to be done between the geometrical position (for example in milimetres) and the dot position, measured in braillecell/ dots. The current implementation looksup the nearest point, which is why there are sometime aritfact points.
Here the code:
Here the code:
` private void bresenham(final Double xStart, final Double yStart, final Double xEnd, final Double yEnd) {
There is future work to be done in evaluating more line draw algorithms, for example "P. Stephenson, B. Litow: Running the line:Line drawing using runs and runs of runs". Sadly, this algorithm is closed source and was only made available after the project finished.
There is future work to be done in evaluating more line draw algorithms, for example "P. Stephenson, B. Litow: Running the line:Line drawing using runs and runs of runs". Sadly, this algorithm is closed source and was only made available after the project finished.