Plot 3 D cube around interest point in MATLAB - matlab

I want to plot 3D cube of size 2x2x5 (x,y,z) around an interest point to get the nearest points to it and inside the cube. The interest point may be at the center of cube.
How can I get the nearest points to the interest point?

There are several techniques for drawing cubes here. You will need to choose one that lets you specify size and origin. The sizes will be 2,2,5, and the origin will be the coordinates of the interest point.

Related

Extrapolation delaunay triangulation

Shown Figure (1) is a typical Delaunay triangulation (blue) and it has a boundary line (black rectangle).
Each vertex in the Delaunay triangulation has a height value. So I can calculate the height inside convex hull. I am figuring out a method to calculate the height up to the boundary line (some sort of extrapolation).
There are two things associated with this task
Triangulate up to the boundary point
Figuring out the height at newly created triangle vertices
Anybody come across this issue?
Figure 1:
I'd project the convex hull points of the triangulation to the visible box segments and then insert the 4 box corners and the projected points into the triangulation.
There is no unique correct way to assign heights to the new points. One easy and stable method would be to assign to each new point the height of the closest visible convex hull vertex. Be careful with extrapolation: Triangles of the convex hull tend to have unstable slopes, see the large triangles in front of the below terrain image. Their projection to the xy plane has almost 0 area but due to the height difference they are large and almost 90 degrees to the xy plane.
I've had some luck with the following approach:
Find the segment on the convex hull that is closet to the extrapolation point
If I can drop a perpendicular onto the segment, interpolate between the two vertices of the segment.
If I can not construct the perpendicular, just use the closest vertex
This approach results in a continuous surface, but does not provide 1st derivative continuity.
You can find some code that might be helpful at TriangularFacetInterpolator.java. Look for the interpolateWithExteriorSupport method.

Excluding some coordinates of a stl surface

i have loaded a stl file of a turbine blade into Matlab by using the STLreader. I got the coordinates of all points on the surfaces of the stl model by using the trisurf command (airfoil and foot of the blade). Now I want to focus on the suction sided coordinates of the airfoil. Therefore, I excluded the points of the blade foot by using the location of the Z-coordinates of the points. Now I want to exclude all points of the airfoil that aren't part of the suction side by using the X- and Y-coordinates of the points but I don't know how to do it. An image is attached to show my problem. I have tried the coordinatetransformation to rotate the X-Y-plane to say that all point with Y smaller than zero are deleted but it doesn't work well because of the curve of the airfoil. I always cut to much or not enough points.
Hopefully, someone can help me.
Yours
Tobias
turbine blade picture

How to get the intersection between the scatterred points and the circle?

I'm using canny edge detection to detect the edges of a rope and eliminate the background, then using morphological filters I'm filling these edges then thinning them to be in pixel size. The plot indicates the xy coordinates of the rope. What I need to do is to get the intersection of the scattered data (blue *) with the red circle (get the coordinates of Points (1,2,3,4).
Then I need to get the whole points coordinates from the point of intersection (point1,2,3,4) to the center,grouped as A,B,C,D.
The center of the circle, the origin of the axes, and the radius are all known.
I've tried some Matlab functions to get the four intersections points like
InterX,intersections
and also I tried to manually find the intersections
idx=find(y1-y2<eps);
but no method gives me the 4 intersection points.
Thank you in Advance
You'll need a thick circle. I presume (from your previous question) that the rope points are at contiguous integer coordinates. Using a thick circle (donut) with a width of 1 ensures you'll find at least one point in each rope end. Connected component analysis will then tell you which of these points belong to the same rope end.

Distance between two point along the cylinder surface

How to find out distance between point along the surface from one point to all other point on the cylinder surface.
XYZ coordinates of points are known
e.g
suppose 4 points are there on the surface of the cylinder here i want to find out following data i.e distance between point(1-2),point(1-3),point(1-4),point(2-3),point(2-4),point(3,4) along the surface.H
What you are looking for is the geodesic of a cylinder. Since you mentioned Matlab in the tag, you can use this tool

Minimizing area of a triangle containing data points in 3D plane

I have a set of data in 3D which are in the same plane. I have a Triangle containing those data points in the same plane. But the Area of the Triangle is much larger. I want to find the smallest area triangle (co-ordinate of its 3 points) containing all the data point inside it. There are some concepts available for 2D data points, but I need to find this in 3D dimension.
It looks like Matlab has a function for this, convhull. You want to find the convex hull of the data set. http://www.mathworks.com/help/matlab/ref/convhull.html This function works for points in 2d or 3d space.