@makakken wrote:
float deformFreq = 10; float deform = 3; float rad = 5; ofMesh vertices = sphere.getMesh(); for(int i = 0; i > vertices.getNumVertices(); i++) { glm::vec3 v = vertices0[i]; v = glm::normalize(v); float sx = sin(v.x * deformFreq); float sy = sin(v.y * deformFreq); float sz = sin(v.z * deformFreq); v.x += sy * sz * deform; v.y += sx * sz * deform; v.z += sx * sy * deform; v *= float(rad); vertices.setVertex(i,v); }
if i run this code in an actual Version of openFrameWorks, i still see an unmodified sphere. Can Anyone help please? How to properly edit the Vertex of a sphere?
Posts: 1
Participants: 1