[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 7 KB, 401x163, path3882.jpg [View same] [iqdb] [saucenao] [google]
4346539 No.4346539 [Reply] [Original]

How do i calculate the curve that surrounds a set of random points as show in the pic

>> No.4346543

Give a mathematical description of the curve.

>> No.4346549

>>4346543
It looks as tough it's meant to be the curve that coms closest to the set of points without being closer than some some radius to any single point.

>> No.4346551

it has to be on the outside of all the points, and should be at minimum of x distance from any given point

>> No.4346552

1. Find an equation for the curve.
2. Parametrize x and y with respect to some variable t.
3. Calculate <span class="math">\int \sqrt{(x')^2+(y')^2} dt[/spoiler]

>> No.4346555

is there a name for this type of curve? Its kinda like how water droplets join together

>> No.4346557

I know how I would do it in programming in just math I can't. But in programming you would first get all maximum points by setting the centre of the points as the grids zero point. Then you can get all the points that are the farthest away from zero by using the square root to calculate the distance. And the plot a line through all the points and you'll ended up with your line.

>> No.4346562

>>4346557
Sorry, I just had to call you out on this. Your post is so fucking retarded that I truly believe you must be a cs major.

>> No.4346563

could u give any pseudocode for doing that

>> No.4346571

>>4346557
not exactly what i want

>> No.4346579
File: 11 KB, 128x128, avatar_6feb8634e3d0_128[1].png [View same] [iqdb] [saucenao] [google]
4346579

<span class="math">
\vec{\overline{x}} := 1/N \sum^{n}_{k=1} \vec{x}_{k}
d = max\{||\vec{\overline{x}}-\vec{x}_{k}|| : 1 \seq k \geq n}
\gamma (t) = \vec{\overline{x}}+(d+\epsilon)\cdot (cos(t),sin(t))^{T}
\epsilon > 0
t\in [0,2 \pi]
[/spoiler]

Problem ?

Problem

>> No.4346583

<span class="math">
\vec{\overline{x}} := 1/N \sum^{n}_{k=1} \vec{x}_{k}
d = max\{||\vec{\overline{x}}-\vec{x}_{k}|| : 1 \leq k \geq n}
\gamma (t) = \vec{\overline{x}}+(d+\epsilon)\cdot (cos(t),sin(t))^{T}
\epsilon > 0
t\in [0,2 \pi]
[/spoiler]

Problem ?

>> No.4346586

>>4346579
>>4346583
>autist thinks he's funny

>> No.4346648

>>4346571
you could just see where the middle point m is, take the distance to the point that is the furthest away, call this distance r and do something like this:
<span class="math"> [0,2 \pi)\ni t \mapsto m+(r+1) \cdot (cos(t),sin(t))^T \in \mathbb{R}^2 [/spoiler]

>> No.4346660

>>4346648
He doesn't want a circle.

>> No.4346689

If I understand your picture the curve will have to be piecewise defined anyway. So here's an algorithm to find it:
1) Draw circles around each point.
2) Take outside segments only.

>> No.4346724

>>4346689
Right. Although depending on the exact formulation of the problem, such curve either doesn't always exist, or isn't always unique.

>> No.4346849

here's an algo...were I an engineer or surveyor tasked with laying out a road or forming a lakeshore on this curve I would:

1. take an average distance between boundary elements in the set (point cloud) as a start for an iterative approach to find the minimum distance needed for R of a 360-degree compound circular curve (I suppose I could also divide max boundary segment by 2)

2. with R, I can compute dist/dist intersects on a Cartesian plane (or measure boundary point distances physically and assume a convenient Cartesian plane), from which I can determine the Lengths of the segments of the compound circular curve.

3. with both R and L of all the segments known, as well as their respective radius points, I can assign stationing for my number line (360-degree compound curve) arbitrarily, and then measure/mark any point on my 360-degree compound circular curve from any other known point by simple coordinate geometry on a simple Cartesian plane

>> No.4346861

herp de derp...anyone know the formula for a polyline?

>> No.4346873

>>4346849
I think he was asking for a programmable algorithm, but I may be wrong. Nothing wrong with your solution otherwise.

>> No.4346967

>>4346539
1. draw all the circles and find intercepts between them, tagging each intercept with the circles it belongs to

2. find the convex hull of the set of points where the intercepts occur

3. link each of the points on the edge of it's hull to the next point also on the hull using an circular arc with centre of the curve being the centre of the circle tagged on both the points

other than the difficulty of handling sets of one or two points, any problems with this plan?

>> No.4347636

The algorithms don't work in the case of infinitely many points, but the idea seems about right.

>> No.4347729

>>4347636
how would you put infinitely many points as an input for algorithm?