Menu

Plotting a polar surface

Help
2022-03-29
2022-03-29
  • Alan Bromborsky

    Alan Bromborsky - 2022-03-29

    I have a surface that I can efficiently calculate (within Asymptote) as a function of r and theta. It is inefficient (slow) to calculate it as a function of x and y (it involves the Bessel functions K and I). In the documentation I could not find a way to plot it directly on the polar grid I calculate it on. Am I missing a capability of Asymptote plotting functions or is there another way of using the data I generate on the polar grid? Thanks in advance for any help you can offer.

     
  • John Bowman

    John Bowman - 2022-03-29

    As mentioned in the documentation, you can use one of these functions to draw a parametric surface (say with u=r and v=theta):

    surface surface(triple f(pair z), real[] u, real[] v,
                    splinetype[] usplinetype, splinetype[] vsplinetype=Spline,
                    bool cond(pair z)=null);
    surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
                    bool cond(pair z)=null);
    surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int nv=nu,
                    splinetype[] usplinetype, splinetype[] vsplinetype=Spline,
                    bool cond(pair z)=null);
    
     
    • Alan Bromborsky

      Alan Bromborsky - 2022-03-29

      Dumb me.  Of course a parametric surface.  Thank you.

      On 3/29/22 1:38 PM, John Bowman wrote:

      As mentioned in the documentation, you can use one of these functions
      to draw a parametric surface (say with u=r and v=theta):

      |surface surface(triple f(pair z), real[] u, real[] v, splinetype[]
      usplinetype, splinetype[] vsplinetype=Spline, bool cond(pair z)=null);
      surface surface(triple f(pair z), pair a, pair b, int nu=nmesh, int
      nv=nu, bool cond(pair z)=null); surface surface(triple f(pair z), pair
      a, pair b, int nu=nmesh, int nv=nu, splinetype[] usplinetype,
      splinetype[] vsplinetype=Spline, bool cond(pair z)=null); |


      Plotting a polar surface
      https://sourceforge.net/p/asymptote/discussion/409349/thread/24788eb9e1/?limit=25#643f


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/asymptote/discussion/409349/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.