Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Plotting a function, I noticed some strange spots away from the main feature, the dark purple here:

1

You can see that they don't actually have any curvature themselves:

2

Strangely, you don't see them if you look from the bottom:

3

What are they from? Something about lack of precision or overflow or divergence?

share|improve this question

closed as off-topic by Sjoerd C. de Vries, rasher, m_goldberg, Artes, bobthechemist Apr 17 at 13:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Sjoerd C. de Vries, rasher, m_goldberg, Artes, bobthechemist
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Could you share a code? :) –  Kuba Apr 16 at 20:22
    
Are you plotting the result of an NDSolve operation? If that is the case, you are trying to perhaps probe a time step of your equation beyond the limits imposed by numerical stability/stiffness for the solver type being used. Conjecture, at best. –  drN Apr 16 at 22:19
    
@Kuba I will tomorrow when I'm at work, but... it's very involved. It's created by a function that calls about 20 other functions in making it. –  YungHummmma Apr 17 at 5:52
    
@drN No, but it is an NIntegrate[] that creates it. I suspect that might be similar? –  YungHummmma Apr 17 at 5:53
    
@YungHummmma Yes, I would suspect so. –  drN Apr 17 at 13:27
show 1 more comment

1 Answer 1

It looks to me like you've got some inconsistency in your VertexNormals. This can certainly happen with numerically generated functions though, as others have rightly pointed out, it's hard to say for sure without some more specific info. Here's a simple way to force this sort of thing to happen.

(* A list of vertices to feed to Polygon *)
pts = Flatten[Table[
    {{x, y, 0}, {x + 1, y, 0}, {x + 1, y + 1, 0}, {x, y + 1, 0}},
    {x, -3, 3}, {y, -3, 3}],
   1];

(* Orient the vertex normals upward *)
normals = Table[{0, 0, 1}, 
   Evaluate[Sequence @@ Most[List /@ Dimensions[pts]]]];

(* Flip a few of them *)
normals[[25, 1, 3]] = -1;
normals[[25, 2, 3]] = -1;
normals[[25, 3, 3]] = -1;
normals[[26, 2, 3]] = -1;
normals[[26, 3, 3]] = -1;

(* Visualize *)
Graphics3D[Polygon[pts, VertexNormals -> normals],
 PlotRange -> {-2, 2}]

enter image description here

share|improve this answer
add comment

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