EDIT: From what I understand, you want to multiply the interior of your shape by a thermal conductivity map that corresponds with each pixel.
I'd recommend:
- Floodfill the interior of your shape. (See image processing libraries such as AForge.NET.)
- Perform an element-wise multiplication it with your thermal conductivity map. (See numerical libraries.)
The result is a heatmap of "temperature". You can process it further as desired.
If you're not concerned about speed, take the rasterized output and simply check for the presence of a bright pixel:
var img = /* some 2D array */;
var list = new List<Tuple<int, int>>();
foreach ((var row, var j) in img.Select((x, i) => Tuple.Create(x, i))) {
foreach ((var pixel, var i) in row.Select((x, i) => Tuple.Create(x, i))) {
if (pixel == 255) {
list.Add(Tuple.Create(i, j));
}
}
}
Perhaps a LINQ version:
img
.Select((r, j) => new {row = r, j = j})
.Select((t, j) => t.row
.Select((p, i) => new {p = p, i = i, j = j})
.Where(t => t.p == 255)
.Select(t => Tuple.Create(t.i, t.j)))
.SelectMany(x => x);