# Curved Chain (tentacle) using a series of pill shapes - recursive function?

7 messages
Open this post in threaded view
|

## Curved Chain (tentacle) using a series of pill shapes - recursive function?

Open this post in threaded view
|

## Re: Curved Chain (tentacle) using a series of pill shapes - recursive function?

Open this post in threaded view
|

## Re: Curved Chain (tentacle) using a series of pill shapes - recursive function?

Open this post in threaded view
|

## Re: Curved Chain (tentacle) using a series of pill shapes - recursive function?

 That was excellent advice, thank you! ```\$fn=50; BASE_HEIGHT = 1; // Angle (curl), Radius (thickness), Height (length) chain_dna = [ [ 15, .9, 1 ], [ 15, .8, 1 ], [ 15, .7, 1 ], [ -15, .6, 1 ], [ -15, .5, 1 ], [-15, .4, .8], [-15, .38, .6 ], [-30, .35, .4], [-30, .33, .4], [-30, .3, .4], [-30, .28, .4], [-30, .26, .4] ]; module chainlink(dna, idx = 0) { if (idx +1 < len(dna)) { angle = dna[idx][0]; radius = dna[idx][1]; height = dna[idx][2]; difference() { union() { sphere(r = radius); next_radius = idx+1 < len(dna) ? dna[idx+1][1] : dna[idx][1]; cylinder(r1 = radius, r2 = next_radius, h = BASE_HEIGHT * height); /* translate([0,0,BASE_HEIGHT * height]) sphere(r = next_radius); */ } translate([-radius,radius/2,-radius]) cube([radius*2, radius, height+(2*radius)]); } translate([0, 0, BASE_HEIGHT * height]) rotate([angle,0,0]) chainlink(dna, idx + 1); } } union() { // Call the module to create the stacked cylinders. chainlink(chain_dna); } ```
Open this post in threaded view
|

## Re: Curved Chain (tentacle) using a series of pill shapes - recursive function?

 A tail/tentacle design (if controlled by parallel cables) needs to be as untwistable as possible for it to work. So solutions with ball joints that allow twisting degrees of freedom will cause your tail/tentacle to become twisted and non-linear to control. Ideally you're looking for universal style joints between nodes alternating up with down. This way the cables remain in the same orientation as they are manipulated. E.g.      - http://hackaday.com/2016/10/21/two-stage-tentacle-mechanisms-part-iii-putting-it-all-together/     - https://www.youtube.com/watch?v=8NQH2B-MnvgSee second video for a commercial toy I can't find in the marketplace. (Clic something maybe?) But its a good guide for what to make. Must keep the rigidity up but the weight down. It gets very heavy very fast as you add nodes. Please let us know how you get on... _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org