Ask Your Question
0

How to get the points from a contour plot object?

asked 2020-02-22 20:28:36 +0100

jaykru gravatar image

I've defined a plot object for the hyperboloid in R^(-1,1).

hyperboloid = region_plot(-x^2+y^2 == 1, (x,-3,3),(y,-3,3))

I want to reflect this hyperboloid across a plane, and to do that I can't think of a better way than to somehow extract the points from the ContourPlot object behind the hyperboloid and then apply a reflection transformation to each point, then plot the points I get back. How do I get the points backing the plot? If that's not possible, or if there is a better way, how can I achieve my desired reflection?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-23 04:13:52 +0100

Juanjo gravatar image

I don't understand what it is $R^{(-1,1)}$ and, IMHO, an hyperboloid is a surface, so it should be traced in 3D. In such a case, you can play with translations, scales and rotations to apply reflections. For example, this code plots a one sheet hyperboloid and mirrors it on the plane $y=2$:

var("x,y,z")
p = implicit_plot3d(x^2+y^2-z^2==1, (x,-2,2), (y,-2,2), (z,-1.5,1.5), color="green")
q = p.translate([0,-2,0]).scale([1,-1,1]).translate([0,2,0])
plane = implicit_plot3d(y==2,(x,-2,2), (y,-2,2), (z,-1.5,1.5), color="orange")
show(p+q+plane)

image description

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-02-22 20:28:36 +0100

Seen: 293 times

Last updated: Feb 23 '20