# View scalar on surface of building with polygonal bases. Cutting?

Dear all,
I’m trying to visualize a 3d simulation of a scalar quantity, eg. a f(x,y,z), on a surface of city buildings with polygonal bases.
I write the data on vtk file.
With buildings lateral faces (several vertical rectangles, one for each edge of the base polygon), I have decomposed each rectangle in various columns and, then, I have meshed it with triangle_strips. So it’s ok. I can set the resolution, eg the number of columns for rectangle decomposition, in order to obtain better spatial resolution of the calculated f(x,y,z) values.
The problem arises when dealing with the top of the building, eg a polygon.
I have triangulate a polygon representing the top of the building, but, depending on the polygon shape, this mesh isn’t always optimal. There are areas where the resolution is higher than necessary, and areas where is lower.

My idea is carrying out a simulation on a rectangular grid surrounding the polygon (with desidered resolution), generate a rectangular surface, and then cutting this surface with the polygon. So, I woul’d view only the surface area cutted by the polygon

Any suggestion in order to implement this?
Other suggestions?

Best Regards

Computer:
Pentium I5 3200
GeForge GT710 2GB

buildings.vtk (41.7 KB)

then cutting this surface with the polygon.

Are you looking to do that in ParaView or in your simulation ?

In my simulation I can calculate values ​​anywhere in space, so, also in a rectangular grid, with desidered resolution.
After obtaining this rectangular grid of points (in my simulation), I would like to display it in Paraview (as a rectangular surface), and cut it with the shape of the polygon (in Paraview).
This is my original question, not so clear, you’re right

The other possibility you said (i.e. calculate the value, directly on my simulation, on a grid of points that is not rectangular, but contained in the polygon) is also feasible. I have a code that obtains a set of points inside a polygon, but in this case I have to study a procedure to visualize this grid of points (generally of shape irregular and unknown a priori) as a surface in Paraview

I have solved my problem.programmatically.
In my simulation software, after triangulating the polygons, I proceeded to sub-triangulate them for a number of times I want.

Low Sub-Triangulation: Surface

Low Sub-Triangulation: Surface with Edges

High Sub-Triangulation: Surface

High Sub-Triangulation: Surface with edges

thank you all. See you in this forum