Questions tagged [ellipse]

In geometry, an ellipse is a plane curve that results from the intersection of a cone by a plane in a way that produces a closed curve. Circles are special cases of ellipses. An ellipse is also the locus of all points of the plane whose distances to two fixed points add to the same constant.

In geometry, an ellipse (from Greek ἔλλειψις elleipsis, a "falling short") is a plane curve that results from the intersection of a cone by a plane in a way that produces a closed curve. Circles are special cases of ellipses, obtained when the cutting plane is orthogonal to the cone's axis. An ellipse is also the locus of all points of the plane whose distances to two fixed points add to the same constant.

Ellipses are closed curves and are the bounded case of the conic sections, the curves that result from the intersection of a circular cone and a plane that does not pass through its apex; the other two (open and unbounded) cases are parabolas and hyperbolas. Ellipses also arise as images of a circle under parallel projection and the bounded cases of perspective projection, which are simply intersections of the projective cone with the plane of projection. It is also the simplest Lissajous figure, formed when the horizontal and vertical motions are sinusoids with the same frequency.

755 questions
171
votes
21 answers

android ellipsize multiline textview

I need to ellipsize a multi-line textview. My component is large enough to display at least 4 lines with the ellipse, but only 2 lines are displayed. I tried to change the minimum and maximum number of rows of the component but it changes nothing.
Arutha
  • 24,390
  • 25
  • 64
  • 80
24
votes
7 answers

distance from given point to given ellipse

I have an ellipse, defined by Center Point, radiusX and radiusY, and I have a Point. I want to find the point on the ellipse that is closest to the given point. In the illustration below, that would be S1. Now I already have code, but there is a…
user2950911
  • 743
  • 2
  • 9
  • 18
23
votes
3 answers

Plot Ellipse with matplotlib.pyplot (Python)

Sorry if this is a stupid question, but is there an easy way to plot an ellipse with matplotlib.pyplot in Python? I was hoping there would be something similar to matplotlib.pyplot.arrow, but I can't find anything. Is the only way to do it using…
hjweide
  • 9,575
  • 8
  • 39
  • 48
21
votes
2 answers

How can a data ellipse be superimposed on a ggplot2 scatterplot?

I have an R function which produces 95% confidence ellipses for scatterplots. The output looks like this, having a default of 50 points for each ellipse (50 rows): [,1] [,2] [1,] 0.097733810 0.044957994 [2,] 0.084433494 …
radu
  • 231
  • 1
  • 3
  • 7
20
votes
5 answers

How to calculate center of an ellipse by two points and radius sizes

While working on SVG implementation for Internet Explorer to be based on its own VML format I came to a problem of translation of an SVG elliptical arc to an VML elliptical arc. In VML an arc is given by: two angles for two points on ellipse and…
Sergey Ilinsky
  • 29,849
  • 9
  • 51
  • 56
19
votes
3 answers

In XAML, how can I keep an ellipse being a circle?

I'm getting XAML-blind I'm afraid. I'm developing a MS Surface application and I have an ellipse inside a ScatterViewItem (a container an end user can resize). I would like to keep the ellipse a circle (width == height) and keep it as big as…
Bart Roozendaal
  • 765
  • 2
  • 8
  • 21
18
votes
5 answers

Point and ellipse (rotated) position test: algorithm

How to test if a point P = [xp,yp] is inside/outside some rotated ellipse given by the centre C=[x,y], a, b, and phi ( angle of rotation)? At this moment I am using the following solution: rotate ellipse and point by the angle -phi and then the…
justik
  • 3,561
  • 5
  • 26
  • 47
18
votes
2 answers

How can I draw a circle sector with the ellipse class?

I would like to make a sector of a circle on WP7. I tried to do this with the ellipse class and I found a lot of solution, which make a gauge or pie chart or something, but I need just the essence. Could anyone help? the aim is to show just one part…
laszlokiss88
  • 3,883
  • 2
  • 17
  • 25
17
votes
5 answers

Approximating an ellipse with a polygon

I am working with geographic information, and recently I needed to draw an ellipse. For compatibility with the OGC convention, I cannot use the ellipse as it is; instead, I use an approximation of the ellipse using a polygon, by taking a polygon…
Gilthans
  • 1,434
  • 1
  • 14
  • 23
16
votes
3 answers

Ellipse around the data in MATLAB

I would like to reproduce the following figure in MATLAB: There are two classes of points with X and Y coordinates. I'd like to surround each class with an ellipse with one parameter of standard deviation, which determine how far the ellipse will…
yuk
  • 18,503
  • 9
  • 62
  • 92
13
votes
3 answers

WPF Binding to change fill color of ellipse

How do I programmatically change the color of an ellipse that is defined in XAML based on a variable? Everything I've read on binding is based on collections and lists -can't I set it simply (and literally) based on the value of a string variable? …
user294382
  • 1,699
  • 3
  • 10
  • 7
12
votes
2 answers

Python Fit ellipse to an image

I have a webcam feed using OpenCV, and I am trying to fit an ellipse in real time. The code I am using at the moment works, but it fails to fit an ellipse to the image a lot of the time. What other methods of ellipse fitting to an image can I…
Sam
  • 944
  • 3
  • 11
  • 30
11
votes
2 answers

Python PIL: How to draw an ellipse in the middle of an image?

I seem to be having some trouble getting this code to work: import Image, ImageDraw im = Image.open("1.jpg") draw = ImageDraw.Draw(im) draw.ellipse((60, 60, 40, 40), fill=128) del draw im.save('output.png') im.show() This should draw an ellipse…
Tommo
  • 1,015
  • 2
  • 12
  • 20
11
votes
2 answers

Check if points are inside ellipse faster than contains_point method

I use matplotlib 1.15.1 and I try to generate scattergrams like this: The ellipses have fixes size and are drawn with center coordinates, width, height and angle (provided from outside): I have no idea what their equotions are. g_ell_center =…
Maroth
  • 175
  • 2
  • 6
10
votes
3 answers

How do I draw an ellipse with arbitrary orientation pixel by pixel?

I have to draw an ellipse of arbitrary size and orientation pixel by pixel. It seems pretty easy to draw an ellipse whose major and minor axes align with the x and y axes, but rotating the ellipse by an arbitrary angle seems trickier. Initially I…
amc
  • 289
  • 3
  • 15
1
2 3
50 51