вычислительная-геометрия

How to calculate the perpendicular to a straight line?

Two points of a straight line are known, for example, {100, 100} and {200, 200}, and there is a point that does not lie on th ... point relative to the straight line will be perpendicular, if you draw a line? The response in the Java code is desirable.

How to find the skew (pseudoscalar) product of vectors?

I have two questions about computational geometry at once. I need to find the skew (pseudo-scalar) product of vectors, each o ... I need to transform each of the vectors so that their origin coincides with the origin before calculating their skew product?

Determining the visibility of a segment

Given N segments on the plane with the origin in (0, 0), respectively, the location of which can be absolutely any The last ... it does not take into account the case when the left and right parts of the red segment are closed and the middle is visible

Count the number of intersections of rectangles (cubes)

For simplicity, we will consider the problem of rectangles (for cubes-similarly). The task is to calculate the total area of ... .y, box2.y+box2.dy) dz := c.isLineIntersection(box1.z, box1.z+box1.dz, box2.z, box2.z+box2.dz) return dx * dy * dz }

Distance from a point to a straight line C++

I have the following code for finding the distance between a point and a straight line: template<typename T> using poi ... oximate length between the point and the segment when line_segment_length became zero. How can all this be done implement it?

Area of a non-convex polygon

Problem: A polygon (not necessarily convex) is defined on the plane by listing the coordinates of the vertices in the order o ... um + (x + x2)*(y - y2); sum = abs(sum) / 2; cout << fixed << setprecision(3) << sum << endl;