2

I'm trying to draw the intersection of a plane with a hyperboloid with asymptote. The result should either be 2 crossing lines or a conic (ellipse, circle or parabola).

Heres the code:

settings.outformat="png";
settings.render=8;
size(200);
import solids;


currentprojection=perspective(0,-5,3);
revolution hyperboloid=revolution(graph(new triple(real z) {
  return (sqrt(1+z*z),0,z);},-2,2,20,operator ..),axis=Z);

draw(surface(hyperboloid), surfacepen=material(diffusepen=white+opacity(0.6),emissivepen=gray(0.6)));

draw(hyperboloid,12,black+0.3pt,longitudinalpen=0.1pt+black);


path3 p=plane((0,6,0),(0,0,6),O=(1,-3,-3));
draw(p);

I have tried intersectionpoints but the code doesnt work.

3

Up to now the intersection of two surfaces is not present in Asymptote. From a mathematical and numerical point of view it is a difficult problem, it needs a lot of computations. You are welcome to implement it :) I am not a specialist of this subject but if any person has a not-too-difficult method to implement Bezier patch intersection I am interested with the reference.

Only intersection surface/path3 is available.

In your specific case, perhaps that you are able to find the equation of the intersection.

  • 2
    Actually, finding the intersection of two surfaces is easier if one of them is implicitly defined, since you can use the contour module. See my code for surfacepaths.asy in tex.stackexchange.com/a/159365/484 – Charles Staats Nov 24 '14 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.