Author Topic: Need Help Waving PIC  (Read 3190 times)

0 Members and 1 Guest are viewing this topic.

Offline Cod1ngFreak

  • ZX 81
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Need Help Waving PIC
« on: April 15, 2012 »
Hi,
I need a little help, and that I wanted a wavy image animation program.

This should look something like:


The X are the Pixels from the image

 XXXXXXXX -->
XXXXXXXX
XXXXXXXX

 XXXXXXXX
XXXXXXXX - >

       XXXXXXXX
  <--XXXXXXXX


  <--XXXXXXXX
XXXXXXXX

I hope you understand my question based on the description.
Or is there an easier way to achieve this?

Sorry for my bad english :(


Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Need Help Waving PIC
« Reply #1 on: April 18, 2012 »
Hi Cod1ngFreak.  So we can answer your question, what graphics library are you using in Freebasic (Tinyptc, fbgfx, sdl, opengl etc)?

To make a wavy offset like that, the best way is to use the sin command to generate a nice sine wave offset that can be added to each successive line of the picture when it's being drawn.

Have you written any of the code?
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Knurz

  • Atari ST
  • ***
  • Posts: 121
  • Karma: 25
    • View Profile
    • GitHub Repository
Re: Need Help Waving PIC
« Reply #2 on: April 18, 2012 »
Hi.

Take a look at a NeHe-Tutorial : http://nehe.gamedev.net/tutorial/flag_effect_(waving_texture)/16002/

This explains the basics of this "effect" and gives you a sample.

Remember what the dormouse said: Feed your head

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Need Help Waving PIC
« Reply #3 on: May 21, 2012 »
Hey guys... long time no see.

Cod1ngFreak, I was messing around with FreeBASIC a few years ago and made something to that effect. It's probably not what you expect... and not really what the functionality was designed for, in my opinion, but it does use a sine wave to manipulate an image as in your ascii drawing.  Hope it's useful. :)

http://drd.owlbox.net/download.php?id=108
The Dr. is INsane!!!