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
6
votes
4 answers

How to generate this kind of random curves?

Is it possible to generate this kind of random curves? I've tried IMagick bezier curves (see http://www.php.net/manual/en/function.imagickdraw-bezier.php), but even with 20-30 points they do not look like this. Here is my sample…
Kirzilla
  • 16,368
  • 26
  • 84
  • 129
6
votes
3 answers

How to make curved bottom appBar in Flutter?

How to draw custom shape for the appBar in my application to look like the image?
ialyzaafan
  • 378
  • 6
  • 21
6
votes
2 answers

iOS - Dragging objects along curved paths

I am tearing my hair out trying to figure out what seems to be a very easy problem. I know a lot of this stuff has been talked about tangentially, so apologies if this treads on well-covered ground, but I can't find anything specific to my solution…
6
votes
2 answers

Filling area under the curve with matplotlib

I have a pandas series, and this is the graph: I want to fill the area under the curve. The problem is that calling plt.fill(y) outputs: As seen in other answers, this is because we need to send a polygon to the function, so we have to add a…
Alexis
  • 394
  • 4
  • 14
6
votes
4 answers

How to a make a curved sheet (cube) in OpenSCAD?

How can I curve a sheet (cube)? I'd like to control the angle of the bend/curve. e.g. cube([50,50,2]);
R OMS
  • 652
  • 2
  • 7
  • 19
6
votes
1 answer

Curving text in Android

I'm creating a text editing app that allows the user to edit text using different fonts, colors, sizes, etc. Right now I'm working on a feature that is supposed to curve the text. I already tried asking once HERE but the answer that was posted…
Marc Karam
  • 445
  • 6
  • 22
6
votes
4 answers

How to detect in real time a "knee/elbow" (maximal curvature) in a curve

In the following curve (blue line) I'm trying to detect the "knee/elbow" which should be located around x = 2.5 This is the set of values I'm using: x = {-10, -9, -8, -7, -6, -5, -4, -3, -2 , -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} y = {0, 10, 20,…
Marco
  • 391
  • 4
  • 18
6
votes
6 answers

Drag a bezier curve to edit it

You will understand what I mean if you use graphic editing programs like Gimp or Photoshop. To edit a curve on those programs (which probably is Bezier Curve), we can click on the curve, drag the mouse and the curve is changed accordingly. I suspect…
wakandan
  • 1,099
  • 4
  • 19
  • 27
6
votes
1 answer

Why is 'curve' so different from 'lines' and 'points' in R?

I would like to fit the frequency data with discrete generalized beta distribution (DGBD). The data look like this: freq = c(1116, 2067, 137 , 124, 643, 2042, 55 ,47186, 7504, 1488, 211, 1608, 3517 , 7 , 896 , 378, 17 ,3098,…
Frank Wang
  • 1,462
  • 3
  • 17
  • 39
6
votes
2 answers

Plotting a polynomial in Python

I am new to Python plotting apart from some basic knowledge of matplotlib.pyplot. My question is how to plot some higher degree polynomials? One method I saw was expressing y in terms of x and then plotting the values. But I have 2 difficulties: y…
Ally
  • 73
  • 1
  • 1
  • 4
6
votes
1 answer

Matplotlib, adding text with more than one line. Adding text that can follow the curve

I have added text to a plot, coded in each line, and then adjusted it look decent, increase or decrease the width, or change the placement. However, is there a way to have Python know where you want the text and how you want it set? Then I could…
dustin
  • 4,309
  • 12
  • 57
  • 79
6
votes
1 answer

How to draw parametric 3d curve with smoothing in R?

I have the data which are parametric 3d curve: t x y z 0.000 3.734 2.518 -0.134 0.507 2.604 9.059 0.919 0.861 1.532 11.584 -0.248 1.314 1.015 1.886 -0.325 1.684 2.815 4.596 3.275 1.938 …
midas
  • 1,758
  • 2
  • 20
  • 20
6
votes
1 answer

Javascript canvas curve with fixed length

I want to draw any ( randomized ) curve, with given: start point end point curve length How can I do such a thing limited by canvas boundaries, plus the curve can not cross. I was trying to find some solution but I can't figure this out. Thanks…
Trouble
  • 428
  • 3
  • 21
6
votes
0 answers

Way to draw NSString on a curved path?

I have been looking for any example code for drawing a UILabel (or just an NSString or something) on a curved path, but have come up empty handed. Does anyone know whether it's possible to draw text on a curved path, like a circle or something,…
runmad
  • 14,846
  • 9
  • 99
  • 140
6
votes
3 answers

A simple closed polygonal curve generation algorithm

I need an algorithm to generate a closed simple (no self-intersections) polygonal curve. It would make a perfect labyrinth for my game. Can you please point me to the correct keywords?
Hedin
  • 630
  • 3
  • 8
  • 19