General > Off Topic

Sinus

<< < (2/4) > >>

Zelos:
and not like this

PurpleYouko:
All you need is to plot a point with a Y offset from your line. Make the offset equal to the sin of the x position of the point on the

For a line where X=Y this is pretty easy

This should do what you want in its simplest form


--- Code: ---for x=1 to 1000
  pset(x,x),1                'draw diagonal
  pset(x,x+sin(x)*100  'draw sin curve superimposed on the slope
next x
--- End code ---

PurpleYouko:
Just occurred to me that code might do the curve that you dont want.

Numsgil:
I see the function you want I think.  Sort of a sinusoidal stairstep looking thing.

I'm not 100% sure to be honest.  xsin(x) will give you the one you don't want...

It's been many years since trig.

PurpleYouko:
I think you might need to do xsin(x),ysin(y) while the result is under the line and xsin(x),y-sin(y) when it's above.

I could be wrong though and I can't be assed to go test it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version