j0h

von_karman.scad

j0h
Mar 3rd, 2026
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.00 KB | None | 0 0
  1. // Cone Parameters
  2. length = 100;  
  3. radius = 20;      
  4. slices = 200;  
  5. $fn = 100;          
  6. module von_karman_cone(length=100, radius = 20) {
  7.     rotate_extrude()
  8.     polygon(points = concat(
  9.         [ [0, 0] ], // tip of axis
  10.         [ for (i = [0 : slices])
  11.             let (
  12.                 x = i / slices,
  13.                 z = x * length,
  14.                 r = radius * sqrt(x) * (1 - (1/3) * x)
  15.             )
  16.             [r, z]
  17.         ],
  18.         [ [0, length] ] // close axis at the top
  19.     ));
  20. }
  21.  
  22.  
  23. // Hull shape module
  24. module hullz(length = 1, w = 3, h = 1) {
  25.     radius = w / 2;
  26.  
  27.     rotate([90, 90, 0]) {
  28.         hull() {
  29.             translate([-length / 2, 0, 0])
  30.                 cylinder(h = h, r = radius, $fn = 32);
  31.             translate([length / 2, 0, 0])
  32.                 cylinder(h = h, r = radius, $fn = 32);
  33.         }
  34.     }
  35. }
  36.  
  37.  
  38. von_karman_cone();
  39. //hull as scafold
  40. rotate([0,0,90])translate([0,-10,87])
  41. hullz(20,6,20);
  42. translate([30,0,20])
  43. von_karman_cone(80,10);
Advertisement
Add Comment
Please, Sign In to add comment