Step one, download "gregs-large.stl" from https://www.thingiverse.com/thing:6713/files and convert it into OBJ format and read it into AngelCAD, and "melt" it
AngelCAD language reference https://arnholm.github.io/angelcad-docs/docs/annotated.html
// AngelCAD code.
shape@ main_shape()
{
auto@ p = polyhedron("gregs-large.obj");
// traverse the vertices
double factor = 0.025;
for(uint i=0; i<p.nvert(); i++) {
// get position of this vertex
pos3d@ vtx = p.vertex(i);
double t = vtx.x();
if(t > 0.0) {
// transform vertex by rotation
double angle = factor*t*PI/4;
@vtx = rotate_y(rad:angle)*vtx;
p.set_vertex(i,vtx);
}
}
return p;
}
void main()
{
shape@ obj = main_shape();
obj.write_xcsg(GetInputFullPath(),secant_tolerance:-1.0);
}
This works in principle, but the result is ugly due to the coarse mesh: