1
$\begingroup$

Some time ago I found a post that turned the triangles of a mesh into polygons. I have spent 2 hours looking for that post and can not find it.

The problem: Plotting

p = Plot3D[x^2+y^2,{x,-10,10},{y,-10,10}];(*code by Jens*)
With[{zScale = .05},
Export["squishedPlot.wrl", 
p /. Graphics3D[gr_, opts___] :> 
Graphics3D[
 GeometricTransformation[gr, ScalingTransform[{1, 1, zScale}]], 
 opts]]
]

enter image description here

Produces a bad mesh/wire frame. I can Import this into Blender and it is not what MMA plots at all. enter image description here As you can see, towards the base, you get extra lines, when rendered in Blender, it looks bad. Having all polygons and no triangles is a must for 3d modeling.

The image below was solely created in Blender, but it has a much better wire frame. Yes it has triangles but I think it is just the way MMA imports the file.

Solution: I need a function to produce a wire frame of a plot that will produce a polygon and not Triangles.

enter image description here

$\endgroup$
  • 2
    $\begingroup$ You can visualize the exported triangles directly in Mathematica if you add Mesh -> All to the Plot3D command. The smaller triangles are created by recursive refinement, you can turn it off using MaxRecursion -> 0 and then you will get something closer to your desired output. $\endgroup$ – user484 Aug 23 '16 at 22:09
  • $\begingroup$ @Rahul It works perfectly, Thank you sir! $\endgroup$ – Bob Brooks Aug 23 '16 at 23:37

Your Answer

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

Browse other questions tagged or ask your own question.