Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by BajaSlap · Apr 21, 2015 at 10:10 PM · spaceorbitprogramellipse

Draw an ellipse given orbital elements

I am making a program which simulates the motion of a satellite around a massive body. I have a list of orbital elements as well as the satellites position and velocity vectors and would like to be able to draw out the circle/ellipse/parabola/hyperbola which represents the satellites orbit in 3 dimensions.

I have the following elements defined:

  • semi-major axis

  • eccentricity

  • semi-latus rectum

  • apoapsis

  • periapsis

  • inclination

  • longitude of ascending node

  • argument of periapsis

  • velocity vector

  • position vector

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlwaysSunny · Apr 21, 2015 at 10:10 PM 0
Share

You have them defined; in what form? As arrays of sequential points, for instance? That's what you'll ultimately need to draw lines.

What exactly do you need help with? Just drawing the lines? Or with collecting /calculating these data?

avatar image AlwaysSunny · Apr 21, 2015 at 10:13 PM 0
Share

Regarding drawing lines, http://www.everyday3d.com/blog/index.php/2010/03/15/3-ways-to-draw-3d-lines-in-unity3d/

I recommend the second of the three discussed methods, which involves realtime calculation of billboarded line segments and using Draw$$anonymous$$eshNow to limit overhead. All my lines are drawn using a similar method. It gives control over width, and you can use vertex colors (with a vertex color shader) to colorize the line segments individually.

avatar image BajaSlap · Apr 22, 2015 at 12:31 AM 0
Share

None of those elements are saved, but rather recalculated at each step depending on the satellites position and velocity vectors. Some values represent angles (arg of periapsis, longitude of ascending node, inclination) and others are just scalar representing distances.

All of these together describe an ellipse (orbit) in 3D space. I do not want to draw the ellipse as the ship travels, but rather draw the projected orbit it will be traveling on based off of these values.

avatar image AlwaysSunny · Apr 22, 2015 at 12:47 AM 1
Share

I'm not familiar enough with this branch of physics to suggest anything super useful about how you'll project your ellipse figure.

Established methods exist for achieving such predictions. Search "runge-kutta" and "rk4" within the context of predicting orbits, and take an in-depth look at $$anonymous$$epler's laws.

IIRC, only some of these data will be necessary, perhaps only the velocities and masses of the bodies. I seem to remember that orbit prediction is pretty darn simple, really, though what I learned was not in an academic or scientific context and thus total accuracy was not essential.

If you have enough knowns, you can always find your unknowns. You're after a collection of predicted future positions which you can use to draw the curve. The answer will involve a recursive algorithm whose iterations and timesteps deter$$anonymous$$e prediction fidelity.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Megaboy · Mar 21, 2016 at 12:57 PM

@BajaSlap if you still or anyone interested in this topic, I can help you with orbit vizualization, it's super easy. Just notify me : shinemylight@yandex.ru

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Raresh · Mar 21, 2016 at 12:59 PM 0
Share

Last seen: Apr 22, 2015 at 05:14 A$$anonymous$$

Did you even look at his activity before necroing an old thread?

avatar image Megaboy Raresh · Mar 21, 2016 at 01:05 PM 1
Share

just edited for anyone who interested

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Parametric Equation for Elliptical Orbit in Space 0 Answers

Can you download unity editor onto a USB device? 2 Answers

How to create a changing orbit from elliptical to planar and back? 0 Answers

Natural rotation of orbiting object 3 Answers

How can I make an efficient, yet accurate planetary orbit using Apoapsis and Periapsis distance from an object I am orbiting 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges