Right Wing Wacko
Well-Known Member
- Joined
- Apr 8, 2012
- Messages
- 193
- Reaction score
- 0
I am trying to model a HAACK / Von Kármán nose cone using OpenSCAD and the formulas I find published here and on Wikipedia.
Below is what I've come up with but the numbers I'm getting do not even come close to making sense.
Where did I screw up?
Below is what I've come up with but the numbers I'm getting do not even come close to making sense.
Where did I screw up?
Code:
function pi()=3.14159265358979323846;
module HAACK(L=5, R=1, C=0) {
for ( x=[0:1:L] ) {
theta = acos(1-(2*x)/L);
y = R * sqrt( theta - (sin(2 * theta) / 2) + (C * pow(sin(theta),3)) ) / sqrt( pi() );
translate([0,0,x]) cylinder(r=y, h=1);
echo( x," ",y);
}
}
HAACK( L=1000, R=98, C=0);