Questions tagged [curve]

In mathematics, a curve (also called a curved line in older texts) is, generally speaking, an object similar to a line but which is not required to be straight.

1306 questions
11
votes
1 answer

How do i smooth the curves(contours) in OpenCV?

I am working on a black&white image just like the first one from the link : http://imageshack.us/g/33/firstwm.png/ It has a lot of "noise" so I applied a Median filter over it to smooth it, thus getting the second picture. cvSmooth(TempImage,…
Adrian
  • 2,028
  • 2
  • 17
  • 28
11
votes
2 answers

Playing perfect Tetris: how to align and scale two curves using scaling and translation?

Given parameters of scaling on the y axis (s) and translation on the x axis (t), how to scale and align two curves that do not coincide when the purpose is to maximize curve superposition (not minimize distance)? As indicated by @DWin, this could be…
Etienne Low-Décarie
  • 13,063
  • 17
  • 65
  • 87
10
votes
2 answers

Error with curve( ): 'expr' did not evaluate to an object of length 'n'

I have a function that has a vector in the numerator and the sum of the vector in the denominator. So each component is one component of the vector divided by a function that depends on the sum of the components. I want to plot a curve…
Dan
  • 101
  • 1
  • 1
  • 3
10
votes
3 answers

Calculating the bounding box of cubic bezier curve

I am trying to find an algorithm to calculate the bounding box of a given cubic bezier curve. The curve is in 3D space. Is there a mathematic way to do this except of sampling points on the curve and calculating the bounding box of these points?
Erik Sapir
  • 23,209
  • 28
  • 81
  • 141
10
votes
1 answer

Implementing De Boors algorithm for finding points on a B-spline

I've been working on this for several weeks but have been unable to get my algorithm working properly and i'm at my wits end. Here's an illustration of what i have achieved: If everything was working i would expect a perfect circle/oval at the…
Holly
  • 1,956
  • 6
  • 41
  • 57
9
votes
5 answers

How can I find equation of a plot connecting data points in Matlab?

I have various plots (with hold on) as show in the following figure: I would like to know how to find equations of these six curves in Matlab. Thanks.
user238469
9
votes
3 answers

Equidistant points across Bezier curves

Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping…
Cristián Romo
  • 9,814
  • 12
  • 50
  • 50
8
votes
3 answers

Center point on html quadratic curve

I have a quadratic curve drawn on html canvas using context.quadraticCurveTo(controlX, controlY, endX, endY); . I have the control-point and the starting and end points, which are not necessarily level with each other horizontally. How can I find…
me_digvijay
  • 5,374
  • 9
  • 46
  • 83
8
votes
2 answers

Extract (count) the points within a certain region of a ggplot

I have the following data. x_plus <- c(1.3660254, 1.1123724, 1.0000000, 0.9330127, 0.8872983, 0.8535534, 0.8273268, 0.8061862, 0.7886751, 0.7738613, 0.6936492, 0.6581139, 0.6369306, 0.6224745, 0.6118034, …
ZT_Geo
  • 403
  • 1
  • 11
8
votes
2 answers

Fréchet distance of 2 trajectories

Good Day, I have two different paths in a 2D plane. I want to compare these two paths with the Fréchet Distance. I know some points of the trajectories, each is connected to another point with a straight line. What's the smartest way to get the…
Max Kraus
  • 137
  • 3
  • 9
8
votes
2 answers

transparent shape with arrow in upper corner

Please see the image below. I want to add an arrow to the top right of a div which I am treating as editable input box. Please help me how I can achieve this using CSS. I cannot use a SVG since I need this as a div to show emoticons as images over…
firebolt_ash
  • 1,204
  • 4
  • 13
  • 21
8
votes
6 answers

AnimationCurve.Evaluate - Get time by value

Is there a build-in way how to get a time by value from Animation curve in Unity3d? (The opposite way of Evaluate) I need to achieve this (instead of getting value from time): float time = AnimationCurve.Evaluate(float value); Generically speaking…
David Horák
  • 5,535
  • 10
  • 53
  • 77
8
votes
2 answers

Draw curved custom object in LIBGDX?

I've recently been looking into LibGDX and seem to have hit a wall, seen in the picture, the blue dot represents the users finger, the map generation it self is where i seem to get stuck, does LibGDX provide a method of dynamically drawing curved…
Broak
  • 4,161
  • 4
  • 31
  • 54
8
votes
1 answer

Three.JS Object following a spline path - rotation / tanget issues & constant speed issue

I think my issue is similar to: Orient object's rotation to a spline point tangent in THREE.JS but I can't access the jsfiddle's properly and I struggled with the second part of the explanation. Basically, I have created this jsfiddle:…
jayfield1979
  • 355
  • 1
  • 5
  • 16
8
votes
3 answers

Terrain curve to array of points

In my 2D game I'm using graphic tools to create nice, smooth terrain represented by black color: Simple algorithm written in java looks for black color every 15 pixels, creating following set of lines (gray): As you can see, there's some places…
Adrian Adamczyk
  • 3,000
  • 5
  • 25
  • 41
1 2
3
86 87