plane

Point of intersection of three planes 3D - C#

大兔子大兔子 提交于 2019-12-11 10:11:38
问题 Does anyone have any C# algorithm for finding the point of intersection of the three planes (each plane is defined by three points: (x1,y1,z1) , (x2,y2,z2) , (x3,y3,z3) for each plane different). The plane defined by the equation: ax + by + cz + d = 0 , where: A = y1 (z2 - z3) + y2 (z3 - z1) + y3 (z1 - z2) B = z1 (x2 - x3) + z2 (x3 - x1) + z3 (x1 - x2) C = x1 (y2 - y3) + x2 (y3 - y1) + x3 (y1 - y2) D = -(x1 (y2 z3 - y3 z2) + x2 (y3 z1 - y1 z3) + x3 (y1 z2 - y2 z1)) Thank you very much! 回答1:

Getting axis aligned coordinates from generic plane

点点圈 提交于 2019-12-11 00:04:12
问题 The title is probably wrong because I don't know enough math to actually describe my problem in a small sentence. I have a closed loop of 3D vectors, which I will call '3D polygon'. I need to perform a 2D-only operation on it, which will return me a different set of 2D points I need to convert those new 2D points back to 3D. My current attempt is as follow: Get a 'best fit' plane that minimizes the chances of making the '3D' polygon self intersect when converted to 2D. Get the two

ILNumerics plot a plane at specific location

好久不见. 提交于 2019-12-10 19:57:15
问题 I'm currently playing around with the ILNumerics API and started to plot a few points in a cube. Then I calculated a regression plane right through those points. Now I'd like to plot the plane in the same scene plot but only with the same size than the point cloud. I got the paramters of the plane (a,b,c): f(x,y) = a*x + b*y + c; I know that only z is interesting for plotting a plane but I've got no clue how pass the right coodinates to the scene so that the plane size is about the same size

3D Ray-Quad intersection test in java

自闭症网瘾萝莉.ら 提交于 2019-12-09 06:15:46
问题 In 3D space I am trying to determine if a ray/line intersects a square and if so, the x and y position on the square that it intersects. I have a ray represented by two points: R1 = (Rx1, Ry1, Rz1) and R2 = (Rx2, Ry2, Rz2) And the square is represented by four vertices: S1 = (Sx1, Sy1, Sz1), S2 = (Sx2, Sy2, Sz2), S3 = (Sx3, Sy3, Sz3) and S4 = (Sx4, Sy4, Sz4). I’ve found lots of algebraic equations for this online but none seem to fit this problem exactly. Ideally I would like the answer in

Plotting a solid cylinder centered on a plane in Matplotlib

不羁岁月 提交于 2019-12-08 10:08:15
问题 I fit a plane to a bunch of points in 3d and initially gave it an arbitrary size using np.meshgrid, but now I'm trying to plot a cylinder centered on that plane and oriented the same way (such that the plane fit would cut the height of the cylinder in half), but with a specified radius and height. The only examples of cylinders plotted in matplotlib I can find are hollow and usually open at the top and bottom. I want the one I plot to be solid so I can clearly see what points it's enclosing.

Retrieve 2D co-ordinate from a 3D point on a 3D plane

纵然是瞬间 提交于 2019-12-07 23:09:34
问题 I have a point a point (x, y, z) that is on a plane defined by ax+by+cz+d=0. I'm trying to figure out what the (x', y') relative to the plane, where it has a starting point of (x0, y0, z0) and the x'-axis is defined by (1,0) and the y'-axis is defined by (0,1). My major goal is to have the mouse click on a surface, and know the 2D co-ordinates on a particular surface. I've managed to intersect the ray onto a plane quite trivially. As a side-note, I'm using DirectX 9 - my familiarity with

Find Corners of Rectangle, Given Plane equation, height and width

江枫思渺然 提交于 2019-12-07 15:11:41
问题 Essentially I want to make a rectangular plane face an object at all times. 1) I have found my plane equation (ax + by + cz + d = 0) 2) I have the center point of the rectangle (P0 = (x0,y0,z0)), which lays on the plane. 3) I have the width and Height of the rectangle. (W, H) 4) I know that the top two corners of the rectangle will have equal Y values, this goes for bottom 2 corners also. (Y is my up and down axis, the rectangle top and bottom lines will always be parallel to the x,z plane)

Three.js - PlaneGeometry from Math.Plane

核能气质少年 提交于 2019-12-07 01:53:27
I am trying to draw a least squares plane through a set of points in Three.js. I have a plane defined as follows: var plane = new THREE.Plane(); plane.setFromNormalAndCoplanarPoint(normal, point).normalize(); My understanding is that I need to take that plane and use it to come up with a Geometry in order to create a mesh to add to the scene for display: var dispPlane = new THREE.Mesh(planeGeometry, planeMaterial); scene.add(dispPlane); I've been trying to apply this answer to get the geometry. This is what I came up with: plane.setFromNormalAndCoplanarPoint(dir, centroid).normalize();

Plane fit of 3D points with Singular Value Decomposition

流过昼夜 提交于 2019-12-06 12:20:28
问题 Dear fellow stackoverflow users, I am trying to calculate the normal vectors over an arbitrary (but smooth) surface defined by a set of 3D points. For this, I am using a plane fitting algorithm that finds the local least square plane based on the 10 nearest neighbors of the point at which I'm calculating the normal vector. However, it does not always find what seems to be the best plane. Thus, I'm wondering whether there is a flaw in my implementation or a flaw in my algorithm. I'm using

Retrieve 2D co-ordinate from a 3D point on a 3D plane

微笑、不失礼 提交于 2019-12-06 06:17:36
I have a point a point (x, y, z) that is on a plane defined by ax+by+cz+d=0. I'm trying to figure out what the (x', y') relative to the plane, where it has a starting point of (x0, y0, z0) and the x'-axis is defined by (1,0) and the y'-axis is defined by (0,1). My major goal is to have the mouse click on a surface, and know the 2D co-ordinates on a particular surface. I've managed to intersect the ray onto a plane quite trivially. As a side-note, I'm using DirectX 9 - my familiarity with matrix/vector math is limited by the APIs provided to me through the D3DX libraries. One thought I had was