Another kirupalab submission

i’m working on a submission myself which i may or may not have ready tomorrow, i’m still working the kinks on it and deciding on how “configurable” it can be. also i’m trying to optimize it, but by the looks of it, i don’t think i can, but i’ll still work on it. anyway, here’s a sneak peak, be ready to hear your CPU yelp in pain as it uses 100% of it (warning):

http://filebox.vt.edu/users/mdimatul/swf/circles.html

(drag mouse to change perspectives)

Thats very cool thor… very cool :slight_smile:

yeah i like that. it was fun to watch, but then i got dizzy… :frowning:

:stuck_out_tongue:

:trout:

^ (no one uses the trout anymore… )

Hey thor - that is really nice :slight_smile:

Very nice :slight_smile: I like it when I have absolutely no idea what the hell is happening in an animation :stuck_out_tongue: Only problem is: the perspective “jumps” when I move the mouse without dragging and then press.

yeah, i knew about that problem from the beginning and i was debating on whether or not to fix that.

ok, i temporarily abandoned that little experiment i had above and went into programming fluid mechanics in flash. so far, all i have is one “line” of water that ripples away when you click at a certain area, like a drop in a vat of water. hopefully, i’ll be able to create a whole pool and simulate real ripples wherever the user clicks. anyway, here’s a sneak peak:

http://filebox.vt.edu/users/mdimatul/swf/ripples.html

click to simulate a ripple.
since the buttons are so close, you may have to click twice to get it going.

[update]
now all you have to do is click, i got rid of the on (release) action and put it directly in the on (press).
[/update]

ok, here’s what i’ve changed from the previous version:

  1. actually a pool now instead of just a line
  2. changed the color
  3. optimized some of my code (realized that i had a setInterval for an onEnterFrame function which was pretty stupid on my part)
  4. changed algorithm

the only problem now is that instead of being round, the ripples take on a more diamond-y shape, i’ll work on that next.

anyway, tell me what you think as well as any suggestions before i submit it to the lab:

http://filebox.vt.edu/users/mdimatul/swf/ripples.html

It’s cool and all, but it seriously bogs down my computer :-\ :frowning:

Then again, my comp sucks.

yeah, that’s a problem i’ve been trying to fix. i’m still optimizing some of the code so i’ll have this working smoothly on your computer or anybody else’s computer by today, latest tomorrow. if i have to, i’ll change the “density” of the water so that it runs smoothly on any computer.

Here’s something that came up during a"Challenge" at as.org. If you want to take a look :slight_smile: it’s pretty good:

//RIPPLES: EBEN ELIASON, MAY, 2003 (KINETIC-THOUGHT)
//Edited by pom

size = 210				//the size of the "pool" (multiples of 15)
amplitude = 40			//initial wavefront amplitude (0-100)
viscocity = .1			//determines how "thick" the fluid is (0-1)
elasticity = .5			//essentially determines freq of ripples (0-2)

//sets a time for each drop indicating when the wavefront from click will reach it
onMouseDown = function(){
        for(i = 1; i <= k; i++) with(_root["Drop"+i]){
                distance = ((dx = _x - _root._xmouse)*dx + (dy = _y - _root._ymouse)*dy)/10;
                ripples.push(getTimer() + distance);}}
for(i = 0; i < size; i+=15) for(j = 0; j < size; j+=15){
        Drop = this.createEmptyMovieClip("Drop"+(++k), k);
        Drop.lineStyle(30,0x002255,100);
        Drop.lineTo(.15,.45);
        Drop._x = Stage.width/2-size/2 + j;
        Drop._y = Stage.height/2-size/2 + i;
        Drop.ripples = new Array();
        Drop.col = new Color (Drop);
        Drop.onEnterFrame = function(){
                for(i = 0; i < this.ripples.length; i++){
                        if(getTimer() > this.ripples*){
                                this.ripples.splice(i, 1);
                                this._xscale -= amplitude;
                                this._yscale -= amplitude;}}
                this.Az = (100 - this._xscale)*(elasticity)
                this.Vz = (this.Vz + this.Az)*(1-viscocity)
                this._xscale = this._yscale += this.Vz
                dif = 100 - this._xscale
                var difO = {aa:50,rb:0,gb:0,bb:this.vc=100+1.5*dif};
                this.col.setTransform(difO);}}

can you provide a link to the actual page or fla? i’d like to see how efficient his is, cause mine’s not and it’s killing me. also, do you mind testing this to see how slow it might run?

http://filebox.vt.edu/users/mdimatul/swf/ripples.html

Can’t do, it seems that my host has had a heart-attack. And I’m on a P200 right now, so… :hangover:

WOAH THAT’S AWESOME ILYAS!!! (even if you didn’t create it, thanks for sharing it).

Thor: It is 100% AS, it uses the drawing API so you don’t really need a .fla, just copy and paste the code to a frame in a new document and your set. It runs super smooth on my comp.

the code doesn’t seem complete though…

[edit]
nevermind, didn’t see the closing curly brackets at the end :stuck_out_tongue:
[/edit]

Lost >> Thanks :stuck_out_tongue: I’ll tell him (although he re-edited my code and I don’t like the outcome so much :evil: )

T >> Is it me or you’re really changing name, subtitle, location, # of posts, style every day? And how in the world did you get this effect in your subtitle??

So many questions…

Ilyas: :slight_smile:

Also… yeah thor changes his name, subtitle, location and style all the time, he’s crazy!!! :slight_smile:

You can do that all from the mod panel. Go to the mod panel, search for your name, choose edit user, and you will now be able to change your name (changes for login as well), and use HTML code in your title and location area. You can even embed a .swf file in your title area like dan did :stuck_out_tongue: It works with pretty much anything, images, titles, text stuff, it rocks.

You will have to be sure to check the “force title” option before changing it in the panel before the HTML code will be accepted.

yeah, i like to see what fits me the best so i try everything. i think i like this name for now, so i’ll probably stick with it for some time. and that effect in my title is simply a flash movie, à la dan.