Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Particle, Problem Implimenting Gravity/Wind
Author Message
Kuntzy

Posted: Mon Jan 19, 2004 10:39 pm   Post subject: Particle, Problem Implimenting Gravity/Wind

This is just a basic paricle engine, The controls are move the mouse and click down to start the wind. The velocity and angle of the wind will be determined by the postion of the mouse.

The problem is that when I put in a large number of particles, or the velocity of the x or y is fairly large, you cane see a distinct square grid/pattern. Does anyone know where the problem is?

gravity_particle.t
Description:
 Here it is:

Filename:  gravity_particle.t
Filesize:  2.61 KB

Tony

Posted: Mon Jan 19, 2004 10:45 pm   Post subject: (No subject)

the problem is that you move particles by pixels... so when the "wind" causes particles to move at the rate of 5 pixels per frame, they "jump" that distance...

what you need to do is to keep movement to a 1pixel/frame max. That would result in subpixel movement per frame, so you'd have to round to render your particle system
Tony's programming blog. DWITE - a programming contest.
AsianSensation

Posted: Mon Jan 19, 2004 10:49 pm   Post subject: (No subject)

i'm thinking that it's your wind velocity. you move the particles by that much each time, and wind velocity is a set value. Maybe if you have smaller wind velocity or something, or make it real numbers and round later, i don't know, something like that.

Edit: damn tony, beat me to it, oh well, at least I will be the first to award the guys some bits, here Kuntzy, have 30 bits
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 3 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: