Finding the tangent point of a circle, connected to another point on the plane - openscad

If I have a circle of radius x with known coordinates for the center of the circle, and another point P on the coordinate grid, how do I find two coordinates points on the circle so that they create two tangent lines when connected to P?
I don't want a code sample, rather I just need to steps to figure it out myself :)
(I already saw the other answers on other questions, but those don't go into detail about how it works)

Related

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.

Intersection between two 3D surfaces

I have two independent 3D shapes; one is a square and another is a cone.
Let's assume the cone lies inside the square. How can I find out that the surface of the cone touches the square's surface when I move the cone in any direction?
It will be helpful if anyone can suggest an algorithm to check whether the surface touches another shape.
I am working with MATLAB, but the underlying logic will be appreciated in any language will be appriciated.
https://in.mathworks.com/matlabcentral/answers/367565-findout-surface-to-surface-intersection-between-two-3d-shapes
There is a relatively easy solution, thanks to the fact that the truncated cone is a convex shape, and finding its AABB is not so hard.
First rotate space so that the cube become axis aligned (and the cone in arbitrary position). Then to find the AABB of the base, is suffices to get the maxima an minima of the coordinates, using the parametric equation, C + R cos t + R' sin t, where C is the position vector of the center, and R, R' two orthogonal radii. You find the limit angles by canceling the derivative.
After finding the extrema on the three coordinates, the global bounding box is the one that surrounds these six points plus the apex.
By comparing the AABB to the cube, you can tell what distance remains before a collision, in any direction.

Best way to find the coordinates between two points?

So I'm trying to find the location between point A & B. Point A will be my phone and point be will be a dot on a small object. Point A is a point in the middle of my phone with an X/Y axis. Using the front facing camera on an iPhone, point B attached to the small object, moves into the cameras view. Point B will never be more than a foot away from point A at any time.
Is it possible to determine the exact coordinates of point B in relation to point A's X/Y axis (Within a millimeter or so)? Would a signal need to be sent between the two points, or would the camera be able to pick up point B and determine its coordinates on point A's X/Y axis?
I've attached an image below to hopefully explain what I am trying to describe a little better.
The coordinates of two points are A(-6, 0) and B(10, 4). Find the coordinates of the point C on the y-axis such that AC=BC.

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

Plot 3 D cube around interest point in 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.