
scripts.ripple.jfl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of demo Show documentation
Show all versions of demo Show documentation
Small apps to demonstrate use of JAI-tools components
The newest version!
/*
* Copyright 2009 Michael Bedward
*
* This file is part of jai-tools.
* jai-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
* jai-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with jai-tools. If not, see .
*
*/
/*
* This script creates concentric, sinusoidal ripples emanating
* from the image centre
*
* Author: Michael Bedward
*/
xc = width() / 2;
yc = height() / 2;
dx = (x()-xc)/xc;
dy = (y()-yc)/yc;
d = sqrt(dx^2 + dy^2);
result = sin(8 * PI * d);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy