how i can know if three points are Identify clockwise or not in 3D ? I saw a solution of déterminant here but it’s for 2D. Source: Windows Que..

#### Category : algebra

My code below produces the following error: C2131: expression did not evaluate to a constant. template<int32_t M, int32_t N> [[nodiscard]] constexpr double determinant(const Matrix<M,N> & m) { double det = 0; if constexpr(m.rows() == 2) { return m[0][0]*m[1][1] – m[0][1]*m[1][0]; } else { for(std::size_t col = 0; col < m.cols(); ++col) { det += m[0][col] ..

I have two matrices A = 0.326 , 0.154 , -0.000954 , -0.00016 , -0.000472 , 0.0315 , 0.0315 , 0.154 , 0.326 , -0.012 , -0.00202 , -0.00596 , 0.285 , 0.291 , -0.000954 , -0.012 , 0.326 , 8.09e-05 , 0.000239 , 0.213 , -0.143 , -0.00016 , -0.00202 , 8.09e-05 , 0.325 ..

I am given an integer z and have to compute two whole numbers x and y that solve x^5 – y^5 = z. It is guaranteed, that this equation has a solution with two whole numbers. I have not gotten very far with solving this. Thanks for your help! Source: Windows Que..

have tried multiple methods of plane intersection, the code is not producing an accurate result. At some angles its pretty good, for a right angle triangle, roughly in position but noticeably off. xyzPoint return_Intersect_3planes(Tri tri1, Tri tri2, Tri tri3) { double x1 = tri1.x1; double y1 = tri1.y1; double z1 = tri1.z1; double a1 = ..

This question is more about algebra than programming but maybe I will find some help here 🙂 I am trying to create a QRect around a QLine with given offset(see picture below). Having the segment AB and the offset, how to find all the missing points to create a QRect? Source: Windows Que..

So I am trying to make a boids simulation. I am trying to implement the first rule which is that each boid must steer away from nearby boids. I have all boids in a std::vector called boids. Each boids has a std::vector called withinSensoryRange which holds all boids which are within the boids sensory range. ..

Background I am attempting to create a program that creates a fully simplified newton polynomial from a divided differences table. I already have all of the resources to do this, but I am confused on how to get my loops working. Concept Conceptually, I have pinpointed that I have a [50][51] floating point matrix that ..

First of all, I’m new to C++. Tbh I find it very hard to "get used to" but the last week I have been trying to "translate" a script from Python to C++ due to computational time requirements. One of the problem I have is root-finding of simple 1D functions: First the simple MWE from ..

I wanted to simplify algebraic expressions in c++. I started with something simple: removing brackets from a algebraic expression containing + and – operators. For example, a-(b-c) should be simplified to a-b+c. This link gives the answer to this question. Here is the source code: #include <iostream> #include <string.h> #include <stack> using namespace std; // ..

## Recent Comments