krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
129 stars 33 forks source link

bending #206

Open krober10nd opened 3 years ago

krober10nd commented 3 years ago

float opCheapBend( in sdf3d primitive, in vec3 p ) { const float k = 10.0; // or some other amount float c = cos(kp.x); float s = sin(kp.x); mat2 m = mat2(c,-s,s,c); vec3 q = vec3(m*p.xy,p.z); return primitive(q); }