bifdiag.bas
First of all, from For i = 0 To W we conclude that i is iterating along the horizontal axis (along screen width), however on PicoCalc r goes from top to bottom, according to title picture from clockworkpi.com, not left to right, therefore arguments in Pixel H - Int(x * H), i statement are swapped.
Second, last i equals W, which is 320, but the screen scan lines go from 0 to 319, it's off by one.
So either diagram is rotated 90° to the right from intended position, or it is the intended position and then variables W and H are used in wrong order. It doesn't cause a problem because they are equal, but if one tried to draw on non-square display it will cause a problem.
Same off-by-one bug is within expression H - Int(x * H): if x = 0.0, then Int(0.0) = 0 and you get H in the Pixel argument, while you need (H - 1) instead. If x = 1.0 then H - H = 0, this is correct.
I do not have access to PicoCalc to verify it, however.
bifdiag.bas
First of all, from
For i = 0 To Wwe conclude thatiis iterating along the horizontal axis (along screen width), however on PicoCalcrgoes from top to bottom, according to title picture from clockworkpi.com, not left to right, therefore arguments inPixel H - Int(x * H), istatement are swapped.Second, last
iequalsW, which is320, but the screen scan lines go from0to319, it's off by one.So either diagram is rotated 90° to the right from intended position, or it is the intended position and then variables
WandHare used in wrong order. It doesn't cause a problem because they are equal, but if one tried to draw on non-square display it will cause a problem.Same off-by-one bug is within expression
H - Int(x * H): ifx=0.0, thenInt(0.0)=0and you getHin thePixelargument, while you need(H - 1)instead. Ifx=1.0thenH - H=0, this is correct.I do not have access to PicoCalc to verify it, however.