I hope I'm asking on the right StackExchange site. Apologies if I'm not.
I want to generate 3D triangulated models of optical lenses, circular in shape. I can create the meshes for the front and back surface. I'm having trouble creating the triangles for the sides of the lenses (as the front surface is a certain distance from the backside, also on the sides). I want the vertices of the front and back surfaces to be on a rectangular grid (z=f(x,y) where (x,y) are on the grid). That means the sides will have to deal with the "staircasing" that exists because of clipping the front and back on the rectangles of the grid.
How do I select which vertices (on/near the edge) of the front and back surfaces to use for the lens sides?
That appears to be not as easy as I thought. For instance, taking the vertices that are within "lens radius" and "lens radius minus sqrt(grid spacing)" from the center doesn't work. Similar other tries didn't work out either.
To be a little more clear: the front and back surface are perfectly aligned and share the same grid for their x and y coordinates. Therefore the sides are always vertical.