Find tangent planes from a given point outside a 3

2019-08-12 01:07发布

This question is the 3D version of the question posted below: Find tangent points on a curve from a user-given point outside the curve

Imagine a point (x0, y0, z0) outside a 3D curve. The tangent planes covers the surface on the curve which can be considered as the shadowed surface from a outside point source.

The 3D surface consists of multiple slices (contours) in the z direction. Each slice consists (x,y) points. In consistence, the 3D curve can be generated like below:

t = linspace(0,2*pi,100);
x1 = 10*cos(t) + sin(7*t);
y1 = 6*sin(t) + cos(13*t);        % x1,y1  describe the first contour;  
z1 = 0;

x2 = 5*cos(t) + 0.5*sin(7*t);
y2 = 3*sin(t) + 0.5*cos(13*t);      % x2,y2  describe the first contour; 
z2 = 1;

x3 = 20*cos(2*t) + 2*sin(t);
y3 = 12*sin(t) + 2*cos(13*t);     % x2,y2  describe the first contour; 
z3 = 2;

This can go on for different z values and x y contours. The result should be the x,y points ranges for each z value which looks like a shadow on the 3D curve. I am not sure about convexhull being useful here in the 3D case. Any suggestions? Thanks so much for your time!

To be clear, the figure below is an example of this problem. It has 8 contours in the z direction with z1, z2, ...., z8, each of which include a set of (x,y) points (closed contours in each slice). A outside point is set and the result of the tangent planes will be a cone that covers the 3D curve. The bottom of the cone is made up of a range of (x,y) points in EACH contour.

enter image description here

标签: matlab 3d shadow
0条回答
登录 后发表回答