ox := (-min_x) * (maxx / (max_x - min_x))
oy := (-min_y) * (maxy / (max_y - min_y))
var x := min_x
procedure graphfunction (aj : function func (x, y : real) : real, f : real, c : int)
var slope : real
x := min_x - 400
ft := true
var counter : int := 0
loop
counter := counter + 1
x += delta
y := aj (x, f)
exit when x >= max_x + 400
ax := ((x * ((maxx / (max_x - min_x)))) + (ox))
ay := (y * (maxy / (max_y - min_y))) + (oy) %round (max_y * (maxy / (max_y - min_y)))
if not ft then
drawline (round (ax), round (ay), round (px), round (py), c)
if ((counter * delta) mod 10) = 0 then
drawline (round (ax), round (ay), round (ax + (- (py - ay) * (1500 / delta))), round (ay + ((px - ax) * (1500 / delta))), c)
drawline (round (ax), round (ay), round (ax + ((py - ay) * (1500 / delta))), round (ay + (- (px - ax) * (1500 / delta))), 155 - c)
end if
else
ft := false
end if
px := ax
py := ay
end loop
end graphfunction
color (white)
colorback (black)
cls
var xi : real := ox
var yi : real := oy
var r : real := 1
loop
r += .01
graphfunction (lunch, r, round ((r * 10) mod 155))
View.Update
cls
end loop
Sponsor Sponsor
andrew.
Posted: Tue Mar 09, 2010 10:24 pm Post subject: RE:Some visual effect
That's pretty cool, I wish I could make it my screen saver. But doesn't this fall under the "omfg sooo trippy cool flashes!" category?
copthesaint
Posted: Tue Mar 09, 2010 11:25 pm Post subject: Re: Some visual effect
[quote = Mazer]Honestly! It clearly didn't take much effort for you to make, are you so impressed with yourself that you feel the urge to share it with the rest of us?
Trust me when I say this: the same program has been posted many times in countless yet ultimately pointless variations.
Please, when thinking of submitting a program, first perform the following check:
1) Run the program
2) Stare at the run window for at least 2 minutes
3) After this time, if you still think you'd ever want to watch that again, then post it (so long as it abides by any other rules)
I may add more to this at a later date. [/quote]
andrew. wrote:
That's pretty cool, I wish I could make it my screen saver. But doesn't this fall under the "omfg sooo trippy cool flashes!" category?
I would Say so, I looked this effect and it was an eye sore after 30 seconds
Zren
Posted: Wed Mar 10, 2010 12:48 am Post subject: RE:Some visual effect
I had to add a delay and view.update after every line to figure out how it worked. And I love the effect when it goes crazy (crazy sine wave). Cool idea.
DemonWasp
Posted: Wed Mar 10, 2010 12:52 am Post subject: RE:Some visual effect
@cop: I disagree. I watched it for well over 2 minutes and I'm considering forwarding this (link) to my programmer friends.
Turing_Gamer
Posted: Wed Mar 10, 2010 8:26 am Post subject: RE:Some visual effect
Very nice, but isn't making Turing files a screen saver burn the monitor or something?
imjdubz2
Posted: Wed Mar 10, 2010 11:18 am Post subject: RE:Some visual effect
i get frame rate probs, i think its the program.
other than that the programs prettttttyyyyy
Homer_simpson
Posted: Wed Mar 10, 2010 11:44 am Post subject: Re: Some visual effect
@andrew and @copthesaint : Ouch..
maybe it would've been less hated if i called it Catacaustics effect(it isn't) or something fancy like that. i just figured if it entertained me for a bit it may entertain someone else as well, didn't mean to anger anyone..
on a different note you can try different mathematical functions for different effects eg.
Quote:
function lunch (x, y : real) : real
%result 400 * sind (x / (sin (y) * 10)) + (sin (4 * y + 1) * 1800 * sind (x / 5 + 80))
result (x / (10 / y)) ** 2
/*if x = 0 then
result 1000000
else
result y * 50000 / (x )
end if*/
end lunch
View.Set ("offscreenonly")
var delta := 1
var min_x, min_y, max_x, max_y, y, ax, ay, px, py, ox, oy, dy, dx : real
var ft := true
ox := (-min_x) * (maxx / (max_x - min_x))
oy := (-min_y) * (maxy / (max_y - min_y))
var x := min_x
procedure graphfunction (aj : function func (x, y : real) : real, f : real, c : int)
var slope : real
x := min_x - 400
ft := true
var counter : int := 0
loop
counter := counter + 1
x += delta
y := aj (x, f)
exit when x >= max_x + 400
ax := ((x * ((maxx / (max_x - min_x)))) + (ox))
ay := (y * (maxy / (max_y - min_y))) + (oy) %round (max_y * (maxy / (max_y - min_y)))
if not ft then
drawline (round (ax), round (ay), round (px), round (py), c)
if ((counter * delta) mod 10) = 0 then
drawline (round (ax), round (ay), round (ax + (- (py - ay) * (1500 / delta))), round (ay + ((px - ax) * (1500 / delta))), c)
drawline (round (ax), round (ay), round (ax + ((py - ay) * (1500 / delta))), round (ay + (- (px - ax) * (1500 / delta))), 155 - c)
end if
else
ft := false
end if
px := ax
py := ay
end loop
end graphfunction
color (white)
colorback (black)
cls
var xi : real := ox
var yi : real := oy
var r : real := 1
loop
r += .01
graphfunction (lunch, r, round ((r * 10) mod 155))
View.Update
delay (10)
cls
end loop
@turing gamer: I highly doubt it..
Sponsor Sponsor
Turing_Gamer
Posted: Wed Mar 10, 2010 12:05 pm Post subject: RE:Some visual effect
I dunno, it was some other section of the forum where it said that.
DemonWasp
Posted: Wed Mar 10, 2010 3:15 pm Post subject: RE:Some visual effect
No. The original reason for screensavers is because of an effect called "burn-in" that occurs in CRT monitors, which were used almost exclusively until about 10 years ago. The problem is that if the CRT displays the same image for too long, the phosphors in the screen are actually permanently changed, leaving a "ghost" of that image. Because people have a bad habit of walking away from their computers without turning off the screens, the screensaver is designed to automatically start after a few minutes of inactivity.
The screensaver works by making the screen display a constantly-changing set of images, preventing any particular image from burning into the screen.
Although some modern screen types still suffer from burn-in (notably not LCDs), screensavers are largely aesthetic now.
A Turing "screensaver", if properly constructed so that the whole image changes, shouldn't damage your screen. If, however, only part of the image changes while other parts do not (for example, if the window area changes but the title bar at the top does not, then the title bar could burn in.
rdrake
Posted: Wed Mar 10, 2010 3:57 pm Post subject: Re: RE:Some visual effect
DemonWasp @ Wed Mar 10, 2010 3:15 pm wrote:
No. The original reason for screensavers is because of an effect called "burn-in" that occurs in CRT monitors, which were used almost exclusively until about 10 years ago. The problem is that if the CRT displays the same image for too long, the phosphors in the screen are actually permanently changed, leaving a "ghost" of that image. Because people have a bad habit of walking away from their computers without turning off the screens, the screensaver is designed to automatically start after a few minutes of inactivity.
The screensaver works by making the screen display a constantly-changing set of images, preventing any particular image from burning into the screen.
Although some modern screen types still suffer from burn-in (notably not LCDs), screensavers are largely aesthetic now.
A Turing "screensaver", if properly constructed so that the whole image changes, shouldn't damage your screen. If, however, only part of the image changes while other parts do not (for example, if the window area changes but the title bar at the top does not, then the title bar could burn in.
QFT.
Homer_simpson
Posted: Wed Mar 10, 2010 4:51 pm Post subject: Re: Some visual effect
here's a coupla functions to try:
result ((x / (10 / (1 * sin (12 * y)))) ** 3) * sin (5 * y)
result ((x / (20 / (10 * sin (6 * y)))) ** 2) * sin (5 * y)
result 1100* sin (x/100)*sin(20*y)
result 500 * sin (x / 100) + 1000 * sin ((x + (800 * y)) / 120)
chrisbrown
Posted: Wed Mar 10, 2010 5:24 pm Post subject: RE:Some visual effect
You could add each function to an array of functions, and cycle through each after some number of iterations.
andrew.
Posted: Wed Mar 10, 2010 5:42 pm Post subject: Re: Some visual effect
Homer_simpson @ Wed Mar 10, 2010 11:44 am wrote:
@andrew and @copthesaint : Ouch..
Oh, I didn't mean it like that. I thought it was great, and I watched it for a while, but I just thought it would categorize under that.
copthesaint
Posted: Wed Mar 10, 2010 7:33 pm Post subject: RE:Some visual effect
Hmm, There should be a section for turing fractile images or other anmated images, I never said it wasnt cool, but It still hurt my eyes :p