Posts: 1,166
Threads: 62
Joined: Apr 2003
I was just curious tonight, and I made a graphing program.
The problem I'm having is setting customizable window settings.
Will you guys help me implement that? Here's the code.
Code:
DEFDBL A-Z
SCREEN 13
xhalf = 160
yhalf = 100
xfull = 320
yfull = 200
'not fully implemented, but meh
xmin = -10
xmax = 10
ymin = -10
ymax = 10
xrange = xmax - xmin
yrange = ymax - ymin
xchange = xmax / xhalf
LINE (xhalf - 1, 0)-(xhalf - 1, yfull - 1), 15
LINE (0, yhalf - 1)-(xfull - 1, yhalf - 1), 15
b = xmin
FOR x = 0 TO xfull-1
y = mx + b
newy = -(y / xchange) + yhalf
b = b + xchange
IF oldx THEN LINE (oldx, oldy)-(x, newy), 15 ELSE PSET (x, newy), 15
oldy = newy: oldx = x
NEXT
am an asshole. Get used to it.
Posts: 704
Threads: 0
Joined: Dec 2002
http://www.geocities.com/gstumpff/graph.zip
is my version of a graphing program, if that helps.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 1,166
Threads: 62
Joined: Apr 2003
It's too freakin huge! I'm trying to make this a simple little program.
am an asshole. Get used to it.
Posts: 704
Threads: 0
Joined: Dec 2002
and still customizable in some way? Okaaaaaaay.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 538
Threads: 62
Joined: Apr 2003
heres a graphing program thats not mine
http://qb45.tonez-online.com/qbasic/pn/u...p?base=yes
that should do it.
then goto the file menu on the side and go in the misc category
and go to page nine. if that don't work then'll i'll send it to you in an email
url=http://www.spreadfirefox.com/?q=affiliates&id=0&t=79]
[/url]
Posts: 1,166
Threads: 62
Joined: Apr 2003
Is there any way for you guys to just change my source up? These programs are way to big to follow...
Basically I just want to be able to set the window... that's all.
am an asshole. Get used to it.
Posts: 704
Threads: 0
Joined: Dec 2002
I might do that. However, I will suggest that you use mode 12. Plots of data are generally more useful with smaller pixels and as many pixels per screen width/height as you can get. (If you're worried about mode 13 being faster than 12, 12 isn't that slow, especially for this kind of thing, and speed isn't usually that important for this. The point of plotting data is to generate the plot so you can figure something out, demonstrate a point to someone, etc., not watch stuff occur on the screen fast.
)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 1,166
Threads: 62
Joined: Apr 2003
I made it for 12, but I was flipping back and forth between the IDE and the program, so I was getting annoyed at the long time to switch to screen 12.
am an asshole. Get used to it.
Posts: 704
Threads: 0
Joined: Dec 2002
. (And actually, I did think I saw a "639" in your code at one point, but then I saw the "SCREEN 13".)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 1,166
Threads: 62
Joined: Apr 2003
Oh ya, I better fix that.
am an asshole. Get used to it.