Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 how to calculate radius of a point in an ellipse

views
     
TSnarf03
post Jan 7 2019, 04:13 AM, updated 6y ago

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


I need help in producing a formula

Lets say i have an ellipse(a fat circle), center at origin(0,0)

I have 3 parameters, height, width of the ellipse, and a degree(from the origin), i need to calculate the distance of that point to origin.

how to do that ?

ormano
post Jan 7 2019, 05:39 AM

New Member
*
Junior Member
49 posts

Joined: May 2007
From: GombaK


hi bro.. me not to good in math, but u may try this 1..

http://www.csgnetwork.com/circumellipse.html

good luck chuck.. =).
WongGei
post Jan 7 2019, 02:58 PM

Regular
******
Senior Member
1,206 posts

Joined: Dec 2007
From: Kuala Lumpur
https://www.mathsisfun.com/geometry/index.html
Eventless
post Jan 7 2019, 06:43 PM

Look at all my stars!!
*******
Senior Member
2,641 posts

Joined: Jan 2003
You need to find the value of x when the line originating from the origin intersects with the ellipse.

The formula for the line part will be based on trigonometry(y1). The angle between the line and the x axis is used here.

Whereas the ellipse part would be based on the ellipse equation(y2). The intersection of the 2 axis will used be here. That can be derived from the given height and width of the ellipse. It appears that the equation changes depending on whether you have a wide ellipse(x>y) or a tall ellipse(y>x).

At the point where the line and ellipse intersects, y1=y2. This should allow you get the value or formula for x.

Use trigonometry to find the radius(hypotenuse) based on x and the angle of the line.
Mr.Robert
post Jan 12 2019, 09:47 PM

Getting Started
**
Junior Member
235 posts

Joined: Sep 2012
Use distance formula lah.

Did something very similar recently. smile.gif
TSnarf03
post Jan 12 2019, 10:19 PM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


QUOTE(Mr.Robert @ Jan 12 2019, 09:47 PM)
Use distance formula lah.

Did something very similar recently.  smile.gif
*
Talk is cheap, tell me the answer for an ellipse of 5 width 3 height center at origin, and tell me the length or the line intercept at 45 degree (any direction)
mentalhealth.my
post Jan 13 2019, 07:29 PM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
QUOTE(narf03 @ Jan 12 2019, 10:19 PM)
Talk is cheap, tell me the answer for an ellipse of 5  width 3 height center at origin, and tell me the length or the line intercept at 45 degree (any direction)
*
I found it on the Internet, more complex than I thought.

QUOTE
The polar form of the equation for an ellipse with "horizontal" semi-axis a and "vertical" semi-axis b is

Attached Image

Here, θ represents the angle measured from the horizontal axis (30.5∘ in your case), and r is the distance from the center to the point in question (the radius you seek).

https://math.stackexchange.com/questions/43...g-its-semi-majo
TSnarf03
post Jan 13 2019, 10:40 PM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


QUOTE(mentalhealth.my @ Jan 13 2019, 07:29 PM)
I found it on the Internet, more complex than I thought.
https://math.stackexchange.com/questions/43...g-its-semi-majo
*
holy shit, you found the formula, i have been working on it since a week ago, will try to apply and see if it works, thanks!
TSnarf03
post Jan 14 2019, 03:14 AM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


thats a very complex formula, whats sin or cos power of 2 ?
mentalhealth.my
post Jan 14 2019, 03:49 AM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
QUOTE(narf03 @ Jan 14 2019, 03:14 AM)
thats a very complex formula, whats sin or cos power of 2 ?
*
http://tpcg.io/NP0AvY

(Executable Online)

CODE
Program Radius_Ellipse;

const
Width_Horiz=5;
Height_Vert=3;
Angle=0;

var
Radius:real;
Semi_Width:real;
Semi_Height:real;

begin
Semi_Width:=Width_Horiz/2;
Semi_Height:=Height_Vert/2;
Radius:=(Semi_Width*Semi_Height)/(Sqrt(((Exp(2*(Ln(Semi_Width))))*((1/2)-((1/2)*Cos(2*Angle))))+((Exp(2*(Ln(Semi_Height))))*((1/2)+((1/2)*Cos(2*Angle))))));
WriteLn('Radius=', Radius);
end.


I am not 100% sure about the code.....

Below is the same code, but more neat:
CODE

Program Radius_Ellipse;

const
 Width_Horiz=5;
 Height_Vert=3;
 Angle=1;
 
var
 r:real;
 a:real;
 b:real;
 u,d1l,d2l,d1r,d2r:real;
 
begin
 a:=Width_Horiz/2;
 b:=Height_Vert/2;
 u:=a*b;
 d1l:=Exp(2*Ln(a));
 d2l:=Exp(2*Ln(b));
 d1r:=(1-Cos(2*Angle))/2;
 d2r:=(1+Cos(2*Angle))/2;
 r:=u/sqrt((d1l*d1r)+(d2l*d2r));
 
 WriteLn('a=',a);
 WriteLn('b=',b);
 WriteLn('Angle=',Angle);
 WriteLn('r=', r);
end.


QUOTE
tell me the answer for an ellipse of 5  width 3 height center at origin, and tell me the length or the line intercept at 45 degree (any direction)


Radius= 1.6530658880966482E+000

You can refer to http://www.analyzemath.com/trigonometry/tr...c_formulas.html for 17. Power Reducing Formula.

This post has been edited by mentalhealth.my: Jan 14 2019, 05:15 AM
mentalhealth.my
post Jan 14 2019, 04:42 AM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
I think either the formula is wrong or my code is wrong.

Emmm.....


I use another formula, but the result is same.....
https://www.quora.com/How-do-I-find-the-rad...gle-to-its-axis

Formula is on Wikipedia: https://en.wikipedia.org/wiki/Ellipse#Polar...ative_to_center

Attached Image

This post has been edited by mentalhealth.my: Jan 14 2019, 05:47 AM
mentalhealth.my
post Jan 14 2019, 05:17 AM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
QUOTE(narf03 @ Jan 14 2019, 03:14 AM)
thats a very complex formula, whats sin or cos power of 2 ?
*
Attached Image
TSnarf03
post Jan 15 2019, 07:25 AM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


just verified the formula, it worked, cannot directly apply the angle, need to multiply by 2π/360
Eventless
post Jan 15 2019, 07:50 AM

Look at all my stars!!
*******
Senior Member
2,641 posts

Joined: Jan 2003
QUOTE(narf03 @ Jan 15 2019, 07:25 AM)
just verified the formula, it worked, cannot directly apply the angle, need to multiply by 2π/360
*
Isn't that how you convert degrees to radians? Trigonometry functions(tan,sin,cos) sometimes use those instead of degrees. Best to check the reference for the functions.
https://en.wikipedia.org/wiki/Radian#Radian_to_degree_conversion_derivation
TSnarf03
post Jan 15 2019, 03:49 PM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


QUOTE(Eventless @ Jan 15 2019, 07:50 AM)
Isn't that how you convert degrees to radians? Trigonometry functions(tan,sin,cos) sometimes use those instead of degrees. Best to check the reference for the functions.
https://en.wikipedia.org/wiki/Radian#Radian_to_degree_conversion_derivation
*
Don't know that until I apply many values into that previous formula and noticed the limit is 0 to like 2 pi then I recall something like that in school.
mentalhealth.my
post Jan 15 2019, 11:06 PM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
QUOTE(narf03 @ Jan 15 2019, 07:25 AM)
just verified the formula, it worked, cannot directly apply the angle, need to multiply by 2π/360
*
Learnt something new today. Thank you.

My add.math almost failed in SPM......
mentalhealth.my
post Jan 15 2019, 11:07 PM

Getting Started
**
Validating
147 posts

Joined: Sep 2015
QUOTE(Eventless @ Jan 15 2019, 07:50 AM)
Isn't that how you convert degrees to radians? Trigonometry functions(tan,sin,cos) sometimes use those instead of degrees. Best to check the reference for the functions.
https://en.wikipedia.org/wiki/Radian#Radian_to_degree_conversion_derivation
*
I didn't know that. But it is never too late to learn something new. Thank you, too.

 

Change to:
| Lo-Fi Version
0.0130sec    0.31    6 queries    GZIP Disabled
Time is now: 29th March 2024 - 01:19 PM