• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to write sine wave algorithm code

 
ilyas besli
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem.
My course homework is about draw sine wave
and I must do this in java.
How do I do this.

for any help, Thanks...
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, do you know how to write a program that draws a line, circle, or other picture?
 
ilyas besli
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I know draw line, oval, rectangle etc.
But I could not understand how to draw sine wave.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this?

I'm sure you'll have to multiply x & y by some scale to make it fit the screen. Give it a try and show us what you make. Then we'll know exactly where you're stuck. Or not!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic