I am writing a java program to generate parabolic curves (essentially "curves" made of lots of straight lines to simulate the appearance of a curve, AKA straight line curves: see https://larc.unt.edu/ian/art/4ants/), and I am displaying it via a BufferedImage.
Disappointingly, the lines drawn by the drawLine method come out very blocky and staggered when at any sort of angle (see screenshot, particularly, top left and bottom right corners of the image, but also any of the angled lines in the middle).
Is there any way to get around this effect? Possibly by performing higher precision drawing operations?
Set your Graphics2D object's rendering hints, using the setRenderingHint method, before drawing your lines.
Since you're drawing lines, there are three rendering hints you'll want to set: