Caveat: Mathematica version 3.0. if (or when) it matters.

I define a 3D-object with ParametricPlot3D, say, the following:


This is rendered just fine, I can save and use it (in eps-format) in my TeX-docs just fine. But the surface is kinda crowded with the meshlines, and I want to draw my students attention to the curves I draw on this surface anyway. Therefore the meshlines are a nuisance and must go. But how to render this without them? Listing some options...

  1. RTFM. Searching in the help gives promising hits such as EdgeForm[], Mesh->None et cetera, but none seem to work with ParametricPlot3D. I tried to print tube using FullForm in order to strip the Graphics3D-header, and insert an EdgeForm[] at the beginning, but something went wrong, and I'm not experienced enough Mathematica user to really figure that out.
  2. Look from Wolfram's on-line help. It lists Mesh->None as an option of ParametricPlot3D, but that must (?) refer to a newer version, as it didn't work with mine.
  3. Do it yourself! I like to think I'm enough of a programmer to build the required list of polygons myself, and insert the EdgeForm[]-command there. But this is a lot of work, and I'm kinda in a hurry.
  4. Upgrade? I work at a Uni. I could get to use a departmental license for an upgraded version. But then I would be behind the license-daemon, couldn't easily use it at home et cetera. That's the charm of the old license for version 3.0, when all you had to do was to inser your activation code (or whatever).
  • $\begingroup$ your uni doesn't have VPN? $\endgroup$ – rm -rf May 2 '12 at 18:45
  • $\begingroup$ @R.M. The last time I tried it I ran into some kind of problems. Cisco VPN and F-Secure virus protection didn't like each other. There were other problems, too. Undoubtedly they have worked on those. May be I should keep asking questions? $\endgroup$ – Jyrki Lahtonen May 2 '12 at 20:26
  • $\begingroup$ Well, maybe you could get them to find you a solution... I don't think you really enjoy using v3 at home and v8 at work ;) $\endgroup$ – rm -rf May 2 '12 at 20:29

This appears to work for older versions of Mathematica

tube /. Polygon[a__]:> {EdgeForm[], Polygon[a]}
| improve this answer | |
  • 2
    $\begingroup$ There's also Insert[ParametricPlot3D[2 {Cos[t], Sin[t], u}, {t, 0, 2 Pi}, {u, -5, 5}], EdgeForm[], {1, 1}]. $\endgroup$ – J. M.'s discontentment May 2 '12 at 16:26
  • $\begingroup$ @J.M. are that kind of tricks explained somewhere in Mathematica Book? Looks like it is a time for a refresher course. $\endgroup$ – Jyrki Lahtonen May 2 '12 at 20:30
  • $\begingroup$ I'm far away from my copy, @Jyrki, but I believe it should be there somewhere... (though I have to agree that the book's thickness is a bit intimidating.) $\endgroup$ – J. M.'s discontentment May 2 '12 at 20:38

Actually, in old versions of Mathematica, one can do something like this:

ParametricPlot3D[{2 Cos[t], 2 Sin[t], 2 u, EdgeForm[]}, {t, 0, 2 Pi}, {u, -5, 5}];

That is to say, one can use a list of length 4 as an argument to ParametricPlot3D[], where the first three components are the curve or surface to be plotted, and the fourth component is a directive or a list of directives.

| improve this answer | |
  • $\begingroup$ Now I'll go look for my version 3 copy... $\endgroup$ – Jens May 2 '12 at 14:14
  • $\begingroup$ Personal note: I remember this precisely because I like my surfaces mesh-less and colored, and thus I became very familiar with the four-component list as a ParametricPlot3D[] argument... $\endgroup$ – J. M.'s discontentment May 2 '12 at 14:17
  • $\begingroup$ I tested this in V4.2, which is as far back as I can easily go. $\endgroup$ – Brett Champion May 2 '12 at 14:52
  • $\begingroup$ I was already doing this in version 2, so it'd be surprising if it doesn't work in version 3. $\endgroup$ – J. M.'s discontentment May 2 '12 at 14:54
  • $\begingroup$ +1 Thanks, J.M. This works, too! Worth remembering! $\endgroup$ – Jyrki Lahtonen May 2 '12 at 16:22

The 3D graphics system was fairly consistent from version 2.0 through version 5.2, with the book by Tom Wickham-Jones being the standard reference. All graphics changed dramatically in version 6; however, you can still access the old graphics system by executing <<Version5`Graphics`. Thus, even in V8, you can test your answer to this question as follows.

<< Version5`Graphics`
ParametricPlot3D[{r*Cos[t], r*Sin[t], r^2, EdgeForm[]},
  {r, 0, 1}, {t, 0, 2 Pi}]

meshless surface

Afterward, you can go back to the new system by entering <<Version6`Graphics`.

| improve this answer | |
  • $\begingroup$ I didn't know you can still do old-school graphics in new versions. Neat! $\endgroup$ – J. M.'s discontentment May 2 '12 at 20:52
  • $\begingroup$ @J.M. Yes, takes me back a bit. :) $\endgroup$ – Mark McClure May 2 '12 at 21:11

Not tested in version 3 ...

tube /. Line[List[x__]] -> List[]

enter image description here

| improve this answer | |
  • $\begingroup$ It doesn't work on version 5.2 $\endgroup$ – celtschk May 2 '12 at 13:01
  • $\begingroup$ +1 Thanks for the suggestion. Didn't work for me. The output of FullForm[tube] does not seem to contain any lines. It is represented internally as a list of Polygons, so no wonder that your substitution does not do anything, because there are no Lines. $\endgroup$ – Jyrki Lahtonen May 2 '12 at 13:02
  • 3
    $\begingroup$ @JyrkiLahtonen you could also try tube /. Polygon[a__]:> {EdgeForm[], Polygon[a]} $\endgroup$ – Heike May 2 '12 at 13:04
  • $\begingroup$ @Heike: Bingo! That works! Thanks a million. Wanna write that as an answer? $\endgroup$ – Jyrki Lahtonen May 2 '12 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.