How do you make a truncated octahedron from intersecting plane equations? - math

I'm trying to make an octahedron for a molecular dynamics simulation, and it must be constructed with plane equations.

Related

I have a mesh, how to find its deepest point that could fit a sphere?

So I have a 3D polygon based mesh surface (2.5D). I want to find its deepest point (minimum) that could fit a sphere of radius r. How to do such thing not utilizing physics engine?

get data spread/stddev from singular value decomposition with weighted least squares

I have a scalarfield which has been discretized into a grid of voxels. I am trying to fit a specific 3d function to that scalarfield. The 3d function I want to fit is defined by a plane and a gaussian fall-off per distance to that plane. Just to be clear: I am not talking about fitting a plane surface to a scalarfield but about fitting a 3d function defined by a plane and a fall-off (kind of a fuzzy plane or a band).
So far I managed to find the plane parameters. I do this by plugging all voxel positions and their scalar values of the input field into a weighted least squares problem. I am roughly following this procedure here: Weighted least square - fit a plane to 3D point set. The difference is that my point set consists of all the voxel centers weighted by their respective input scalarfield values. It seems to work pretty well and I am getting nice reasonable plane parameters.
My question now is about finding the standard deviation for my gaussian fall-off function. What is interesting is that the singular values from SVD actually relate to the spread of the data in the local coordinate system of the plane. This relationship has been discussed here: Can I get data spread (noise) from singular value decomposition?. The difference to my problem is that I am working with a weighted least squares problem and when I divide the singular values by the square root of the weighted sum, my standard deviation is roughly doing the right thing but still is quite off.
I basically would like to know if there is a formal relationship between the singular values of a SVD and the standard deviation of samples from a plane given by a weighted least squares fit. In particular, can I expect to be able to exactly reconstruct the plane and standard deviation parameter when the input scalarfield has been created from such a parameterization?
Thanks,
David

Projection of points on plane and the inverse transformation

i'm working on a project where i have a cloud of points in space as input data, my goal is to create a surface.
I started by computing a regression plan for the cloud, then i projected my points on the plane using dot products :
My plane is represented by a point and a normal , i construct the axis of the plane's space using cross products then project each point on these axis.
then i triangulate in 2D (that's the point of the whole operation).
My problem is that my points now are in the plane space and i want to get them back to their inital position (inverse the transformation) to have my surface ON my points.
thank you :)
the best way is to keep the original positions and make the triangulation give you the indices rather than the positions , i hope it will help !

Finding 3 dimentional B-spline controll points from given array of points from spline solution?

Wa are talking about Non-uniform rational B-spline. We have some simple 3 dimentional array like
{1,1,1}
{1,2,3}
{1,3,3}
{2,4,5}
{2,5,6}
{4,4,4}
Which are points from a plane created by some B-spline
How to find controll points of spline that created that plane? (I know its a hard task because of weights that need to be calculated but I really hope it is solvable)
For thouse who did not got idea of question - sory my writting is wwbad - we have points that are part of plane rendered here and we need to find controll points that form a spline which solution is that rendered plane.
There are several interpolation techniques that could be used, Global NURB surface interpolation, or Bi-cubic piecewise surface interpolation are reasonable.
"The NURBS book" by Les A. Piegl covers a number of them

Finding the bounding box (axially aligned) of a parametric range of a 3D NURBS surface

I'll apologize in advance in case this is obvious; I've been unable to find the right terms to put into Google.
What I want to do is to find a bounding volume (AABB is good enough) for an arbitrary parametric range over a trimmed NURBS surface. For instance, (u,v) between (0.1,0.2) and (0.4,0.6).
EDIT: If it helps, it would be fine for me if the method confined the parametric region entirely within a bounding region as defined in the paragraph below. I am interested in sub-dividing those regions.
I got started thinking about this after reading this paragraph from this paper ( http://www.cs.utah.edu/~shirley/papers/raynurbs.pdf ), which explains how to create a tree of bounding volumes with a depth relative to the degree of the surface:
The convex hull property of B-spline surfaces guarantees that the surface is contained in the convex hull of its control mesh.
As a result, any convex objects which bound the mesh will bound the underlying surface. We can actually make a stronger
claim; because we closed the knot intervals in the last section [made the multiplicity of the internal knots k − 1], each nonempty
interval [ui; ui+1) [vj; vj+1) corresponds to a surface patch which is completely contained in the convex hull of
its corresponding mesh points. Thus, if we produce bounding volumes for each of these intervals, we will have completely
enclosed the surface. We form the tree by sorting the volumes according tothe axis direction which has greatest extent across the bounding volumes, splitting the data in half, and repeating the process.
Thanks! Sean
You will need to slice out a smaller NURBS surface, which only covers the parameter range you are interested in. Using your example, which I take to mean you are in the region where the u parameter is between 0.1 and 0.4. Let Pu be the degree of the spline in that parameter (A cubic spline has Pu = 3). You need to perform "knot insertion" (There's your Google search term) to get knots of degree Pu located at u=0.1 and u=0.4 Do the same thing on the v parameter to get knots of degree Pv at 0.2 and 0.6. The process of knot insertion will modify (and add to) the array of control points. There's a bit of bookkeeping involved, but you can then find the control_points that determine the surface in the parameter patch you just isolated between inserted knots. The convex property then says the surface is bounded by these control points, so you can use them to determine your bounding volume.
The NURBS reference I like to use for operations like this is: "The NURBS Book", by Les Piegl and Wayne Tiller.

Resources