我前段时间制作过太阳系动画,现在我正在重写它。我将重力效应添加到质量中,为了使效果可见,我将背景变成了网格。
我将添加两种不同的效果;捏和旋转。我正在关注Geek Office Dog: Hello swirl! (A swirl effect tutorial in javascript)上的教程。一步一步走,首先,我想了解旋转的工作原理。
这是网站的简单轮播演示摘录:jsFiddle。代码对我来说似乎很混乱,所以我修改并简化了它:jsFiddle。
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
var img = new Image();
img.src = document.getElementById("test-image").src;
img.onload = function () {
context.drawImage(img, 0, 0);
originalImageData = context.getImageData(0, 0, canvas.width, canvas.height);
originalPixels = originalImageData.data;
transformedImageData = context.createImageData(originalImageData);
transformedPixels = transformedImageData.data;
originX = 100;
originY = 100;
radius = 50;
// copying the original pixels into transformed pixels
for (var y = 0; y < originalImageData.height; y++) {
for (var x = 0; x < originalImageData.width; x++) {
var position = (y * originalImageData.width + x) * 4;
transformedPixels[position + 0] = originalPixels[position + 0];
transformedPixels[position + 1] = originalPixels[position + 1];
transformedPixels[position + 2] = originalPixels[position + 2];
transformedPixels[position + 3] = originalPixels[position + 3];
}
}
// Iterate over the interest square region
for (var y = -radius; y < radius; y++) {
for (var x = -radius; x < radius; x++) {
// Check if the pixel is inside the effect circle
if (x * x + y * y <= radius * radius) {
// Get the pixel array position
var sourcePosition = (y + originY) * originalImageData.width + x + originX;
sourcePosition *= 4;
// Transform the pixel cartesian coordinates (x, y) to polar coordinates (r, angle)
var r = Math.sqrt(x * x + y * y);
var angle = Math.atan2(y, x);
// convert the angle from radian to degree
var degrees = (angle * 180.0) / Math.PI;
// rotate the pixels
degrees -= 30.0;
// Transform back from polar coordinates to cartesian
angle = (degrees * Math.PI) / 180.0;
var newY = Math.floor(r * Math.sin(angle));
var newX = Math.floor(r * Math.cos(angle));
// Get the new pixel location
var destPosition = (newY + originY) * originalImageData.width + newX + originX;
destPosition *= 4;
transformedPixels[destPosition + 0] = originalPixels[sourcePosition + 0];
transformedPixels[destPosition + 1] = originalPixels[sourcePosition + 1];
transformedPixels[destPosition + 2] = originalPixels[sourcePosition + 2];
transformedPixels[destPosition + 3] = originalPixels[sourcePosition + 3];
}
}
}
context.putImageData(transformedImageData, 0, 0);
};
<table>
<tr>
<td>image</td>
<td>image</td>
<td>canvas</td>
</tr>
<tr>
<td><img id="test-image" border="1" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOMAAADVCAYAAAClrUf8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAlxAAAJcQGGdv4rAAAAB3RJTUUH3QEEBQAWImlsDAAAIABJREFUeNrtfXdcFOf2/rO7lAUEpElTsNBEBRUV1MRy7Rp7x6gxlms0RpMYU0wx0aj3pnrVWKPERBNbYu+xojRBAQEVLIiAIEX6UnbP7w+/M79ddhd2YbZA5vl85rO7M7PvvFOeOec97ykCIiLw4MHD4BDyl4AHD56MPHjw4MnIgwdPRh48ePBk5MGDJyMPHjx4MvLgwZORBw8ePBl58ODJyIMHD56MzR+//fYbnJ2dcfDgQf5iNFMIeN9U48f9+/cRFBSE0tJS2NraIi4uDu3bt+cvDC8ZeXCBsLAwjB49GgkJCXXuV1lZiSlTpqC0tBT29vYoKirCtGnTUF1dXef/7t27hwkTJmDTpk38xW4qIB4GgZeXFwEgkUhEy5Yto6KiIpX7LVq0iACQt7c3ZWdnk6+vLwGgd999V+X+ZWVl9PHHH5OZmRkBIEdHR/5iNxHwZDQA8vLyCACZm5uTiYkJASBXV1fau3evwn6HDh1i97t16xYRESUmJpKFhQUBoGPHjins/+eff1KbNm0IAJmYmJC5uTkBoNTUVP6i82TkoQonT54kADR8+HC6c+cO9e/fnwAQABowYAAlJSXRo0ePyNbWlgDQ5s2bFf6/c+dOAkD29vaUkZFBqampNGzYMLaNfv36UWJiIo0YMYIA0J49e/iLzpORhyp8/vnnBIC++OILdt2+ffvI1dWVAJCpqSl5enoSAJo4caLKNmbOnEkAqEOHDqwEbNWqlQLxVq9eTQDorbfe4i86T0YeqjBkyBACQKdPn1ZYX1J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YVMeHAjGVu2bKletRMK4evry2YV11UVsYaqqUxOJk3O2eBkZB7y2mRsiK/q5cuX2Rsnk8nQq1cvrSRrdXW1Sm+PFi1a8JLRgGNGe3v7Ovf19/dHfHw8AgMDdRa/KE9GbaWkpvsbhWQUCoVK6d4rKiq0IpJYLEb//v3Z3zk5OVqruNXV1SpfArxkNKxk1PZ2pi8AAAEzSURBVISMulRRa/dfk2kTZl7a0tJSYyOkURhwVA24y8vLtcoSVztrdEMcxOsiIy8Z9SsZ5VFf3KIxkvHFixf1qthGR8bS0lKVMWcVFRVaqQNcRGtUVVVBIpEoHZcno/4lo7z7YX3jNX9/fzg7O6Nnz55GQUYiYslY34vE6NRUVWQsLy+HUCjUWDpeunSp0V4XDAklEgksLCx4NVVHD3NCQgK+/vprSKVS1NTUoKamRun7hQsX2P137dqFa9euKaRTYe4XEUEqlcLBwQELFy5U2IfLJSYmRkGbi4qKgkQiQUVFBSoqKhS+FxUVsS+QJkXGsrIyPH/+HNOmTUNJSQm7pKSkGCzvTEVFhRIZecnIHRmjo6PrzD1aG6dPn1abP1UeXHlc1Ye4uDiEhIRotK82aur/A9lfDMIFlyVnAAAAAElFTkSuQmCC"></td>
<td><img id="image-area" border="1" src="http://i1115.photobucket.com/albums/k544/akinuri/download%201.png"></td>
<td><canvas id="canvas" style="border: 1px solid blue" width="227" height="213"></canvas></td>
</tr>
</table>
我不理解// Iterate over the interest square region
部分。为什么它在-radius
和radius
之间循环,以及x * x + y * y <= radius * radius
究竟是如何检查像素是否在圆圈内?
我无法想象在我脑海中那部分代码中发生了什么。爱好。
更新:好的,所以在考虑之后,我在想循环:
// Iterate over the interest square region
for (var y = -radius; y < radius; y++) {
for (var x = -radius; x < radius; x++) {
// Check if the pixel is inside the effect circle
if (x * x + y * y <= radius * radius) {
我们实际上并没有迭代图像上的区域,而是理论区域。
并检查当前(x,y)是否在圆圈内。如果是,在下一行代码中,我们计算图像上(x,y)的实际位置:
// Get the pixel array position
var sourcePosition = (y + originY) * originalImageData.width + x + originX;
sourcePosition *= 4;
循环(+ if)只是给出圆内每个像素的坐标,然后我们将这些(x,y)坐标移动(originX,originY)值,这样我们就可以得到图像上的实际坐标。
我说错了吗?我呢? (原谅我的兴奋:):