Page 1 of 1
Cos and Sin for Wavey Text?
Posted: Wed Jun 02, 2010 8:37 pm
by Swos2009
I have started to make cos and sin to make the wavey text but I have managed make the text go up and down....
like this
Code: Select all
angle=angle+1
DrawText(x,50+4*Sin(angle), Text$, RGB(255,255,255))
my questions is how do i make wavey text like you see in amiga demo?
Re: Cos and Sin for Wavey Text?
Posted: Thu Jun 03, 2010 9:03 am
by Blood
Draw the text to an image and then chop that image up into thin vertical slices and move each one independently to achieve the effect.
Re: Cos and Sin for Wavey Text?
Posted: Thu Jun 03, 2010 9:38 pm
by Swos2009
Draw the text to an image and then chop that image up into thin vertical slices and move each one independently to achieve the effect.
I am sorry but I dont know how to achive these... I would like to make sinus scroller but i dont how to do it
could someone show me the code how to achive it pls?
Re: Cos and Sin for Wavey Text?
Posted: Fri Jun 04, 2010 8:30 am
by djes
Where would be the fun, then? Just look at a demo and try to do it by yourself... :/
Re: Cos and Sin for Wavey Text?
Posted: Mon Jun 07, 2010 11:57 am
by Kaeru Gaman
plotting a function means, to draw points on the screen in that way, that the y coordinate is determed by the function value correcponding to the x value.
in case of trigonometrical functions, the x coordinate means the angle you input into the function.
so, start by programming a loop that counts the x coordinates, calculate the functional value from this x, and take the result as y coordinate.
keep in mind, that the sinus functions in PB work upon radiant values, so the waves have a phase of 2pi.
that means, you'll need to devide the x value you put into the function by a high enough value.
e.g. when you put x/16 into the function, you stretch the wave to a phase of approximately 100 pixel (16 ~ 100/2pi).
Re: Cos and Sin for Wavey Text?
Posted: Tue Jun 08, 2010 5:13 pm
by Foz
Swos2009 wrote:I am sorry but I dont know how to achive these... I would like to make sinus scroller but i dont how to do it
could someone show me the code how to achive it pls?
When you originally asked about an Amiga demo, I gave you a link to a post - that still has a working demo, complete with text bitmap chopping, rotating, sine wave coasting & scrolling.