.
Magic Motion
CAUTION: this script and variations of it can lock up some PCs and have been known to corrupt some PC users' WebTV viewers. I recommend that any pages created with this script be .htaccess for MSNTV IPs only. THE SCRIPT
NOTES:
-
Start with reference position. I have used 272 pixels of left offset and 185 pixels of top offset. This centers the animation on the WebTV screen.
- Define parameters.
n = part of your number for the radius.
- r++ increases value of r by 1 each repeat.
r-- will subtract 1 with each repeat.
- You can use sin or cos trig functions .. if both are the same and all other numbers are the same, you will make a spiral. I do not recommend the use of tangent, cotangent, secant or cosecant trig functions.
- The % number controls 'tightness' on turns. Bigger number makes the outer turns group more closely.
- You can get all sorts of shapes and patterns by adjusting any of the numbers and changing the trig functions. If you start with large n and r, use -r*Math.sin(n/#); and let it work its way in..
- The last line contains your stopping point and the speed control. In this example, as long as n is less than or equal to 4096 the script repeats itself every 20 milliseconds.
jawjahboy.com ] [
Games ] [
HOME