J
J
Joulence2020-06-18 18:02:17
Mathematics
Joulence, 2020-06-18 18:02:17

How to find out what kind of figure through vectors?

Hello everyone, I want to write a code that will display the name of a shape using vectors. If I'm not mistaken, then you need a vector and an angle between them or a scalar product. A few months ago, the idea was in my head how to implement everything, and when it came time to do it, everything was forgotten.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2020-06-18
@Joulence

Make a bunch of rules and checks for each shape. For example:
Triangle : 3 vectors such that
c=±a±b
Here it should be understood that this can be and
a=±c±b
or
b=±a±c
Right triangle : 3 vectors such that the
dot product of one of the pairs of vectors is zero (or the angle is 90 degrees)
+ Rule for a triangle
Isosceles triangle : 3 vectors such that
one of the pairs of vectors is equal to (or there are two equal angles)
+ Rule for a triangle
Equilateral triangle : 3 vectors such that their moduli are equal
|a|=|b|=|c|
+ Rule for a triangle
, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question