You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From #123, the duck displaced area doesn't look correct. It also deviates from getDisplacedVolume:
/** * Returns the cumulative displaced volume of this object up to a given y level. * * Assumes step information was updated. */publicgetDisplacedArea(liquidLevel: number ): number {if(liquidLevel<this.stepBottom||liquidLevel>this.stepTop){return0;}else{// const ratio = ( liquidLevel - this.stepBottom ) / ( this.stepTop - this.stepBottom );return0.1;// 4 * pi * a * c * ( t - t^2 )}}
The text was updated successfully, but these errors were encountered:
@samreid and I looked into the Duck's volume and area displacement, and saw that it behaved linearlly, and we didn't like that. So we modelled the duck after the Ellipsoid and now it re-uses that implementation.
If we ever decide to actually model the duck's volume and cross sectional area, we'd have to go a longer route with the 3d model. It'd take about 2 or 3 days fully thinking about this.
@zepumph and I saw this code near the bottom of Duck.ts:
/** * Returns the volume of a duck with the given axis-aligned bounding box. */privatestaticgetVolume(size: Bounds3): number {// Hard coded normalized volume obtained from Blenderreturn0.5*size.width*size.height*size.depth;}
So it seems some parts are still treating the duck as a cuboid instead of ellipsoid. Should this part be updated to act more like an ellipsoid?
From #123, the duck displaced area doesn't look correct. It also deviates from getDisplacedVolume:
The text was updated successfully, but these errors were encountered: