hi am i a qbasic newbe<br>and i wounder how to do (if you can do) efx on graphics<br>like blur in a line and stuff like that?<br>any other help on fraphics are welcome<br><br>
Hi<br> You need to add up the colors of the surrounding pixels and average it out.<br>So you'd do something like <br>PSET(x,y),(POINT(x,y)+POINT(x+1,y)+POINT(x-1,y)+POINT(x,y-1)+POINT(x,y+1))\5<br>for each pixel on the line, after you enter graphics mode.<br><br>If you want to see some cool demo effects, come to <A HREF="
hey this code is neat itll make a random image<br>then turn it into a plasma like image enjoy <br><---code starts here---><br>SCREEN 13<br>FOR x = 1 TO 101<br>FOR y = 1 TO 101<br>PSET (x, y), RND * 255<br>NEXT<br>NEXT<br>DO<br>FOR y = 1 TO 101<br> FOR x = 1 TO 101<br> c = (POINT(x - 1, y) + POINT(x + 1, y) + POINT(x, y - 1) + POINT(x, y + 1) + POINT(x, y) + POINT(x, y) + POINT(x + 1, y + 1) + POINT(x - 1, y + 1) + POINT(x + 1, y - 1) + POINT(x - 1, y - 1)) / 10<br> IF c < 1 THEN c = 1<br> PSET (x, y), c<br> NEXT x<br>NEXT y<br>e = e + 1<br>LOOP UNTIL e = 10<br><---code ends here--->
might try smoothing the display a little with a couple GET and PUT statements. The output is a little smoother in the early stages.<br><br>Insert these lines at the top:<br>DIM yLn(1600)<br>DIM xLn(1600)<br><br>Insert these after the PSET command:<br>x2 = 101 - x<br>GET (x, 1)-(x, 101), xLn<br>PUT (x2, 1), xLn, PSET<br><br>And insert these after the NEXT x:<br>y2 = 101 - y<br>GET (1, y)-(101, y), yLn<br>PUT (1, y2), yLn, PSET<br><br>This is what it looks like:<br><img src=
Oh, PPS:<br>If you place a RANDOMIZE TIMER command after the SCREEN command you will end up with a different image every time.<br><br>I like this discussion. It stimulates growth.<br> <p> <br><a href=mailto: > </a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.