You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the tui rendering of the fractal image is done is I translate the image into blocks of grayscale that match the size of the terminal rows and columns. The grayscales are then scaled again to the 24 graduations allowed in the terminal. The unicode block character is used to draw the image.
fn terminal_render
Some suggestions for improvement... rather than take the overall brightness of the block you would need to choose from a range of different characters that best match the pixels in the image. For example one way would be split it horizontally or vertically if the two halves are vastly difference in brightness.
For example lets say the brightness average is 24 for the top half and 8 for the bottom, you could draw a unicode half block and use the foreground and background colors to get the two different grayscales.
I'm sure people have worked on this before so there may well be a library and/or some ideas on how to do it.
The text was updated successfully, but these errors were encountered:
The way the tui rendering of the fractal image is done is I translate the image into blocks of grayscale that match the size of the terminal rows and columns. The grayscales are then scaled again to the 24 graduations allowed in the terminal. The unicode block character is used to draw the image.
fn terminal_render
Some suggestions for improvement... rather than take the overall brightness of the block you would need to choose from a range of different characters that best match the pixels in the image. For example one way would be split it horizontally or vertically if the two halves are vastly difference in brightness.
For example lets say the brightness average is 24 for the top half and 8 for the bottom, you could draw a unicode half block and use the foreground and background colors to get the two different grayscales.
I'm sure people have worked on this before so there may well be a library and/or some ideas on how to do it.
The text was updated successfully, but these errors were encountered: