[OpenSCAD] Curved Chain (tentacle) using a series of pill shapes - recursive function?

Benjamin Hill benjaminhill at gmail.com
Wed Oct 26 13:10:06 EDT 2016


I'm trying to create an octopus tentacle, but am running into
roadblocks and would love suggestions.

I'm thinking about it like creating a chain of "capsules" (cylinders
with hemisphere ends) - I can create a single link of the chain, and I
can call that function in a loop, and I can even scale the chain links
through the loop, but that system doesn't work when I try to curve the
chain.

I'm wondering if a recursive function would help?  Something like
"draw link from origin, move to other side of the link, scale down
slightly, rotate slightly (this is the part that gets me), recurse"

See image for what I mean.

When I rotate slightly, that means the next link's "other end" isn't a
simple offset, but involves math of the current rotation.  Is there a
way to do it internally to the recursion so I don't have to calculate
it myself?  This would also enable all sorts of neat fractal things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2016-10-26 at 10.07.08 AM.png
Type: image/png
Size: 28373 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20161026/8e1f34a7/attachment.png>


More information about the Discuss mailing list