Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a very hackish approach: Grab the mesh lines in the output and look for intersections. It is quite doable since the output is a <code>GraphicsComplex</code>.<br> First, find the indices of the mesh line points in the graphics complex:</p> <pre><code>g=Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2},Mesh-&gt;{1,4},Boxed-&gt;False]; meshlineptindices=First/@Cases[g, _Line, Infinity] </code></pre> <p>Now, go through the lines pairwise and look for intersections. The following, uses <code>NestWhile</code> to recursively look at all pairs (first line, another line) for shorter and shorter sublists of the original list of meshlines. The resulting intersections are returned via <code>Sow</code>: </p> <pre><code>intesectionindices= Flatten@Reap@NestWhile[( Sow@Outer[Intersection,{First[#]},Rest[#],1]; Rest[#] )&amp;, meshlineptindices, Length[#]&gt;0&amp;] Out[4]= {1260,1491,1264,1401,1284,1371,1298,1448,1205,1219,1528,1525,1526,1527} </code></pre> <p>Look up the indices in the <code>GraphicsComplex</code>:</p> <pre><code>intesections = Part[g[[1,1]],intesectionindices] Out[5]= {{-3.,-1.2,-0.997667},{3.,-1.2,-0.961188},&lt;...&gt;,{0.,1.2,0.977754}} </code></pre> <p>Finally, show the points together with original graphics:</p> <pre><code>Show[g,Graphics3D[{Red,PointSize[Large],Point[intesections]}]] </code></pre> <p><img src="https://i.stack.imgur.com/Uu7KC.png" alt="output graphics"></p> <p>HTH</p> <p><strong>Update</strong>: To get the colored points, you could just use </p> <pre><code>Graphics3D[{PointSize[Large],({colorfunction[Last@#],Point[#]}&amp;)/@intesections]}] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload