summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2024-05-10 13:34:09 -0400
committersotech117 <michael_foiani@brown.edu>2024-05-10 13:34:09 -0400
commit63d2e9cbf4508d5118c654e81ea4da33763dc73f (patch)
tree95f7fbb6838c9b3cba31d0f39783614b2149a6a3 /src
parent9a9bb1a85de1eddb993efa635a59c693c37ec32f (diff)
jess updated
Diffstat (limited to 'src')
-rw-r--r--src/particlesystem.cpp10
-rw-r--r--src/particlesystem.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/particlesystem.cpp b/src/particlesystem.cpp
index 65d61ac..3e94862 100644
--- a/src/particlesystem.cpp
+++ b/src/particlesystem.cpp
@@ -45,10 +45,10 @@ Eigen::Vector3f particlesystem::getRandomInitialVel(){
}
Eigen::Vector3f getInitVel(OceanSpray s){
- float x = getRandomInRange(0,1);
- float y = getRandomInRange(0.1, .9);
+ float x = getRandomInRange(.6,4);
+ float y = getRandomInRange(0.5, 1.5);
Eigen::Vector3f v = Eigen::Vector3f(s.slope_vector[0], y, s.slope_vector[1]) + Eigen::Vector3f(x,0,0);
- return v*10.f;
+ return v*300.f;
//p.vel[1] = 0.1;
@@ -107,9 +107,9 @@ void particlesystem::update(double deltaTime){
// if particle is still alive, update pos
if (p.life >= 0.f){
- float r = getRandomInRange(.5, 1.6f);
+ float r = getRandomInRange(30, 80.f);
p.vel += gravity*dt*r;
- p.pos += p.vel * dt * 10.f;
+ p.pos += p.vel * dt;
// p.vel[1] -= (p.vel.dot(p.vel) / 2 + gravity[0]) * dt;
// p.pos += p.vel * dt * 10.f;
}
diff --git a/src/particlesystem.h b/src/particlesystem.h
index 608e229..26cb3f4 100644
--- a/src/particlesystem.h
+++ b/src/particlesystem.h
@@ -57,7 +57,7 @@ private:
- float d = 2.f;
+ float d = 50.f;
std::vector<float> m_vertices = {
-d, d, 0,1,
-d, -d, 0, 0,