Advertisement
linesguy

Plotting Calculator (updated)

Feb 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. 0 rem update mar 3 2017: fixed some formulas such as y=tan(x) not showing full graph, and finally added a zoom level
  2.  
  3. 100 Y=tan(x) : rem formula
  4. 3 acc = 0.01 : rem decrease for more accuracy, but not zero
  5. 4 z = 10 : rem zoom level (lower is more zoomed out, bigger is more zoomed in)
  6.  
  7.  
  8.  
  9. 10 hgr2 : hcolor = 1
  10. 13 hplot 0,95 to 279,95 : hplot 139,0 to 139,191
  11. 19 hcolor = 3
  12. 20 y = y1 : x = x1 : gosub 100 : y1 = y : x1 = x
  13. 25 y = y2 : x = x2 : gosub 100 : y2 = y : x2 = x
  14. 30 if 279/2-x1*z > 0 and 279/2-x1*z < 279 and 191/2-y1*z > 0 and 191/2-y1*z < 191 then hplot 279/2-x1*z,191/2-y1*z
  15. 35 if 279/2-x2*z > 0 and 279/2-x2*z < 279 and 191/2-y2*z > 0 and 191/2-y2*z < 191 then hplot 279/2-x2*z,191/2-y2*z
  16. 40 x1 = x1 + acc
  17. 45 x2 = x2 - acc
  18. 50 goto 20
  19.  
  20. 110 return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement