Water - color by velocity

About advanced scenes, and the Thyme scripting language used in Algodoo.

Water - color by velocity

Postby rpherman » Tue Dec 28, 2010 5:39 am

Is it possible to change the color of water particles over time? I'd like to show approximate velocities as water leaves a container through and orifice. Sort of a gross CFD visualization. It this possible? I see that a single drop of water has vector and velocity properities as copied from a droplet in my scene below:

};
Scene.addWater {
vecs := [[-2.0475216, -1.0904573]];
vels := [[-2.5077577e-005, 0.038016006]];
version := 1
}

Thanks,

Rob
rpherman
 
Posts: 2
Joined: Mon Dec 27, 2010 2:53 pm

Re: Water - color by velocity

Postby GamerBro4 » Tue Dec 28, 2010 8:16 pm

this forum isnt for asking
Image
User avatar
GamerBro4
 
Posts: 14
Joined: Tue Dec 28, 2010 8:07 pm

Re: Water - color by velocity

Postby ducky21 » Tue Dec 28, 2010 8:59 pm

well, you can't have indevdual colors of water. You could averadge it, but I don't know the script
User avatar
ducky21
 
Posts: 301
Joined: Tue Aug 03, 2010 8:58 pm

Re: Water - color by velocity

Postby Chronos » Wed Dec 29, 2010 2:25 am

ducky21 wrote:well, you can't have indevdual colors of water. You could averadge it, but I don't know the script

Yeah, that could be a problem. It's impossible to have one water drop a different color than the rest. Unless all the water is moving at the same speed, or you just have one drop, you'll need to average it.

GamerBro4 wrote:this forum isnt for asking

Yes it is. Stop flaunting your ignorance.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Water - color by velocity

Postby kilebantick » Wed Dec 29, 2010 12:50 pm

This forum is specifically for asking Thyme orientate questions.
Image
User avatar
kilebantick
 
Posts: 1267
Joined: Tue Sep 01, 2009 9:50 am

Re: Water - color by velocity

Postby Rideg » Wed Dec 29, 2010 7:25 pm

GamerBro4 wrote:this forum isnt for asking

No it's for getting knowledge by just looking at the screen with confusing thread. Answer the question or get out of here.

I, on the otherhand, have no answer. Since you can't get the velocity of the water with ease it nearly impossible to do it. I'm not going to say impossible 'cause I've seen miracles happen in this forum before.
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Water - color by velocity

Postby ducky21 » Wed Dec 29, 2010 10:57 pm

I don't think it is possible to change the color of water by variable or scripting. Is there a way?
User avatar
ducky21
 
Posts: 301
Joined: Tue Aug 03, 2010 8:58 pm

Re: Water - color by velocity

Postby Rideg » Thu Dec 30, 2010 12:29 am

Then you would need to know the exact velocity of the water, get that into a variable and have the waterColor to change by it's velocity. It can be done with objects, but I'm pretty sure it's impossible (for now) to get the same effect on water particles
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Water - color by velocity

Postby ducky21 » Thu Dec 30, 2010 1:01 am

well... If you had a stream of water, you could set two lasers up and have it so that it measures the time the first drop of water took between the two lasers and divide that by the distance, you get velocity. Use some scripting and make that into a variable and somehow decide what color it is.
User avatar
ducky21
 
Posts: 301
Joined: Tue Aug 03, 2010 8:58 pm

Re: Water - color by velocity

Postby Chronos » Thu Dec 30, 2010 2:20 am

Except the water will always have to be between the lasers and that wouldn't update in real time.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Water - color by velocity

Postby ducky21 » Thu Dec 30, 2010 2:22 am

No, but it's a start.
User avatar
ducky21
 
Posts: 301
Joined: Tue Aug 03, 2010 8:58 pm

Re: Water - color by velocity

Postby rpherman » Thu Dec 30, 2010 2:16 pm

Thanks for all of the responses. I am new to Algodoo, but not to physics or simulators. I love the playfulness, yet power of Algodoo.

In response to GamerBro4 and Kilebantik - I imagined it would be done with Thyme scripting, thereby the post in this forum.

I did notice the velocity updates in the information window when the simulation is running, so I figured there might be a way to pick an area in the tank, read the velocity and then change the water color for that particular area of water in that instance of time, but I see now that you can not change a sub-selection of water even though you can choose a sub-selection with the pan tool.

I also noticed in the information section kinetic energy - both linear and angular. Perhaps I can access that through Thyme?

Rob
rpherman
 
Posts: 2
Joined: Mon Dec 27, 2010 2:53 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest