Given 3 points in 3D, is there a way to calculate the area of the triangle made by them in O(1), considering the Cross Product will need to use the square root to calculate the magnitude of the vector produced by the cross product?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Given 3 points in 3D, is there a way to calculate the area of the triangle made by them in O(1), considering the Cross Product will need to use the square root to calculate the magnitude of the vector produced by the cross product?
Название |
---|
There is no difference in the formula for 3D: abs(CrossProduct(P1 — P0, P2 — P0) / 2) should work again.
You need the square root function to compute the abs of the CrossProduct, isn't O(1).
I think it is impossible, because in any way you need to know the length of some vector or segment
Also if it was possible, how could we find the area of a triangle if it was of form .
There is a way to do that in 2D, which is applicable for all polygons by applying the following formula to all the polygon edges:
Which is O(1) for a triangle.
Imagine the points (0, 0, 0), (0, 0, 1) and (2, 1, 1). The area of the triangle, formed by them is . So if there was is a formula to exactly compute the area, then it should be able to somehow compute .