Made a few of my own for initial implementation of base and capital. Your samples and several google results will be used to create a collection for selection.
Having too much fun… almost. Bit of a drag, no real interest in script but do have an update - V 0.8 - ready to use and comment from any and all that are willing to try. Do need to provide some “views” of results, I think this is better than just “OK”; see first post for general info and usage.
Never thought I’d have to explain how to see the parameter settings - yep, in toolbar. If you don’t have it displayed use “t” to show toolbar and the options will appear below “Object Tools” when added (last operator).
Now I’m struggling… sadly I am not a mathematician, and not quite able to properly create a “flute”. Have made several interesting results, but not the desired outcome.
Input is: DepthOfFlute-offset from radius for flute; FACETS- number of faces for flute; radius-offset from current 3D cursor, angle-position along “radial curve” to start flute.
Got tired of “trial-and-error”, thinking I just don’t know what I’m doing (not a mathematician), hoping someone else might know how to “fix”.
Please ignore obvious misuse of “stepD” for all calculations; was trying to simplify for discussion purposes.
To clarify - what I want to do is… create a flute (sub-curve along a radius).
Pseudo code is:
From starting point, create curve, offset depth to radius, to end point.
Based on: radius, (starting at) angle (along radius); create curve, using steps (number of sub-curve edges), using offset depth, to target (end point along radius).
I have a circle, have determined a point along the perimeter to include a sub-curve (inner or outer). Should probably just calculate new center (point between start and end along curve) and generate sub-curve but trying to do so using “starting point” (not center); as noted by code.
Finally worked out how to do (mostly) what I was trying to do. Updated my wiki (and original post) with notes. Following is code I finally wound up with to accomplish “sub-curve” along radius for flutes:
newpoints = []
if sides < 2: sides = 2 # min number of sides.
halfSides = sides/2 # common value efficiency variable.
stepD = Ad/halfSides # in and out depth variation per side.
divSides = 0
curStep = 1
while curStep <= halfSides:
divSides += curStep*curStep
curStep+=1
stepCurve = target/(divSides*2) # logorithmic delta along radius for sides.
curStep = 0
t = angle
# curvature in
while curStep < halfSides:
t = t + (curStep*curStep*stepCurve)
x1 = (radius - (stepD * (curStep+1))) * cos(t)
y1 = (radius - (stepD * (curStep+1))) * sin(t)
newpoints.append([x1, y1, zpos])
curStep+=1
# curvature out - includes mid-point...
while curStep:
t = t + (curStep*curStep*stepCurve)
x1 = (radius - (stepD * curStep)) * cos(t)
y1 = (radius - (stepD * curStep)) * sin(t)
newpoints.append([x1, y1, zpos])
curStep-=1
return newpoints