total gdi+ newbie

ronin2307

Member
Joined
Mar 10, 2005
Messages
16
Programming Experience
1-3
How to draw Sine Curve

I would like to know how to draw a sine curve.

can anybody help?

thanks
 
Last edited by a moderator:
sorry for the lack of detail:

basically this is what I would like to do:
using a for loop, on each iterration I would like to draw a point
at the end of the loop I have a whole bunch of points that together form a sine curve

since I am new to this if there are other approaches or ideas, they will be greatly appreciated

thanx
 
Dude, i don't understand what is sine curve. Moreover, even if we disregard it your question is still confusing. How exactly these points will be drawn? By random choice? Otherwise if you already know the point values you don't need a loop at all. Where that sine func come in action?

take a look at this article http://www.vbdotnetforums.com/showthread.php?t=5182 maybe this is what you want

OMG ... ok, take a look at this demo and tell me what is not like you want to be.

Waiting for your feedback

Regards
 

Attachments

  • DrawCurve.zip
    22.3 KB · Views: 36
considering...

we are from the same part of the world it is amazing that we don't understand each other.

I realize of course that sine is a math function. This function can be represented in a graph (looks like a wave starting at (0,0)) this is what I am refering to as the sine curve/graph. whatever you want to call it.

with the basics out of the way....
The idea was do create sort of a "progress bar" where the sine graph/curve would be "drawn" or generated almost pixel by pixel in any given amount of time.

I hope this makes more sense because I don't know how else to explain it.
as for your demo I have seen and tried that before, but what I don't want is the graph/curve to appear instantly
 
Djesi bolan, Baa?
Super, konacno sam razumio :D
Zapravo, daj mi tvoju formulu prema kojoj zelis iscrtati grafikon i ja cu ti pripremiti kratki demo. Uh jebo te, ova sa sinusima i kosinusima nisam radio jos od osnovne skole :)
Znaci da bi sve to radilo moras imati sledece velicine:
For those who aren't from Sarajevo: In order to present some math finctions with graph 1st we need to know some given values like:

A - amplitude (the height of each peak above the baseline)
C - vertical offset (height of the baseline)
P - period or wavelength (the length of each cycle)
w - angular frequency, given by W = 2
pi.gif
/P
a - phase shift (the horizontal offset of the basepoint; where the curve crosses the baseline as it ascends)

however, these may vary depends on given formula

Regards ;)


btw, sta je ovo neki domaci zadatak ili ispit na fakultetu?
 
super

konacno se razumijemo :D

Ja nikada nisam sa graphovima radio a dosadno mi bilo gledati standardni windows statusbar. Zato sam odlucio da naucim gdi+ malo i da vidim da li bi mogao to napraviti sto sa ti prije objasnio.

Nije ovo za fakultet. ja sam vec to zavrsio i sada radim u US.

sto se sine graph tice, vars su totalno na tebi. Ja bi samo htio da vidim kako se to programira sa gdi+

Hvala majstore
 
Back
Top