Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

233
Visualizações
Finding perpendicular and parallel points

How to find the points marked in a picture (P0', P1', P2 ', P3')

Points are known:

  • P0, P1, P2, P3
  • l1 and l2

Point = Vector3(x,y,z)

EDIT:

Initially I am trying to set the point P0'

var l1 = 1.2f;
var l2 = 0.7f;

var v30n = (P3 + P0).normalized;
var v10n = (P1 + P0).normalized;

var pl1 = P0 + v30n * l1;
var pl2 = P0 - v10n * l2;
var P0prim = pl1 + pl2;

enter image description here

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Careful with the directions:

var l1 = 1.2f;
var l2 = 0.7f;

var v30n = (P0 - P3).normalized; //corrected here
var v10n = (P0 - P1).normalized; //corrected here

var pl1 =  v30n * l1;
var pl2 = v10n * l2; // corrected here
var P0prim = P0 + pl1 + pl2;

Did not debug that out, but the direction is: (final point - starting point).normlized

over 4 years ago · Santiago Trujillo Relatório

0

What @rustyBucketBay says is the correct answer (he was faster than me!), but in case you know that the proportions of l1 and l2 are equals, you can also do the follow:

We know that If you sum all the X's and divide by 4 (the number of corners) and do the same for the Y's, you will have the center of the square.

So if we sum l1+l2 to every point of the square, and do the same, we will have the expected square but displaced. Now we want to relocate the center of the new big square.

To achieve that we only have to calculate the center of the new big square (again, divide by 4 X's and Y's) and calculate the vector between both square centers, the small one and the big one.

With this calculated vector, we can just sum it to the new big square points, and will be relocated.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda