English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

Depends on your purpose: a sound sine wave or a graphic sine wave?
For a graphic, depends on your graphic interface, but, merly, you just create a bitmap.
The x axis (horizontal) is "time", one pixel per unit.
The Y axis (vertical) is the amplitude and
Y = sin(x)
A for next loop will do.
for x=0;x<360;x++ {
y = sin(x); (in degrees: you may have to convert to radians)
plot (x, y)
}
Adjust the scale and the steps to get the shape you want...

2006-09-16 07:08:20 · answer #1 · answered by just "JR" 7 · 0 0

fedest.com, questions and answers