ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 22 Feb 2020 19:11:41 +0100Fill intersection of multiple ellipseshttps://ask.sagemath.org/question/50023/fill-intersection-of-multiple-ellipses/I'm plotting multiple ellipses via the ellipse() function. I want to only fill the area where they all overlap. I see there are many options for plotting and filling. However, all the examples I've seen refer to other types of plots that would not be compatible with ellipses. Is there a way to automatically fill the overlapping area of multiple ellipses without pre-calculating this area?
For example, two of the ellipse functions would be:
4.31814496201205*x^2 + 0.442360403122904*x*y + 0.0424448964961035*y^2 - 0.170411375833593*x - 0.0205526646997484*y - 2.4358560850288997
ellipse((0.01, 0.19), 8.86, 0.75, 92.96*pi/180)
7.81630506700337*x^2 - 47.0795923749769*x*y + 72.3295112191380*y^2 + 8.78879644990554*x - 27.0144183395227*y + 0.1289109700897777
ellipse((0.01, 0.19), 4.13, 0.17, 18.06*pi/180)mattbSat, 22 Feb 2020 19:11:41 +0100https://ask.sagemath.org/question/50023/Funny ellipsehttps://ask.sagemath.org/question/33447/funny-ellipse/ I am trying to plot an ellipse (using the term loosely). I want the set of points equidistant from the plane defined parametrically by (0, 0, 1) + t(0, 1, 1) + s(1, 1, 1).
It is intuitive that this is just the union of two parallel planes. But when I plot, I get an oval...what is wrong? Note that uncommenting to change the vectors gives two planes as expected, furthering my bewilderment.
posvec = vector([0, 0, 1])
# posvec = vector([1, 1, 1])
dirvec1 = vector([1, 1, 0])
# dirvec1 = vector([-1, 2, 0])
dirvec1 = dirvec1 / dirvec1.norm()
dirvec2 = vector([1, 1, 1])
# dirvec2 = vector([3, 0, -7])
dirvec2 = dirvec2 / dirvec2.norm()
point = vector([x, y, z])
relpos = point - posvec
disvec = relpos - relpos.dot_product(dirvec1) * dirvec1 - relpos.dot_product(dirvec2) * dirvec2
dis = disvec.norm()
radius = 10
my_ellipse = implicit_plot3d(10 - dis, (x, -15, 15), (y, -15, 15), (z, -15, 15), opacity = 0.3)
s, t = var('s, t')
my_focus = parametric_plot3d(posvec + t * dirvec1 + s * dirvec2, (t, -15, 15), (s, -15, 15), opacity = 0.3, color = 'red')
my_pic = my_focus + my_ellipse
my_picTumericTJThu, 19 May 2016 05:31:21 +0200https://ask.sagemath.org/question/33447/Plot circle or ellipse with equation?https://ask.sagemath.org/question/10311/plot-circle-or-ellipse-with-equation/Given the standard equation of a circle:
x^2 + y^2 + 7*x - 2*y + 6 = 0 --Simplified-to--> (x+7/2)^2 + (y-1)^2 = 29/4
Standard formula of a circle: (x + (-h))^2 + (y + (-k))^2 = r^2
The center is represented by (h, k); radius by sqrt(r^2).
So my first question is, is there are way I could insert either of the 1st 2 equations and have Sage 5.9 generate the circle?
My second question similarly deals with an ellipse that has the simplified equation:
((x+2)^2)/9 + ((y-1)^2)/25 = 1
Its major axis is: (-2,-4) (-2,6)
Minor axis is: (-5,1) (1,1)
Standard form of an ellipse is: ((x - (-h))^2)/b^2 + ((y + (-k))^2)/a^2
Center is determined by analyzing the differences between the x2/x1, y2/y1 coordinates of the major or minor axis (i.e. midpoint formula).
Could I generate an ellipse baed on the simplified equation?
In case anyone's interested, the following thread has an unanswered question:
http://ask.sagemath.org/question/2764/graph-based-on-y-value-as-the-input-and-x-as-thebxdinTue, 02 Jul 2013 14:24:51 +0200https://ask.sagemath.org/question/10311/