0
$\begingroup$

I have the following piece of code:

model = ParametricPlot3D[{Cos[t] (3 + Cos[u]), Sin[t] (3 + Cos[u]), 
    Sin[u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi}, PlotPoints -> 2]
Export["out.noff", model, "NOFF", "BinaryFormat" -> False];

but the exported NOFF file is actually a CNOF file, containing color information for each vertex, which I don't want. How can I prevent this?

Thanks

$\endgroup$
5
  • 1
    $\begingroup$ The NOFF help page says it will output CNOF is color information present. What happens if you export something like SphericalPlot3D[ 1 + Sin[4 \[Phi]]/2, {\[Theta], 0, Pi}, {\[Phi], 0, 2 Pi}, Lighting -> "Neutral", Mesh -> False, Axes -> False, Boxed -> False] /. RGBColor[__] -> Sequence[]? $\endgroup$ Commented Feb 4, 2016 at 22:35
  • $\begingroup$ @SjoerdC.deVries I'm a bit late with thanking you, but it is much appreciated. Bedankt $\endgroup$ Commented Mar 8, 2016 at 21:19
  • $\begingroup$ I assume that it worked for you then, right? $\endgroup$ Commented Mar 8, 2016 at 21:28
  • $\begingroup$ @SjoerdC.deVries it did indeed. $\endgroup$ Commented Mar 9, 2016 at 12:22
  • $\begingroup$ OK, then to wrap this up, I made this an actual answer. $\endgroup$ Commented Mar 9, 2016 at 12:30

1 Answer 1

1
$\begingroup$

The NOFF help page says it will output CNOF if color information present.

If you remove color information like in the example below it looks like you get a NOFF file without color information.

SphericalPlot3D[ 
  1 + Sin[4 ϕ]/2, 
  {θ, 0, Pi}, {ϕ, 0, 2 Pi}, 
  Lighting -> "Neutral", Mesh -> False, Axes -> False, Boxed -> False
] /. RGBColor[__] -> Sequence[]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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