Re: Animating Sinewave Distortion on Any Image

Jeremy Landry <[email protected]> Wed, 7 Mar 2018 19:34:23 -0800
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland
Message-ID <CAMYa41kV5MXRLU7s7gTnmpX3S5JNL080Ec=6V4JnZWW4ja=4JA@mail.gmail.com>
--===============2835516504992690863==
Content-Type: multipart/alternative; boundary="94eb2c19ddc01953220566de5a68"

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

https://www.youtube.com/watch?v=3Ds2R4OCArQGI&feature=3Dyoutu.be here's a q=
uick
video showing it in action.

If you wait till end, you can see how to interlace multiple sinewave
distortions.  :)

On Wed, Mar 7, 2018 at 7:22 PM, Jeremy Landry <[email protected]> wrote:

> 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 i=
s
> 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?u=
sp=3Ddrive_web>
> =E2=80=8B
>

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

<div dir=3D"ltr"><a href=3D"https://www.youtube.com/watch?v=3Ds2R4OCArQGI&a=
mp;feature=3Dyoutu.be">https://www.youtube.com/watch?v=3Ds2R4OCArQGI&amp;fe=
ature=3Dyoutu.be</a> here&#39;s a quick video showing it in action.<br><div=
><br></div><div>If you wait till end, you can see how to interlace multiple=
 sinewave distortions.=C2=A0 :)</div></div><div class=3D"gmail_extra"><br><=
div class=3D"gmail_quote">On Wed, Mar 7, 2018 at 7:22 PM, Jeremy Landry <sp=
an dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">h=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr">Attached is a simple project which you can play with to crea=
te sinewave distortions on any image.=C2=A0=C2=A0<div><br></div><div>A flap=
 contains more info and more than just the pulled out values will make sign=
ificant changes to the effect.=C2=A0 While it&#39;s not ideal to use this i=
nside 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 an=
d memory (since nothing is calculated in realtime if it&#39;s just playing =
back an animation).=C2=A0=C2=A0</div><div><br></div><div>However, even as u=
noptimized as it is, it still runs at 15-30 FPS as it is now on an intel At=
om dual core ate 1.2Ghz (which effectively means it&#39;s running at 600mhz=
 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 effect =
is still cool to look at and fun to apply to various kinds of graphics to a=
chieve 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 slic=
es and change the demo script to affect Y origin instead of X origin.</div>=
<div><br></div><div>Or if you&#39;re just lazy, rotate the entire holder pl=
ayfield sideways and that works too.=C2=A0 :p</div><div><br></div><div>Enjo=
y...this will be included along with samples of where this is useful and ho=
w 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!=C2=A0 :)</di=
v><div><br></div><div>=E2=80=8B<br><div class=3D"gmail_chip gmail_drive_chi=
p" style=3D"width:396px;height:18px;max-height:18px;background-color:#f5f5f=
5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bo=
ld;font-size:13px;border:1px solid #ddd;line-height:1"><a href=3D"https://d=
rive.google.com/file/d/1RFxllpBQnaxwyTcPl4fc2n4j4_5zgL7f/view?usp=3Ddrive_w=
eb" style=3D"display:inline-block;overflow:hidden;text-overflow:ellipsis;wh=
ite-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100=
%" target=3D"_blank"><img style=3D"vertical-align:bottom;border:none" src=
=3D"https://drive-thirdparty.googleusercontent.com/16/type/application/x-zi=
p">=C2=A0<span dir=3D"ltr" style=3D"color:#15c;text-decoration:none;vertica=
l-align:bottom">RASTER FX 01.003.pr</span></a></div>=E2=80=8B<br></div></di=
v>
</blockquote></div><br></div>

--94eb2c19ddc01953220566de5a68--

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

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc3F1ZWFrbGFu
ZCBtYWlsaW5nIGxpc3QKc3F1ZWFrbGFuZEBsaXN0cy5zcXVlYWtsYW5kLm9yZwpodHRwOi8vbGlz
dHMuc3F1ZWFrbGFuZC5vcmcvbWFpbG1hbi9saXN0aW5mby9zcXVlYWtsYW5kCg==

--===============2835516504992690863==--