Created
February 28, 2017 15:40
-
-
Save cshaa/d10a3eced8bc0605f94bc4ad44a461b8 to your computer and use it in GitHub Desktop.
This computes the radius of a LV Haack nose cone at each point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function LVHaack(n){ | |
| n=+n; | |
| with(Math){ | |
| return sqrt( 1/PI * ( acos(1-n/12) - 0.5*sin(2*acos(1-n/12)) + (1/3)*pow(sin(acos(1-n/12)),3) ) ) | |
| } | |
| } | |
| /* For LD Haack change `(1/3)*pow` to `0*pow`, | |
| for tangent Haack change it to `(2/3)*pow` */ | |
| for(var i=0; i<=24; i++){ | |
| console.log( LVHaack(i).toFixed(4) ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment