• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sine wave

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to draw a sine wave, with a thickness of about 3.

When I draw it, the curve never comes out smooth, even with antialiasing turned on.

I've tried drawing lots of line segments, using ovals, and also polygons. but none of them come out smooth...
You can always see like a ladder effect along the curve close up.

Can anyone help me do this? Thanks very much.
 
Maneesh Godbole
Saloon Keeper
Posts: 11096
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about showing us some code.
 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok then..


Its a bit messy, hope that helps>
 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, I just used a cubic bezier curve, makes it look better, so I don't need the sinewave now. Thanks
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does a Bezier curve match a sine wave? Show us how.
 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its close enough
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic