wgxli / complex-function-plotter

WebGL Complex Function Plotter
https://samuelj.li/complex-function-plotter/
GNU General Public License v3.0
48 stars 9 forks source link

option for square-centered checkerboard #18

Open farteryhr opened 1 year ago

farteryhr commented 1 year ago

where the brighter checkerboard centered at the origin.

because of floating point, numbers who should be zero are actually around zero, and this decides whether the checkerboard is dark or bright for purely real / imaginary values. thus with specific evil formulae in specific area, darker pixels appear in strange patterns or like noise or even unpleasantly wholly darker.

so providing this option may make graphs of specific formulae look better. (but yeah the cross centered option helps to find certain whole numbers at the intersections, it's useful too)

maybe better organization of those big options as well? checkerboards: none, cross centered, square centered

btw i personally prefer continuous gradient by default, the layering (also better name it "layered gradient" for consistency) is sometimes a bit confusing, especially together with checkerboard. also looks brighter.

btw2 the 0/inf/-inf/NaN behavior (rendered as gray) works only with "continuous gradient, no checkerboard, no inverted gradient", and otherwise it's rendered as black. it's better to have deterministic behavior here.

btw3 better to have examples for j-invariant and nome come with /1728 for both better color and introduction purpose.

btw4 triangular and hexagonal "checkerboard", possibly better with corresponding round(hround tround?) function (for example, round to centers of RGB regions formed by cm(z*pi*i) ). after all, math is (for) fun, one may have more fun with elliptic/modular functions this way.