johnny-morrice / godelbrot

Unix-style Mandelbrot set renderer in Golang
MIT License
8 stars 1 forks source link

Backend zoom inaccurate #29

Closed johnny-morrice closed 8 years ago

johnny-morrice commented 8 years ago

Backend zoom is just off.

johnny-morrice commented 8 years ago

At least some of this is caused by the configbrot -fix parameter, which causes the backend to correct the plane aspect ratio to output image aspect ratio as requested.

The fix works by forcing more plane into the image. This made sense to me at first, because that meant none of the requested area would be lost. However, mathematically speaking forcing more plane into the image is equivalent to zooming out.

Shall fix by shrinking instead of growing, by default. Will make this choice configurable (as some clients may want to reverse zoom by navigating). Will move functionality out of algorithms, and into global config. Will implement using arbitrary precision arithmetic.

johnny-morrice commented 8 years ago

dcd9dac provides a skeleton for implementing the suggestions in the previous comment. Needs debugged and tested. Algorithm unit tests need fixed, too, since this functionality is removed.

johnny-morrice commented 8 years ago

9af6218 corrects the business of the aspect ratio

There is a second issue here with restfulbrot not returning the correct details after GetRq, or otherwise not storing the correct details.

Rest server currently has no unit tests, so writing unit tests would be a good place to start.