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