Raised This Month: $32 Target: $400
 8% 

Wind movement effect - Algorithm


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 11-22-2014 , 15:51   Wind movement effect - Algorithm
Reply With Quote #1

I'm making a Kinect app for a shop and I need a wind effect algorithm. I did some attempts but the result didn't look like real wind.

Does anyone here know from where I can take some code as a startup? Or at least the algorithm logic.

This is the app:
Spoiler


As you can see, it's only an image background with multiple small images. What I need is to move those small images as if there were affected by wind.

I have the speed and the angle of the wind as a line programatically.

The red line represents the wind direction.
Spoiler


So I will have to move near images as if there were afected by wind.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 11-23-2014 , 13:58   Re: Wind movement effect - Algorithm
Reply With Quote #2

Show me the code, need to know how you did it and then i'll edit it.
.Dare Devil. is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 11-24-2014 , 00:23   Re: Wind movement effect - Algorithm
Reply With Quote #3

PHP Code:
double distancia Math.Sqrt(Math.Pow(posX posInicialMano[manoID].X2) + Math.Pow(posY posInicialMano[manoID].Y2));
vientoActivado[manoID] = (distancia 100);
if (
vientoActivado[manoID]) {
    
// this is where I draw the red line that I showed in the screen
    
Line line = new Line();
    
line.Stroke Brushes.Red;
    
line.X1 posX;
    
line.Y1 posY;
    
line.X2 posInicialMano[manoID].X;
    
line.Y2 posInicialMano[manoID].Y;
    
ventanaIco.Children.Add(line);
}
if (
timeMano[manoID] + 40 <= timeCounter.TotalMilliseconds) {
    
timeMano[manoID] = timeCounter.TotalMilliseconds;
    
posInicialMano[manoID] = new Point(posXposY);

__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode