I am a bit surprised that I cannot find an option to specify the scale and twist parameter for the linear_extrusion() function as functions themselves. But only as scalars or vectors. That is quite a serious limitation. Which surprises me considering the mathematical approach OpenSCAD takes on modelling.
Did I miss something?
Currently I have to use a loop as a workaround. It creates 1000 solids of the same shape that are extruded slightly and twisted and scaled different for each iteration. This works, creates a usable surface in the preview. But rendering hangs, also SDL export, and I can only assume that is due to the number of solids I create?
Is there any other workaround or alternative?
I found an implementation of linear_extrude_fs() and linear_extrude_ft() trying to implement this, but internally the same workaround is used. Plus it is an "ugly" solution, since due to compiler resolution I'd have to modify that module directly for each modification of shape or parameter.
You can find more examples in this page: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion
Happy hacking!