-
How can I create a curve from an equation? I would like it to be displayed as a line and not a series of points. Kind of like a treadline. This is for a school project where I'm trying to generate a series of lines based on engineering equations. Thanks!
-
Am I right in assuming that you are simply looping through the x variables and ploting the points?
Code:
'creates dots
For X=0 to 100
Y=Exp(X)
Picture1.pset(X, Picture1.Height-Y), vbBlack
Next X
'creates lines (not smooth)
Picture1.PSet (0, Picture1.Height), vbBlack
For X = 0 To 10
Y = Exp(X)
Picture1.Line -(X * 10, Picture1.Height - Y)
Next X
'creates lines (smooth) You have to loop for all x's and
y's
For X = 0 To Picture1.Width / 10
Y = Exp(X)
Picture1.PSet (X * 10, Picture1.Height - Y), vbBlack
Next X
For Y = 1 To Picture1.Height
X = 10 * Log(Y)
Picture1.PSet (X, Picture1.Height - Y), vbBlack
Next