[OpenSCAD] Curved Chain (tentacle) using a series of pill shapes - recursive function?
nop.head at gmail.com
Wed Oct 26 13:15:50 EDT 2016
I think you want a recursive module that draws one link, then translates to
the end and rotates a recursive call to itself.
On 26 October 2016 at 18:10, Benjamin Hill <benjaminhill at gmail.com> wrote:
> 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
> 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.
> OpenSCAD mailing list
> Discuss at lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Discuss