Animating Sinewave Distortion on Any Image

Jeremy Landry <[email protected]> Wed, 7 Mar 2018 19:22:59 -0800
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <CAMYa41=1Jpsjbd1mrgjC23jQiC+N1otx0yGP57GuT6v1dK_=1A@mail.gmail.com>
--===============1982020287874053794==
Content-Type: multipart/alternative; boundary="001a1149c73a4d46d30566de31ce"

--001a1149c73a4d46d30566de31ce
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Attached is a simple project which you can play with to create sinewave
distortions on any image.

A flap contains more info and more than just the pulled out values will
make significant changes to the effect.  While it's not ideal to use this
inside of a project, it is perfectly suitable for creating some
pre-rendered animation frames to use later that end up using infinitely
less CPU and and memory (since nothing is calculated in realtime if it's
just playing back an animation).

However, even as unoptimized as it is, it still runs at 15-30 FPS as it is
now on an intel Atom dual core ate 1.2Ghz (which effectively means it's
running at 600mhz on a RISC processor and no GPU assistance from what I
understand of the VM).

After all these years, this effect is still cool to look at and fun to
apply to various kinds of graphics to achieve interesting results when
combined.

For fun, you can change the MAKE SCANLINES script to make vertical slices
and change the demo script to affect Y origin instead of X origin.

Or if you're just lazy, rotate the entire holder playfield sideways and
that works too.  :p

Enjoy...this will be included along with samples of where this is useful
and how fast it runs after rendered (instead of running real time as a
prototype) in Etoys Club 1 to be coming out...um...when I can finish it!  :=
)

=E2=80=8B
 RASTER FX 01.003.pr
<https://drive.google.com/file/d/1RFxllpBQnaxwyTcPl4fc2n4j4_5zgL7f/view?usp=
=3Ddrive_web>
=E2=80=8B

--001a1149c73a4d46d30566de31ce
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Attached is a simple project which you can play with to cr=
eate sinewave distortions on any image.=C2=A0=C2=A0<div><br></div><div>A fl=
ap contains more info and more than just the pulled out values will make si=
gnificant changes to the effect.=C2=A0 While it&#39;s not ideal to use this=
 inside of a project, it is perfectly suitable for creating some pre-render=
ed animation frames to use later that end up using infinitely less CPU and =
and memory (since nothing is calculated in realtime if it&#39;s just playin=
g back an animation).=C2=A0=C2=A0</div><div><br></div><div>However, even as=
 unoptimized as it is, it still runs at 15-30 FPS as it is now on an intel =
Atom dual core ate 1.2Ghz (which effectively means it&#39;s running at 600m=
hz on a RISC processor and no GPU assistance from what I understand of the =
VM).=C2=A0=C2=A0</div><div><br></div><div>After all these years, this effec=
t is still cool to look at and fun to apply to various kinds of graphics to=
 achieve interesting results when combined.=C2=A0=C2=A0</div><div><br></div=
><div>For fun, you can change the MAKE SCANLINES script to make vertical sl=
ices and change the demo script to affect Y origin instead of X origin.</di=
v><div><br></div><div>Or if you&#39;re just lazy, rotate the entire holder =
playfield sideways and that works too.=C2=A0 :p</div><div><br></div><div>En=
joy...this will be included along with samples of where this is useful and =
how fast it runs after rendered (instead of running real time as a prototyp=
e) in Etoys Club 1 to be coming out...um...when I can finish it!=C2=A0 :)</=
div><div><br></div><div>=E2=80=8B<br><div class=3D"gmail_chip gmail_drive_c=
hip" style=3D"width:396px;height:18px;max-height:18px;background-color:#f5f=
5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:=
bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href=3D"https:/=
/drive.google.com/file/d/1RFxllpBQnaxwyTcPl4fc2n4j4_5zgL7f/view?usp=3Ddrive=
_web" target=3D"_blank" style=3D"display:inline-block;overflow:hidden;text-=
overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;b=
order:none;width:100%"><img style=3D"vertical-align: bottom; border: none;"=
 src=3D"https://drive-thirdparty.googleusercontent.com/16/type/application/=
x-zip">=C2=A0<span dir=3D"ltr" style=3D"color:#15c;text-decoration:none;ver=
tical-align:bottom">RASTER FX 01.003.pr</span></a></div>=E2=80=8B<br></div>=
</div>

--001a1149c73a4d46d30566de31ce--

--===============1982020287874053794==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc3F1ZWFrbGFu
ZCBtYWlsaW5nIGxpc3QKc3F1ZWFrbGFuZEBsaXN0cy5zcXVlYWtsYW5kLm9yZwpodHRwOi8vbGlz
dHMuc3F1ZWFrbGFuZC5vcmcvbWFpbG1hbi9saXN0aW5mby9zcXVlYWtsYW5kCg==

--===============1982020287874053794==--