bentway23 Posted January 19, 2020 Share Posted January 19, 2020 (edited) What I'm looking for is an object to follow an elliptical curve, accelerating near the perigee and decelerating near the apogee. Theoretically I could wrestle with magnet forces and do a sim for this, but I feel that (1) that'd be unnecessarily complicated, and (2) that this is going to be a collider for another sim, and that might muck it up. I've tried follow path and using primuv, but I have not been able to find a way to accelerate and decelerate them as they follow the curve. I've tried something, attached, that is MOSTLY working. I get velocities from the tangent normals of the orbit curve, and a velocity multiplier based on the min and max x positions along the curve, so at the perigee the velocity multiplier is 1 (or whatever), and at the apogee it's 0.1. Using a solver SOP, each frame I transfer the curvevel attribute to the ball orbiting object at its current location, and then use @P += @curvevel. This actually works for the most part, except the orbiting object keeps going further and further out, creating a spiral orbit. Furthermore, even though I have a wrangle setting its initial position to be at point 0 of the path curve, starts farther away.(Also, I will need to figure out a way to orient it so it's always looking forward, but that will be easy enough, methinks.) I assume I'm missing something obvious within the solver SOP. This might be easy and dumb, so thanks for any help. (Also, if there's just a way better way to do this, I'm open to suggestions!) orbit_setup.hiplc Edited January 20, 2020 by bentway23 Made subject more precise Quote Link to comment Share on other sites More sharing options...
Noobini Posted January 19, 2020 Share Posted January 19, 2020 what's wrong with the good ol' sin and cos ? adjust your shape with the magnitudes 10 and 6 in sin cos respectively vu_Orbit.hiplc 1 Quote Link to comment Share on other sites More sharing options...
bentway23 Posted January 20, 2020 Author Share Posted January 20, 2020 That gets the shape, but not the changes in velocity--what I'm looking for is the acceleration at the perigee and deceleration at the apogee. I tried basic trig early on, but couldn't translate that into varying velocities. Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted January 20, 2020 Share Posted January 20, 2020 (edited) Probably you want something like keplers second law. The speed is something like the length of the cross product of the Direction from ellipse point to a focus point and the Derivative (of the ellipse function). I've recently posted some examples using an inverted distribution function, which was defined by a density. Here is a modification of it. kepler.hipnc Edited January 20, 2020 by Aizatulin 1 Quote Link to comment Share on other sites More sharing options...
bentway23 Posted January 20, 2020 Author Share Posted January 20, 2020 This is fantastic--thanks for the pointers! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.