[OpenSCAD] Ovals

Revar Desmera revarbat at gmail.com
Tue Sep 4 16:41:10 EDT 2018



> On Sep 4, 2018, at 8:44 AM, jsc <jsc at alum.mit.edu> wrote:
> 
> On the subject of rocket nosecones, I created an OpenSCAD model some time ago
> to generate Haack series shapes:
> 
> https://www.thingiverse.com/thing:804129
> 
> These shapes are calculated to minimize drag in supersonic flows, so not
> something that is functionally useful for model rockets. Still, I thought it
> might be of interest.
> 
> Some work would need to be done to make it suitable for fitting to a rocket.
> 

Of course I only see this post AFTER I wrote my own.  :)
Well, I might as well post it:


pi = 3.1415926536;

function haack(x, L, R, C) = let(
        h = acos(1-(2*x/L))
    ) (R/sqrt(pi)) * sqrt(h*pi/180 - sin(2*h)/2 + C*pow(sin(h),3));

function haack_series(L, R, C, steps) = [ 
        for(i = [0:steps]) let(x = i*L/steps) [x, haack(x, L, R, C)] 
    ];  

// L is the length of the nosecone.
// R is the radius of the nosecone base.
// C should be 0 for a Von-Kármán ogive.
// steps is the granularity of the shape along the length.
module haack_nosecone(L, R, C=0, steps=100) {
    pts=concat(
        haack_series(L, R, C, steps),
        [[L, R], [L, 0], [0, 0]] 
    );  
    translate([0,0,L]) {
        rotate_extrude(angle=360, convexity=2) {
            rotate([0,0,-90]) polygon(points=pts);
        }   
    }   
}   

haack_nosecone(L=80, R=50, C=0);




- Revar


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180904/73da9d08/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.png
Type: image/png
Size: 81088 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180904/73da9d08/attachment.png>


More information about the Discuss mailing list