Guides needed to generate graphic using VB

Status
Not open for further replies.

bihlii

Newbie level 3
Joined
Dec 24, 2002
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
23
Anyone can provide me some guides on what i hv to go thru or some examples on how to generate a graphic in VB? wat i mean is if i hv a mathematical function, how can i generate a graph for it in VB?

2nd que : let say i hv a cctv. It comes with a software. How can i integrate that program so that my own VB program can show what the visual from cctv?

Guides, references and examples are appreciated!
 

For the firstquestion, usually we calculate some function value at some discrete point and connect them sequentially to approximate the graph of the function. The following code fragment can show you the main idea

x(0) = x0 + LowX
y(0) = f(x(0)) - y0

MoveTo (x(0), y(0))

for i = 1 to N
x(i) = x(i - 1) + delta
y(i) = f(x(i))
Line (x(i-1), y(i - 1))-(x(i), y(i))
next i

where (x0, y0) is the screen coordinate of the origin, LowX is the lower bound of the x, delta is increaments of x, f() is the function.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…