Closed matthew-blackman closed 1 year ago
@matthew-blackman and I went over this today. In general things are great! I am so happy with how this has been improving. I recommended 2 further potential improvements to look into.
this.getNextDataPoint( previousDataPoint, dt)
. I think you could argue that all three of these should behave the same way in terms of how we calculate the "next" point, though it seems like the apex is getting extra fudging logic at this time. If this was the case, then the step function is just (simplification) 1. calculate the right DT to start, 2. handle apex if needed, 3. create data point 4. add data point.dragForceForVelocity
.Trajectory step function is looking great and working well from what I can see. Closing this issue.
The Trajectory step function is about 300 lines long and includes some handling of edge casses (https://github.com/phetsims/projectile-motion/issues/286). We should review and consider modularizing the physics in this algorithm, including the handling of discrete calculation issues before republishing Projectile Motion.