Message Boards Message Boards

Graphing isosurfaces and field lines

Posted 1 year ago

enter image description here

POSTED BY: Chase Marangu
6 Replies

In the Ruliad, @Chase Marangu, Wolfram Ambassador! Force = Gradient Field of Potential Energy.

v[x_, y_, z_] := 
 Sum[1/Sqrt[(x - 10*Cos[i*105])^2 + (y - 10*Cos[i*39])^2 + (z - 
        10*Tan[i*22.1211])^2], {i, 1, 5}]
e[x_, y_, z_] := 
 Evaluate[(-1)*Grad[v[a, b, c], {a, b, c}] /. a -> x /. b -> y /. 
   c -> z]
plotSize = 10;
potentialColorFunction = Function[
   {x, y, z},
   RGBColor[0, 0.5 + 0.5*Sin[v[x, y, z]*30], 1]];
potentialPlot = ContourPlot3D[
   Evaluate[v[x, y, z]],
   {x, -plotSize, plotSize},
   {y, -plotSize, plotSize},
   {z, -plotSize, plotSize},
   Mesh -> None,
   ContourStyle -> Directive[
     RGBColor[0.1, 1, 1],
     Opacity@0.4,
     Specularity[White, 20]
     ],
   Contours -> 10
   ];
fieldPlot = StreamPlot3D[
   Evaluate[e[x, y, z]],
   {x, -plotSize, plotSize},
   {y, -plotSize, plotSize},
   {z, -plotSize, plotSize},
   StreamStyle -> "Line",
   StreamPoints -> Fine,
   StreamScale -> Full,
   PlotRange -> {{-plotSize, plotSize}, {-plotSize, 
      plotSize}, {-plotSize, plotSize}},
   BoxRatios -> {1, 1, 1},
   Boxed -> False,
   Axes -> None,
   Lighting -> "Neutral"
   ];
Show[fieldPlot, potentialPlot, ImageSize -> Large, PlotRange -> All, 
 Boxed -> False]

Oh that's a nice field this is the best thing that my eyes have ever seen. The demo of how to use the three builtin functions and I do sometimes, I find it useful.

Field Potential

When you go down to the foundations of things, drill down to the foundation in these scorched sands that's why it's so nice to see your post now. Before I get back to my day job you know what you want to do. Thanks for this you have made me feel wonderful.

POSTED BY: Dean Gladish
Posted 1 year ago

I'm so glad to hear you found my post valuable Dean Gladish! Keep experimenting!

POSTED BY: Chase Marangu

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Posted 1 year ago

Thank you!!

POSTED BY: Chase Marangu

Great post Chase! Amazing work - I can only imagine where this program can fall in any teaching or visualization setting! wow. It reminds me of Giuseppe's fluid flow project too...

POSTED BY: Theodore Mollano
Posted 1 year ago

Thanks so much Theo! It was just a simple demo of how to use the three builtin functions together, StreamPlot3D, ContourPlot3D, and Grad, but I am glad you found it useful. Giuseppe's fluid flow project was definitely pretty impressive.

POSTED BY: Chase Marangu
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract