Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStormSimulation Pin
sonyama10-Apr-07 4:41
sonyama10-Apr-07 4:41 
QuestionRe: StormSimulation Pin
Rajesh R Subramanian10-Apr-07 6:43
professionalRajesh R Subramanian10-Apr-07 6:43 
AnswerRe: StormSimulation Pin
Mark Salsbery10-Apr-07 7:20
Mark Salsbery10-Apr-07 7:20 
JokeRe: StormSimulation Pin
toxcct10-Apr-07 7:56
toxcct10-Apr-07 7:56 
GeneralRe: StormSimulation Pin
Mark Salsbery10-Apr-07 8:11
Mark Salsbery10-Apr-07 8:11 
GeneralRe: StormSimulation Pin
sonyama10-Apr-07 15:54
sonyama10-Apr-07 15:54 
GeneralRe: StormSimulation Pin
Mark Salsbery11-Apr-07 6:26
Mark Salsbery11-Apr-07 6:26 
AnswerRe: StormSimulation Pin
Dustin Henry10-Apr-07 8:45
Dustin Henry10-Apr-07 8:45 
It has been a while since I have done this, so I can only give you a brief overview of the concept. You basically need to create a vertex shader to modify the verticies of a triangle mesh. The most obvious method to modify the verticies, is to scale their Y position based on a sin wave generated from an origin point.
Below is a code snippet used to calculate the scale:
fTime = ((fFrameTimeElapsed + fPhase) * FREQUENCY)
fScale = sin(fTime * (2*PI)) * APMLITUDE + BASE;

The phase was calculated based on the vector dot product of the position of the current vertex and the polygon normal along the vertical plane.

The actual wave can be modified by changing the amplitude and frequency, but you're not exactly going to get crashing waves with an undertoe simulation.

If you think this is along the lines that could get you started, I can send you my old source code for this written in C using OpenGL, however I didn't comment it very well, so you may be even more confused once you get it.

Dustin
GeneralRe: StormSimulation [modified] Pin
Rick York10-Apr-07 10:13
mveRick York10-Apr-07 10:13 
GeneralRe: StormSimulation Pin
Dustin Henry10-Apr-07 11:28
Dustin Henry10-Apr-07 11:28 
Questionshellexecuteex Pin
deeps_cute10-Apr-07 4:16
deeps_cute10-Apr-07 4:16 
AnswerRe: shellexecuteex Pin
Roger Stoltz10-Apr-07 4:37
Roger Stoltz10-Apr-07 4:37 
GeneralRe: shellexecuteex [modified] pls help me its urgent Pin
deeps_cute10-Apr-07 4:43
deeps_cute10-Apr-07 4:43 
QuestionRe: shellexecuteex [modified] pls help me its urgent Pin
David Crow10-Apr-07 5:09
David Crow10-Apr-07 5:09 
AnswerRe: shellexecuteex [modified] pls help me its urgent Pin
deeps_cute10-Apr-07 5:11
deeps_cute10-Apr-07 5:11 
GeneralRe: shellexecuteex [modified] pls help me its urgent Pin
Roger Stoltz10-Apr-07 5:27
Roger Stoltz10-Apr-07 5:27 
GeneralRe: shellexecuteex [modified] pls help me its urgent Pin
deeps_cute10-Apr-07 17:31
deeps_cute10-Apr-07 17:31 
GeneralRe: shellexecuteex [modified] pls help me its urgent Pin
Roger Stoltz10-Apr-07 21:01
Roger Stoltz10-Apr-07 21:01 
QuestionPlease assist : Unresolved extenal errors Pin
Wamuti10-Apr-07 3:37
Wamuti10-Apr-07 3:37 
AnswerRe: Please assist : Unresolved extenal errors Pin
Iain Clarke, Warrior Programmer10-Apr-07 3:43
Iain Clarke, Warrior Programmer10-Apr-07 3:43 
Questiongetting username from windows service in VC++.Net2005 Pin
anumadhu10-Apr-07 3:33
anumadhu10-Apr-07 3:33 
QuestionHow to program about Remote Desktop Client Pin
onlysaint10-Apr-07 3:28
onlysaint10-Apr-07 3:28 
AnswerRe: How to program about Remote Desktop Client Pin
David Crow10-Apr-07 3:33
David Crow10-Apr-07 3:33 
GeneralRe: How to program about Remote Desktop Client Pin
Mark Salsbery10-Apr-07 7:23
Mark Salsbery10-Apr-07 7:23 
QuestionRe: How to program about Remote Desktop Client Pin
David Crow10-Apr-07 7:37
David Crow10-Apr-07 7:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.