Ask Your Question

Intersection of implicitely defined surfaces

asked 2019-09-16 22:36:53 +0200

Ingo gravatar image

updated 2019-09-17 19:54:02 +0200

FrédéricC gravatar image

Is there a general way to visualize the space curve defined by the intersection of 2 implicitely defined surfaces?

I know, this has been discussed here before with the following suggested solutions:

  1. Visualize all equations in the same plot - this has the disadvantage that surfaces - even if opaque, distract attention and may obstruct the view on the intersection curves

  2. Combine the defining equations into a system of euations and solve it, present the solutions as parametric plots - this doesn't work with complex surfaces where Sage cannot solve the system.

I know, some 3D objects have an intersection() method, but apparently not those generated by implicit_plot3d. But maybe, someone has another solution?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-09-17 09:09:55 +0200

FrédéricC gravatar image

There is a recent new method that could be useful:

        sage: P = implicit_plot3d(x**4+y**4+z**2-4,(x,-2,2),(y,-2,2),(z,-2,2),alpha=0.3)
        sage: def cut(a,b,c):
        ....:     return a*a+c*c > 2
        sage: Q = P.add_condition(cut,40); Q
edit flag offensive delete link more


That example yields in SageCell and in CoCalc

AttributeError: 'sage.plot.plot3d.implicit_surface.ImplicitSurface' object has no attribute 'add_condition'

Ingo gravatar imageIngo ( 2019-09-18 14:04:22 +0200 )edit

This will be in sage 8.9 coming soon. Or you need to compile the latest develop version.

FrédéricC gravatar imageFrédéricC ( 2019-09-18 14:06:19 +0200 )edit

In Cocalc, you can use the kernel "SageMath (Developement, python3)".

FrédéricC gravatar imageFrédéricC ( 2019-09-18 14:16:24 +0200 )edit

I have just checked and it works fine in Cocalc with the development kernel.

FrédéricC gravatar imageFrédéricC ( 2019-09-18 16:48:52 +0200 )edit

I confirm your example works in CoCalc with developement kernel. It intersects a surface defined by an equation with a region defined by an inequality. When I replace the inequality with an equation to view the curves on the intersection of both manifolds I see nothing. Can I get that with some other parameters?

Moreover, in Cocalc with the development kernel I get another warning that hurts my document:

show(LatexExpr("f_r(x,y)=\Re(f(x+iy))=")) yields a deprecation warning without a hint how to correct it:

DeprecationWarning: invalid escape sequence \R

Ingo gravatar imageIngo ( 2019-09-18 22:22:55 +0200 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2019-09-16 22:36:53 +0200

Seen: 251 times

Last updated: Sep 17 '19