diff --git a/chapters/02_forces.html b/chapters/02_forces.html index d6871785..c35cba69 100644 --- a/chapters/02_forces.html +++ b/chapters/02_forces.html @@ -769,7 +769,7 @@

2.8 Air and Fluid Resistance

\rho is the Greek letter rho, and refers to the density of the liquid, something we don’t need to worry about. We can simplify the problem and consider this to have a constant value of 1.

  • -

    v refers to the speed of the object moving. OK, we’ve got this one! The object’s speed is the magnitude of the velocity vector: velocity.magnitude(). And v^2 just means v squared or v \times v.

    +

    v refers to the speed of the object moving. OK, we’ve got this one! The object’s speed is the magnitude of the velocity vector: velocity.mag(). And v^2 just means v squared or v \times v.

  • A refers to the frontal area of the object that is pushing through the liquid (or gas). An aerodynamic Lamborghini, for example, will experience less air resistance than a boxy Volvo. Nevertheless, for a basic simulation, we can consider our object to be spherical and ignore this element.

    diff --git a/chapters/05_physicslib.html b/chapters/05_physicslib.html index 554d416e..748c40e5 100644 --- a/chapters/05_physicslib.html +++ b/chapters/05_physicslib.html @@ -2331,7 +2331,7 @@

    Vectors with toxiclibs

     Vec2D a = new Vec2D(1,-1);
    -float m = a.magnitude();
    +float m = a.mag();
     a.normalize();
     
    diff --git a/noc_html/processingjs/chapter04/flight404/flight404_particles_2_GLtexture/particle.pde b/noc_html/processingjs/chapter04/flight404/flight404_particles_2_GLtexture/particle.pde index 53cbf839..12cb2a64 100644 --- a/noc_html/processingjs/chapter04/flight404/flight404_particles_2_GLtexture/particle.pde +++ b/noc_html/processingjs/chapter04/flight404/flight404_particles_2_GLtexture/particle.pde @@ -78,7 +78,7 @@ class Particle{ // if the particle is moving fast enough, when it hits the ground it can // split into a bunch of smaller particles. if( ISBOUNCING ){ - bounceVel = vel.magnitude(); + bounceVel = vel.mag(); vel.scaleSelf( .7 ); vel.y *= -( ( radius/40.0 ) * .5 ); diff --git a/noc_html/processingjs/chapter04/flight404/flight404_particles_2_simple/particle.pde b/noc_html/processingjs/chapter04/flight404/flight404_particles_2_simple/particle.pde index 893d3631..1db801f4 100644 --- a/noc_html/processingjs/chapter04/flight404/flight404_particles_2_simple/particle.pde +++ b/noc_html/processingjs/chapter04/flight404/flight404_particles_2_simple/particle.pde @@ -78,7 +78,7 @@ class Particle{ // if the particle is moving fast enough, when it hits the ground it can // split into a bunch of smaller particles. if( ISBOUNCING ){ - bounceVel = vel.magnitude(); + bounceVel = vel.mag(); vel.scaleSelf( .7 ); vel.y *= -( ( radius/40.0 ) * .5 );