Dont understand the feedback effect

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Dont understand the feedback effect

Post by Codemss »

I really dont know how to do this effect.

I've been really into democoding since a while, and i'm trying to make a demo with as much good effects as i can. Ive alot of dem now(water, fire, explosions,tunnel, plasma, lens, sphere mapping, a cool effect i made myself :) , PS look at my site there are a few of them http://members.lycos.nl/rubynl). Unfortunately I havent coded a single demo yet LOL.

I've googled for it, but feedback is a pretty shitty term to search for :x . I've seen the effect in mono and disco and here too: http://biskbart.free.fr/nouveau/progs/feedback.zip.
The source is with it, but I can't understand it :evil:.
Does somebody know how to do this? Any link to a page where some explanation is, is also highly appreciated :P.
Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Feedback effect

Post by Ralph »

You wrote: "I really dont know how to do this effect. "
Do you mean that you don't know how to run the Feedback.bas program, or that you don't know how to change it to do something else?

You wrote: "...i'm trying to make a demo with as much good effects as i can." and, "I havent coded a single demo yet ", and, also, "The source is with it, but I can't understand it. Does somebody know how to do this? Any link to a page where some explanation is, is also highly appreciated"
The first question that comes to mind is, how good are you at plain QuickBASIC coding? If you don't understand the basic QB programming, you will certainly not understand the more complex code you are dealing with. There are any number of free tutorials available on line, covering most topics of QB. Have you looked for those (enter "QB tutorials" in a search engine, for example)?

Finally, all learning is a step-by-step procedure. Perhaps, if you posted ONE question on ONE bit of code, you would get some good answers.
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Post by Codemss »

Sorry my post wasn't clear, but I can actually program in QB(I dont need a QB tutorial :)), I can run the program FEEDBAC.BAS, but I want to know how this effect works. I don't understand the source code or the whole idea behind feedback. I wondered if anybody had experience with this effect or remember a tutorial about it.
Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Post by Ralph »

As to the idea behind the program FEEDBACK.BAS, by running it in a controlled manner (by placing debugging toggle breakpoints, using F9, at strategic points), one sees that the string is created to a varying scale, location, and "smudgeiness", giving the impression of a mystical weaving of the string in an aetherial manner.

From the above, one can understand the main purpose and placing of the code, without knowing how it works in detail.

Try using the F9 key throughout the program, and run it in pieces, change any part you want to experiment with, just don't touch any POKE commands (you could be sorry, unless you know exactly what you are poking into), and, DON'T SAVE the changed program, unless you do a SAVE AS, and give it a different name, such as BACFEED1.BAS and such. By experimenting, you will start understanding how it works, in part, at least, and you can go on from there, asking specific questions here.
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish
relsoft
Coder
Posts: 24
Joined: Wed Jun 07, 2006 9:04 pm
Location: Philippines
Contact:

Post by relsoft »

It's actually a very easy effect to achieve.

It's just radial blurring. You could google that and find lots of tutorials.

The way it works is just to blur from the center while also scaling the blur process.


This may be of help. :*)
http://www.jhlabs.com/ip/blurring.html

EDIT:

I had time so I made you a little demo from mono and disco. Commented.
*Code snippet removed. Forum wont wont make me post the whole source. Pete?

Anyways, I posted the source on my site's forum. It's well commented but you need to register.

http://rel.betterwebber.com/index.php?a ... um=General
Hello. :*)
User avatar
Codemss
Veteran
Posts: 124
Joined: Sun Jun 24, 2007 6:49 am
Location: Utrecht, The Netherlands
Contact:

Post by Codemss »

Thanks, rel and ralph! I have took a quick look at the article you suggest, and I have to think about it a bit longer, because the article has no code or help on implementation. The 'faster' way was using a scaling routine, but that seems to be slower to me and I don't believe that that approach was used in Mono and Disco.

Anyway, I will look at your source soon, when I have some more time, and post another reply.

PS: Does my site work? When I try it it works fine, but Ralph pmed that it wasnt! Anyway, my host sucks :x !
Ralph
Veteran
Posts: 148
Joined: Fri Feb 09, 2007 3:10 pm
Location: Katy, Texas

Post by Ralph »

RubyNL wrote:
S: Does my site work? When I try it it works fine, but Ralph pmed that it wasnt!
I gave it another try, and, it worked!

I read your code on the 3d sphere. Works good! I did change your code slightly, as commented below, for the second FOR...NEXT loop:

Code: Select all

  FOR y = 0 yo 299
    ecuation = r^2 - (x - spherex)^2 - (y - spherey)^2
    IF equation >0 THEN
      nz! = SQR(equation)/r
      PSET (x, .85 * y) , nz! * 255
    END IF
  NEXT y
  
First, I simplified slightly your "equation ="
Second, by using an aspect ratio of .85 (the multiplier in the PSET(), I now get a nice, ROUND, sphere.

It is your code, though, so, what do you say?

Edited 3:22 pm:
I just went through your final program, works very good! Congratulations! Of course, I just had to make the pseudosphere into a true sphere! Here's how, using an aspect ratio of 0.78:

Code: Select all

        'PSet the point:
        PSET (xc + x, yc + .78 * y), ((u + a) XOR (v + b)) AND 255
Second Edit, 5:15 pm:
I don't understand what the "AND 255" at the end of the above PSET() line does. Remarking it out, I didn't notice any change.

Also, remarking out 'XOR (v+b) AND 255 gave me an almost solid black and grey sphere, which almost looks like a planet gyrating between night and day...almost. But, then, one notices that the internal curve of the nighttime-or daytime-crescents do not pass through the poles, that is, they are not true meridians. Going back to the original, you rotting sphere shows that effect, too. I wonder how that could be changed to show true meridians?
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish
Post Reply