d13 Posted January 3, 2018 Share Posted January 3, 2018 Hi Everyone! Can anyone suggest an efficient way to dynamically draw an ellipse that represents the orbit of a rotating planet? I've tried a few different things but so far they've all been too performance heavy. First, I added simple spheres trailing each planet that acted as orbit trace markers. That works, but is way too slow. Second, I tried creating a tube to represent the orbit by capturing an array of planet positions, and then using Path3D and getCurve to create a tube. That also works, but is again too slow. However, something like this *might* be fast enough: 1. Capture the planet's positions at point A and point B. 2. Use those two points to extrapolate an ellipse. 3. Draw the ellipse. Does that make sense, and, if so, does anyone know how to do that? Thanks!! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 3, 2018 Share Posted January 3, 2018 You can clearly rely on a torus to simulate your ellipse (based on the computation you mentioned) Quote Link to comment Share on other sites More sharing options...
d13 Posted January 5, 2018 Author Share Posted January 5, 2018 Hi Everyone, I've been trying to use dashed lines to create planet orbit lines in this Playground: http://www.babylonjs-playground.com/#35LJSZ#2 It works for a while, and then stops. Does anyone know what the problem might be? Thanks! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 5, 2018 Share Posted January 5, 2018 too may points. wait one second.http://www.babylonjs-playground.com/#35LJSZ#4 I think its capped at 400. NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
d13 Posted January 5, 2018 Author Share Posted January 5, 2018 @Pryme8 That's awesome, thanks so much!!! 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.