This documentation is available in Portuguese and English. If you want to access it in English continue reading, but if you want to access it in Portuguese, click here.
This documentation aims to provide context regarding the geometric-props project. The project is also available on github, where complete documentation and examples are provided. To access, click here.
The project aims to calculate a set of geometric properties of polygonal figures inserted in a two-dimensional plane. In this project, a class is implemented using the Javascript programming language that abstracts the methodology used in Green's theorem, which transforms surface integrals into line integrals along a contour to calculate the following geometric properties:
Note: The units provided in the table are valid when entering the coordinates of the polygonal figure in centimeters (cm).
Geometric Propertie | Acronym | Unit |
---|---|---|
Section area | A | cm² |
Static moment with respect to the x-axis | Sx | cm³ |
Static moment with respect to the y-axis | Sy | cm³ |
Moment of inertia with respect to the x-axis | Ix | cm⁴ |
Moment of inertia with respect to the y-axis | Iy | cm⁴ |
Product of inertia with respect to the x and y axes | Ixy | cm⁴ |
Centroid of the section relative to the x-axis | xg | cm |
Centroid of the section relative to the y-axis | yg | cm |
Barycentric moment of inertia (with respect to the centroid) on the x-axis | Ixg | cm⁴ |
Barycentric moment of inertia (with respect to the centroid) on the y-axis | Iyg | cm⁴ |
Vertical distance between the center of gravity and the lowest point along the vertical axis | Y1 | cm |
Vertical distance between the highest point along the vertical axis and the center of gravity | Y2 | cm |
Resistant modulus, calculated considering Y1 | W1 | cm³ |
Resistant modulus, calculated considering Y2 | W2 | cm³ |
Height | height | cm |
In addition, the application also allows you to obtain some more relevant information, such as:
Information | Acronym | Unit |
---|---|---|
Maximum coordinate with respect to the x axis | xmax | cm² |
Minimum coordinate with respect to the x axis | xmin | cm |
Maximum coordinate with respect to the y axis | ymax | cm |
Minimum coordinate with respect to the x axis | ymin | cm |
The application allows you to work with hollow figures, but you must pay attention to the following precautions, the insertion of a section takes place as the vertices are inserted in a counterclockwise direction, while the removal of a section takes place as its vertices are inserted clockwise.
In the following introductory example, we want to calculate the properties of a figure with 4 vertices; this figure does not have a hollow section (its section is solid). Care must be taken with the order in which the vertices are inserted. The first point is marked with the number 1, the second with the number 2, and so on. Note that it is necessary to reinsert the starting point, such that the x and y axis coordinates of the first point and the last point are the same. In the following image, on the left an image is shown that indicates the correct order of insertion of the points, on the right we have an example of a common error which is using the wrong direction when inserting the points.
import GeometricProps from "geometric-props";
The next step is to create an instance of the class, in this case, a vector of objects is expected in the argument, each object must contain the x property, which references the coordinate on the x axis, and must also contain the y property, which references the coordinate on the y axis. Each vertex of the figure is strictly related to a position of the vector, within which an object is contained that requires the position of the vertex in relation to the x-axis and in relation to the y-axis. When instantiating the class, the following structure must be provided:
In the following case, we want to represent a rectangular figure with a base of 20cm and a height of 60cm, where the lower left corner is located at coordinates (0,0). The following table and figure represent the situation in question:
Point | Coordinate on x axis | Coordinate on y axis |
---|---|---|
1 | 0 | 0 |
2 | 20 | 0 |
3 | 20 | 60 |
4 | 0 | 60 |
5 | 0 | 0 |
After importing the class, you must create an instance and assign it to a variable. In this case, the variable rectangulo
will be created and assigned to the instance of the class that expects to receive in its constructor, a vector indicated by []
and each position of this vector must be an object indicated by {}
. Within this dictionary, a key set will be inserted, a value that references the axis (x or y) and the reference value.
const rectangulo = new GeometricProps(
[
{'x':0, 'y':0}, ##ponto 1
{'x':20, 'y':0}, ##ponto 2
{'x':20, 'y':60}, ##ponto 3
{'x':0, 'y':60}, ##ponto 4
{'x':0, 'y':0} ##ponto 5
])
After having correctly instantiated a class, it is now possible to access all the properties described in the geometric properties table, each geometric property is a respective property of the class. Next, the name of the class property and its corresponding geometric geometry will be presented.
Goemetric Propertie | Class Propertie |
---|---|
Section Area (A) | rectangulo.A |
Static moment with respect to the x-axis (Sx) | rectangulo.Sx |
Static moment with respect to the y-axis (Sy) | rectangulo.Sy |
Moment of inertia with respect to the x-axis (Ix) | rectangulo.Ix |
Moment of inertia with respect to the y-axis (Iy) | rectangulo.Iy |
Product of inertia with respect to the x and y axes (Ixy) | rectangulo.Ixy |
Centroid of the section relative to the x-axis (xg) | rectangulo.Xg |
Centroid of the section relative to the y-axis (yg) | rectangulo.Yg |
Barycentric moment of inertia (with respect to the centroid) on the x-axis (Ixg) | rectangulo.Ixg |
Barycentric moment of inertia (with respect to the centroid) on the y-axis (Iyg) | rectangulo.Iyg |
Product of inertia with respect to the centroid in x and y (Ixyg) | rectangulo.Ixyg |
Vertical distance between the center of gravity and the lowest point along the vertical axis (Y1) | rectangulo.Y1 |
Vertical distance between the highest point along the vertical axis and the center of gravity (Y2) | rectangulo.Y2 |
Resistant modulus, calculated considering Y1 (W1) | rectangulo.W1 |
Resistant modulus, calculated considering Y2 (W2) | rectangulo.W2 |
Height (h) | rectangulo.height |
Below, the console.log()
will be presented for each of the geometric properties, the toFixed()
function helps to display the result with 2 spaces decimals.
console.log(`
Xmax: ${rectangulo.Xmax.toFixed(2)} cm,
Xmin: ${rectangulo.Xmin.toFixed(2)} cm,
Ymax: ${rectangulo.Ymax.toFixed(2)} cm,
Ymin: ${rectangulo.Ymin.toFixed(2)} cm,
A: ${rectangulo.A.toFixed(2)} cm²,
Sx: ${rectangulo.Sx.toFixed(2)} cm³,
Sy: ${rectangulo.Sy.toFixed(2)} cm³,
Ix: ${rectangulo.Ix.toFixed(2)} cm⁴,
Iy: ${rectangulo.Iy.toFixed(2)} cm⁴,
Ixy: ${rectangulo.Ixy.toFixed(2)} cm⁴,
Xg: ${rectangulo.Xg.toFixed(2)} cm,
Yg: ${rectangulo.Yg.toFixed(2)} cm,
Ixg: ${rectangulo.Ixg.toFixed(2)} cm⁴,
Iyg: ${rectangulo.Iyg.toFixed(2)} cm⁴,
Ixyg: ${rectangulo.Ixyg.toFixed(2)} cm⁴,
Y1: ${rectangulo.Y1.toFixed(2)} cm,
Y2: ${rectangulo.Y2.toFixed(2)} cm,
W1: ${rectangulo.W1.toFixed(2)} cm³,
W2: ${rectangulo.W2.toFixed(2)} cm³,
height: ${rectangulo.height.toFixed(2)} cm,
base: ${rectangulo.base.toFixed(2)} cm,
`)
Social Networks:
Github:Linkedin:
Instagram:
Youtube:
Social Networks:
Github:FILHO, A. C. Dimensionamento e verificação de seções poligonais de concreto armado submetidas à flexão composta oblíqua, Porto Alegre, Universidade Federal do Rio Grande do Sul/RS, 2014.
A partir dessa seção, será apresentada a documentação do projeto em português (pt-br).
Esta documentação tem o objetivo de contextualizar com relação ao projeto geometric-props. O projeto está disponibilizado também pelo github, em que é fornecido a documentação completa e exemplos. Para acessar, clique aqui.
O projeto tem como objetivo calcular um conjunto de propriedades geométricas de figuras poligonais inseridas em um plano bidimensional. Nesse projeto, implementa-se uma classe utilizando a linguagem de programação Javascript que abstrai a metodologia utilizada no teorema de green, que transforma integrais de superfície em integrais de linha ao longo de um contorno para assim, calcular as seguintes propriedades geométricas:
Observação: As unidades disponibilizadas na tabela são válidas quando se insere as coordenadas da figura poligonal em centímetros (cm).
Propriedades Geométricas | Sigla | Unidade |
---|---|---|
Área da seção | A | cm² |
Momento estático com relação ao eixo x | Sx | cm³ |
Momento estático com relação ao eixo y | Sy | cm³ |
Momento de inércia com relação ao eixo x | Ix | cm⁴ |
Momento de inércia com relação ao eixo y | Iy | cm⁴ |
Produto da inércia em relação aos eixos x e y | Ixy | cm⁴ |
Centróide da seção em relação ao eixo x | xg | cm |
Centróide da seção em relação ao eixo y | yg | cm |
Momento de inércia baricêntrica (com relação ao centróide) no eixo x | Ixg | cm⁴ |
Momento de inércia baricêntrica (com relação ao centróide) no eixo x | Ixg | cm⁴ |
Distância vertical entre o centro de gravidade e o ponto mais baixo ao longo do eixo vertical | Y1 | cm |
Distância vertical entre o ponto mais alto ao longo do eixo vertical e o centro de gravidade | Y2 | cm |
Módulo resistente, calculado considerando Y1 | W1 | cm³ |
Módulo resistente, calculado considerando Y2 | W2 | cm³ |
Altura | height | cm |
Além disso, a aplicação permite também obter mais algumas informações relevantes, como:
Informação | Sigla | Unidade |
---|---|---|
Coordenada máxima com relação ao eixo x | xmax | cm² |
Coordenada mínima com relação ao eixo x | xmin | cm |
Coordenada máxima com relação ao eixo y | ymax | cm |
Coordenada mínima com relação ao eixo y | ymin | cm |
A aplicação permite que se trabalhe com figuras vazadas, mas deve-se atentar aos seguintes cuidados, a inserção de uma seção se da a medida que os vértices são inseridos no sentido anti-horário, enquanto a remoção de uma seção se da a medida que seus vértices são inseridos no sentido horário.
No exemplo introdutório a seguir, deseja-se calcular as propriedades de uma figura com 4 vértices, essa figura não apresenta seção vazada (sua seção é maciça). Deve-se tomar cuidado com a ordem de inserção dos vértices. O primeiro ponto é marcado com o número 1, o segundo com o número 2 e assim por diante. Nota-se que é necessário reinserir o ponto inicial, de tal forma que a coordenadas do eixo x e y do primeiro ponto e do último ponto são as mesmas. Na imagem a seguir, é apresentado na esquerda uma imagem que indica a ordem correta de inserção dos pontos, já na direita temos um exemplo de um erro comum que é utilizar o sentido errado na inserção dos pontos.
import GeometricProps from "geometric-props";
A próxima etapa é criar uma instância da classe, nesse caso, é esperado no argumento um vetor de objetos, cada objeto deve contar a propriedade x, que faz referência a coordenada no eixo x, e deve conter também a propriedade y, que faz referência a coordenada no eixo y. Cada vértice da figura está estritamente relacionado a uma posição do vetor, em que dentro está contido um objeto que necessita da possição do vértice em relação ao eixo x e em relação ao eixo y. Ao instanciar a classe, a seguinte estrutura deve ser fornecida:
No caso a seguir, queremos representar uma figura retangular com base de 20cm e altura de 60cm, em que a quina inferior esquerda está situada nas coordenadas (0,0). A tabela e a figura a seguir, representam a situação em questão:
Ponto | Coordenada no eixo x | Coordenada no eixo y |
---|---|---|
1 | 0 | 0 |
2 | 20 | 0 |
3 | 20 | 60 |
4 | 0 | 60 |
5 | 0 | 0 |
Após ter realizado a importação da classe, deve-se criar uma instância e atribuir em uma variável. Nesse caso, será criada a variável rectangulo
e atribuida a instância da classe que espera receber no seu construtor, um vetor indicado por []
e cada posição desse vetor deve ser um objeto indicado por {}
. Dentro desse dicionário, será inserido um conjunto chave, valor que faz referência ao eixo (x ou y) e ao valor de referência.
const rectangulo = new GeometricProps(
[
{'x':0, 'y':0}, //ponto 1
{'x':20, 'y':0}, //ponto 2
{'x':20, 'y':60}, //ponto 3
{'x':0, 'y':60}, //ponto 4
{'x':0, 'y':0} //ponto 5
])
Após ter instanciado a classe corretamente, já é possível acessar todas as propriedades descritas na tabela de proprieades geométricas, cada propriedade geométrica é uma respectiva propriedade da classe. A seguir será apresentado o nome da propriedade da classe e sua propriedade geométrica correspondente.
Propriedade Geométrica | Propriedade da classe |
---|---|
Área da seção (A) | rectangulo.A |
Momento estático com relação ao eixo x (Sx) | rectangulo.Sx |
Momento estático com relação ao eixo y (Sy) | rectangulo.Sy |
Momento de inércia com relação ao eixo x (Ix) | rectangulo.Ix |
Momento de inércia com relação ao eixo y (Iy) | rectangulo.Iy |
Produto da inércia em relação aos eixos x e y (Ixy) | rectangulo.Ixy |
Centróide da seção em relação ao eixo x (xg) | rectangulo.Xg |
Centróide da seção em relação ao eixo y (yg) | rectangulo.Yg |
Momento de inércia baricêntrica (com relação ao centróide) no eixo x (Ixg) | rectangulo.Ixg |
Momento de inércia baricêntrica (com relação ao centróide) no eixo y (Iyg) | rectangulo.Iyg |
Produto de inércia com relação ao centróide em x e y (Ixyg) | rectangulo.Ixyg |
Distância vertical entre o centro de gravidade e o ponto mais baixo ao longo do eixo vertical (Y1) | rectangulo.Y1 |
Distância vertical entre o ponto mais alto ao longo do eixo vertical e o centro de gravidade (Y2) | rectangulo.Y2 |
Módulo resistente, calculado considerando Y1 (W1) | rectangulo.W1 |
Módulo resistente, calculado considerando Y2 (W2) | rectangulo.W2 |
Altura (h) | rectangulo.height |
Abaixo, será apresentado o console.log()
referente a cada uma das propriedades geométricas, a função toFixed()
auxilia para que seja apresentado o resultado com 2 casas decimais.
console.log(`
Xmax: ${rectangulo.Xmax.toFixed(2)} cm,
Xmin: ${rectangulo.Xmin.toFixed(2)} cm,
Ymax: ${rectangulo.Ymax.toFixed(2)} cm,
Ymin: ${rectangulo.Ymin.toFixed(2)} cm,
A: ${rectangulo.A.toFixed(2)} cm²,
Sx: ${rectangulo.Sx.toFixed(2)} cm³,
Sy: ${rectangulo.Sy.toFixed(2)} cm³,
Ix: ${rectangulo.Ix.toFixed(2)} cm⁴,
Iy: ${rectangulo.Iy.toFixed(2)} cm⁴,
Ixy: ${rectangulo.Ixy.toFixed(2)} cm⁴,
Xg: ${rectangulo.Xg.toFixed(2)} cm,
Yg: ${rectangulo.Yg.toFixed(2)} cm,
Ixg: ${rectangulo.Ixg.toFixed(2)} cm⁴,
Iyg: ${rectangulo.Iyg.toFixed(2)} cm⁴,
Ixyg: ${rectangulo.Ixyg.toFixed(2)} cm⁴,
Y1: ${rectangulo.Y1.toFixed(2)} cm,
Y2: ${rectangulo.Y2.toFixed(2)} cm,
W1: ${rectangulo.W1.toFixed(2)} cm³,
W2: ${rectangulo.W2.toFixed(2)} cm³,
height: ${rectangulo.height.toFixed(2)} cm,
base: ${rectangulo.base.toFixed(2)} cm,
`)
Redes: Sociais:
Github:Linkedin:
Instagram:
Youtube:
Redes Sociais:
Github:FILHO, A. C. Dimensionamento e verificação de seções poligonais de concreto armado submetidas à flexão composta oblíqua, Porto Alegre, Universidade Federal do Rio Grande do Sul/RS, 2014.