Showing posts with label radius. Show all posts
Showing posts with label radius. Show all posts

Monday, August 28, 2017

Radius A Regular Polygon By Side And N



function Radius_A_Regular_Polygon_By_Side_And_N(A,N)= A/(2*sin/(180/N));

 

Thursday, August 10, 2017

Volume Of A Cone By Radius And Height



function Volume_Of_A_Cone_By_Radius_And_Height(r,h )= 
    PI*r*r*h*(1/3);
 

Saturday, July 29, 2017

Saturday, July 15, 2017

Radius A Regular Polygon By Inradius And N



function Radius_A_Regular_Polygon_By_Inradius_And_N(r,N)=r/(cos/(180/N));

 

Thursday, July 13, 2017

Radius Of Equilateral Triangle By Side



function Radius_Of_Equilateral_Triangle_By_Side (A)=A/(2*sin/(180/3));

Tuesday, July 11, 2017

Volume Of A Cylinder By Radius And Height



function Volume_Of_A_Cylinder_By_Radius_And_Height(r,h )= 
    PI*r*r*h;
 

Monday, July 10, 2017

Volume Of A Ellipsoid By Radius



function Volume_Of_A_Ellipsoid_By_Radius(r1,r2,r1 )=
    (4/3)*Pi* r1* r2* r3 ;
 

Sunday, July 9, 2017

Volume Of A Sphere By Radius



function Volume_Of_A_Sphere_By_Radius(r )=(4/3)*PI* r*r*r ;

Wednesday, July 5, 2017

Area Of A Regular Polygon By Inradius And N



function Area_Of_A_Regular_Polygon_By_Inradius_And_N(r,N)= 
    r*r*N*tan(180/n);
 

Saturday, July 1, 2017

Area Of A Cone By Radius And Height



function Area_Of_A_Cone_By_Radius_And_Height(r,h )= 
    PI*r*r+ PI*r*sqrt(r*r+h*h);
 

Friday, June 30, 2017

Area Of A Cylinder By Radius And Height



function Area_Of_A_Cylinder_By_Radius_And_Height(r,h )= 
    2*(PI*r*r)+ 2*PI*r*h;
 

Wednesday, June 28, 2017

Area Of A Ellipsoid By Radius

Approximation

function Area_Of_A_Ellipsoid_By_Radius(r1,r2,r3 )=  
    4 * PI * pow(((r1*1.6075*r2*1.6075 + r1*1.6075*r3*1.6075
    + r2*1.6075*r3*1.6075)/3),1/1.6075);
 

Tuesday, June 27, 2017

Friday, June 23, 2017

Area Of A Regular Polygon By Radius And N



function Area_Of_A_Regular_Polygon_By_Radius_And_N(r,N)=
    (r*r*N*sin(360/N))/2;

Wednesday, June 21, 2017

Great Circle / Concentric Small Circle By Two Lat Long Points

A great circle is any circle drawn on a  sphere with a center at the center of the sphere and thus the same radius.

function face_normal(point_a,point_b,point_c)=
let(u=point_a-point_b,v=point_a-point_c)
un([u[1]*v[2]-u[2]*v[1],u[2]*v[0]-
u[0]*v[2],u[0]*v[1]-u[1]*v[0]]);

function un(v)=v/max(norm(v),1e-64);

function look_at(p,o=[0,0,0],up=[0,0,1])=
let(
a=up,
b=p-o,
c=cross(a,b) ,
d=angle(a,b))
[d,c];

function angle (a,b)=
atan2(
sqrt((cross(a, b)*cross(a, b))), 
(a* b)  );

function rnd(a = 1, b = 0, s = []) =
s == [] ?
(rands(min(a, b), max(
a, b), 1)[0]) :
(rands(min(a, b), max(a, b), 1, s)[0]);

function Great_circle_axis(p1,p2,r)=
let(v1=face_normal([0,0,0],p1,p2))
v1;

module Great_circle(p1,p2,r){
v1=face_normal([0,0,0],p1,p2);
look_at(v1)torus(r,0.05);
}
module Concentric_small_circle(p1,p2,r,r2){
v1=face_normal([0,0,0],p1,p2);
look_at(v1)translate([0,0,sign(r2)*r*cos(90*(r2/r))])
torus(r*sin(90*(r2/r)),0.05);
}

module torus(r1,r2)
{rotate_extrude($fn=40)translate([r1,0,0])circle(r2,$fn=12);
}
module look_at(lookpoint,origin=[0,0,0],rotatefrom=[0,0,1]){
rotations=look_at(lookpoint,origin ,rotatefrom);
rotate(rotations[0],rotations[1]) children();
}
radius=5;
small_radius=radius*rnd();
#sphere(5,$fn=40);
lat1=rnd(-90,90);
long1=rnd(0,360);
lat2=rnd(-90,90);
long2=rnd(0,360);

p1= ([sin(long1),cos(long1)*sin(lat1),cos(lat1)])*radius;
p2= ([sin(long2),cos(long2)*sin(lat2),cos(lat2)])*radius;
echo(p1,p2);
translate(p1) sphere(0.3,$fn=40);
translate(p2) sphere(0.3,$fn=40);

Great_circle(p1,p2,radius);
Concentric_small_circle(p1,p2,radius,-small_radius);
Concentric_small_circle(p1,p2,radius,small_radius);


 

Area Of A Ellipse By Radius



function Area_Of_A_Ellipse_By_Radius(r1,r2)=r1*r2*PI;

Tuesday, June 20, 2017

Great-Circle Distance between two lat long positions

This formula doesn't count the flattening of the earth at the poles. 
The earth has been approximated to a sphere with a radius of 6378 km.
 


function Great_circle_distance(latA,longA,latB,longB) =   
acos ( 
sin (latA) * sin (latB) +
cos (latA) * cos (latB) * cos (longB - longA) 
)*111.195  ;//(6371/57.295779513)

echo (Great_circle_distance(48.8566, -2.3522,52.5200 , -13.4050) );
//INFERNAL ;)
echo (Great_circle_distance(0, 90, 0, 0) );
 
 

Area Of A Circle By Radius


function Area_Of_A_Circle_By_Radius(r)=r*r*PI;

Wednesday, June 14, 2017

Perimeter Of A Regular Polygon By Inradius And N



function Perimeter_Of_A_Regular_Polygon_By_Inradius_And_N(r,N)= 
  2*N*r*tan(180/N);


 

Tuesday, June 13, 2017

Perimeter Of A Regular Polygon By Radius And N



function Perimeter_Of_A_Regular_Polygon_By_Radius_And_N(r,N)= 
     2*N*r*sin(180/N);