Hi,
I made small program which draws math fuctions
But I ran into problem:
Not displaying properly function when difference between old Y and new Y is higher than 1.
I tried
Code is in attachment
Screenshot also
I program on bigger screen becouse better view than 51x19
0
Filling empty spaces in drawing math functions
Started by Maccraft123, Jul 29 2018 10:05 AM
2 replies to this topic
#1
Posted 29 July 2018 - 10:05 AM
#2
Posted 29 July 2018 - 10:43 AM
Maccraft123, on 29 July 2018 - 10:05 AM, said:
Code is in attachment
Screenshot also
Screenshot also
Nope: you might've noticed the attachment system didn't let you upload anything.
Screenshots need to be hosted offsite, using a host such as imgur. You might also use pastebin for your code.
#3
Posted 03 August 2018 - 08:42 PM
Is your issue having something like this?
To get around this, you could draw a column of pixels up until the next Y coordinate. Something like this:
However what I'd do personally is generate a list of points (x, y coordinates) and then draw lines between those points using paintutils.drawLine or your own function.
To get around this, you could draw a column of pixels up until the next Y coordinate. Something like this:
for y = currentY, nextY, currentY < nextY and 1 or -1 do drawPixel(currentX, y) end
However what I'd do personally is generate a list of points (x, y coordinates) and then draw lines between those points using paintutils.drawLine or your own function.
Spoiler
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users