daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest May 17th, 2018 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Numm[x_, b_] := Module[{s}, s = Sign[x]; s*Abs[x]^b]
  2.  
  3.     PlotSQ[a_, b_] := Module[{x1, x2, x3, x}, (
  4.         x1 = Numm[Cos[phi], a]*Numm[Sin[theta], b];
  5.         x2 = Numm[Sin[phi], a]*Numm[Sin[theta], b];
  6.         x3 = Numm[Cos[theta],b];
  7.         x = {x1, x2, x3};
  8.         ParametricPlot3D[x, {theta, 0, Pi}, {phi, -2 Pi, Pi},
  9.         PlotRange -> All, Exclusions -> None, PlotPoints -> 200,
  10.         Mesh -> {20, 20}, PlotTheme -> "Classic", Boxed -> False,
  11.         ImageSize -> Medium, Axes -> None, PlotStyle -> Opacity[.7]]
  12.      )];
  13.    
  14. Numm[x_, b_] := Module[{s}, s = Sign[x]; s*Abs[x]^b]
  15.  
  16. PlotSQ[a_, b_] :=
  17.   Module[{x1, x2, x3,
  18.     x}, (x1 = Numm[Cos[phi], a]*Numm[Sin[theta], b];
  19.     x2 = Numm[Sin[phi], a]*Numm[Sin[theta], b];
  20.     x3 = Numm[Cos[theta], b];
  21.     x = {x1, x2, x3};
  22.     ParametricPlot3D[x, {theta, 0, Pi}, {phi, -Pi, Pi},
  23.      PlotRange -> All, Exclusions -> None, PlotPoints -> 200,
  24.      Mesh -> {20, 20}, PlotTheme -> "Classic", Boxed -> False,
  25.      ImageSize -> Medium, Axes -> None, PlotStyle -> Opacity[.7],
  26.      Method -> {"BoundaryOffset" -> False},
  27.      EvaluationMonitor :> Sow[theta]])];
  28.  
  29. PlotSQ[1, 0.1]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top