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?

# | User | Rating |
---|---|---|

1 | Benq | 3783 |

2 | jiangly | 3666 |

3 | tourist | 3611 |

4 | Um_nik | 3536 |

5 | inaFSTream | 3477 |

6 | fantasy | 3468 |

7 | maroonrk | 3464 |

8 | QAQAutoMaton | 3428 |

9 | ecnerwala | 3427 |

10 | Ormlis | 3396 |

# | User | Contrib. |
---|---|---|

1 | Um_nik | 184 |

2 | adamant | 178 |

3 | awoo | 177 |

4 | nor | 169 |

5 | maroonrk | 165 |

6 | -is-this-fft- | 164 |

7 | antontrygubO_o | 152 |

8 | ko_osaga | 151 |

9 | dario2994 | 150 |

10 | SecondThread | 149 |

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?

↑

↓

Codeforces (c) Copyright 2010-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/06/2023 06:33:13 (k3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

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 .