How can I draw plane distributions in $\mathbb{R}^3$?

321 Views Asked by At

I see so many nice pictures of contact structures, integrable plane distributions, etc., in manuscripts and online and I have absolutely zero idea how they're made. For example, the following image was posted on Tumblr (source unknown):

enter image description here

I was able to gather some information online.

For instance, if I go to the Wikipedia page on Contact geometry, there's an image of a contact structure on $\mathbb{R}^3$, the notes on which say Generated with MetaPost and Inkscape. I have some experience with Inkscape but ideally, I'd like to find a solution that can take a form (e.g. $dz - y dx$ for the Wiki picture) and automate the drawing without me having to draw a hundred little rectangle "planes" and manually position them, etc.

I also took look through the online Mathematica documentation to see what was available there...I'm sure there's a solution out there, but without asking someone, I just can't seem to find it on my own.

Any information would be hugely appreciated!

1

There are 1 best solutions below

3
On BEST ANSWER

I doubt you'll find a ready-to-go solution for this type of plot - odds are you'll have to roll your own to some extent. Here's a quick starting point in Mathematica:

slopefield

SlopeSquare[x_, y_, xs_, ys_, size_: 1, z_: 0] := With[{
    x1 = x - size, y1 = y - size, x2 = x + size, y2 = y + size, 
    pt = ({#1, #2, z + xs (#1 - x) + ys (#2 - y)} &)}, 
    Polygon[{pt[x1, y1], pt[x1, y2], pt[x2, y2], pt[x2, y1]}]]

Graphics3D[Flatten@Table[
    SlopeSquare[x, y, -y, 0, 0.09], {x, -2, 2, 0.2}, {y, -2, 2, 0.2}], 
    PlotRange -> {All, All, {-2, 2}}, Boxed -> False]

It's pretty rough - for example these rectangles are drawn with constant projection onto the x-y plane rather than with constant size, and it only works for forms of the form $dz + \texttt{xs} dx + \texttt{ys} dy$. Hopefully you get the idea and can work out how to tweak it to your liking.