Orbiter-Forum Drawing orbits in 2D using html ellipse element
 Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

 Math & Physics Mathematical and physical problems of space flight and astronomy.

 11-02-2018, 11:08 AM #1 Marijn Orbinaut Drawing orbits in 2D using html ellipse element For a graphical representation of an orbit in 2D, I'd like to use the html SVG ellipse element. I am trying to achieve the same result as http://www.asterank.com/ (in the left pane). Perhaps someone has already figured this out and could help me with this. The example below is the (simplified) html for asteroid Ryugu. I am trying to calculate the numbers for drawing the ellipse based on the orbital elements as displayed below the diagram on the Asterank home page. The semi-major axis, a, is given. The semi-minor axis b can be calculated using e. These numbers need to be multiplied by 50 (pixels) in order to get the values as in the example below. W is used for the first param of the transform function. So I am close. But I do not understand how cy is calculated. Also, I need to fit the inclination in somehow. Can anybody help me to complete this calculation? svg width="300" height="170" ellipse rx="58.39395781893142" ry="59.48004109924875" cx="150" cy="86.31463562865277" transform="rotate(211.4258497031505, 150, 75)"
 11-05-2018, 09:58 AM #2 Marijn Orbinaut Ok, I found the answer. In case anyone is interested: cy = eccentricity * semi-major axis * 50 + 75 50 is a scale factor (50px = 1AU) and 75 is the center of the y coordinate. Completing the example for Ryugu: cy = 1.189545600425906 * 0.1902257533711703 * 50 + 75 = 86.314
 Thanked by:

 Posting Rules BB code is On Smilies are On [IMG] code is On HTML code is Off You may not post new threads You may not post replies You may not post attachments You may not edit your posts
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Orbiter-Forum.com     Announcements     Meets & Greets Orbiter Space Flight Simulator     Orbiter Web Forum         OFMM         Orbiter Forum Space Station         Simpit Forum     General Questions & Help     MFD Questions & Help     Hardware & Software Help     Tutorials & Challenges     Orbiter SDK     Orbiter Visualization Project     Orbiter Beta » Orbiter Project Orbiter Addons     OrbitHangar Addons & Comments     Addons     Addon Development     Addon Requests     Addon Support & Bugs         Addon Developer Forums             Project Apollo - NASSP     Orbiter Lua Scripting Far Side of the Moon     Spaceflight News     Math & Physics     Astronomy & the Night Sky     Backyard Rocketry     Brighton Lounge     International Forum

All times are GMT. The time now is 06:04 AM.