need to shrink the polygon

I am workin on a project of modeling building for greenBuilding. for the simulation, I need to put the vertices for the outside of the flat external wall, the the centeral of the wall between flats. For this, I am doing great and I also calculated the area. But I also need the NET floor area by reducing the walls thickness. Not all the wall have the same thickness but I do know this the Gross area the thickness of each wall the length of each wall How can I substract the walls from the Gross to get the NET floor area in the example i loaded, I have the vertices of the pink polygon and use a formuka to find the area of 1400 and than I moved two line by 5 and the rest by 4. How do I find the net area I would really would love help.with the math/logic behind the formula

 Accepted Answer

Umar
Umar on 2 Jul 2024
Edited: Walter Roberson on 2 Jul 2024
Hi Sagi,
To answer your questions, please see my comments below.
Your question: How can I substract the walls from the Gross to get the NET floor area in the example i loaded, I have the vertices of the pink polygon and use a formuka to find the area of 1400 and than I moved two line by 5 and the rest by 4. How do I find the net area I would really would love help.with the math/logic behind the formula.
Solution: Firstly, calculate the gross area of the polygon using the vertices provided. The, determine the area of the walls by multiplying the thickness of each wall with the length of the corresponding wall. Finally, subtract the total area of the walls from the gross area to obtain the net floor area. Here is an example on how to achieve this,
% Calculate gross area of the polygon
% Assume gross_area = 1400 (example value)
gross_area = 1400;
% Calculate total area of walls
wall_thickness = [5, 5, 4, 4];
% Thickness of each wall
wall_length = [10, 10, 15, 15];
% Length of each wall
total_wall_area = sum(wall_thickness .* wall_length);
% Calculate net floor area
net_floor_area = gross_area - total_wall_area;
% Display the net floor area
disp(['Net Floor Area: ', num2str(net_floor_area)]);
Hope this will help you now to calculate the net floor area by subtracting the walls' area from the gross area.

2 Comments

Thank you. it get close.
it does not get to account the overlap in the corners.
But it real close.
thank you very much
No problem Sagi, Walter and I are still here to assist you further. Walter, I do appreciate your help. Happy 4th of July.

Sign in to comment.

More Answers (0)

Categories

Asked:

on 1 Jul 2024

Commented:

on 2 Jul 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!