line example 1


nitrofurano 2022-12-20 22:28

line routine "stolen" (adapted) from @SP4CEBAR "Something aesthetic"! ;)

line1b.nx | Open in app
2022-12-20 22:28

SP4CEBAR 2022-12-21 12:17 (Edited)


It could get even faster by removing the boundary check for each pixel:

x=x*-(x>0 and x<1024)
y=y*-(y>0 and y<1024)

But then you need to make sure that the line coordinates don't get outside of the boundary, which it looks like your program already does

Log in to reply.