4
$\begingroup$

I draw a StreamPlot using

  StreamPlot[{2 - 3*x^2 + y^2, x^2 - y^2}, {x, - 3, 3}, {y, -3, 3}]

This correctly produces

enter image description here

Next, I use LineIntegralConvolutionPlot

  LineIntegralConvolutionPlot[{{2 - 3*x^2 + y^2, x^2 - y^2}, {"noise",  500, 500}}, 
  {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BeachColors",LightingAngle -> 0, 
  LineIntegralConvolutionScale -> 3, Frame -> False]

This produces

enter image description here

Other variants are doing the same thing, for example,

   LineIntegralConvolutionPlot[{{2 - 3*x^2 + y^2, x^2 - y^2}, {Automatic, 500, 64}}, 
   {x, -3, 3}, {y, -3, 3}, ColorFunction -> "DarkRainbow",Frame -> False, 
   LightingAngle -> 0]

Is there any way to get rid of the shadowing in the RHS of the image so it looks more like the LHS?

$\endgroup$
5
$\begingroup$

Does this what you want?

LineIntegralConvolutionPlot[{{2 - 3*x^2 + y^2, x^2 - y^2}, {"noise", 
   500, 500}}, {x, -3, 3}, {y, -3, 3}, ColorFunction -> "BeachColors",
  LineIntegralConvolutionScale -> 3, Frame -> False]

![enter image description here

$\endgroup$
3
  • $\begingroup$ That is closer. The shadowing at the top center of the diagram is bothersome. Can that be removed? $\endgroup$
    – Moo
    Dec 7 '21 at 13:53
  • $\begingroup$ Is this better? $\endgroup$ Dec 7 '21 at 13:56
  • $\begingroup$ Yes, that is it, thanks! It is unfortunate that it loses some of the beautiful details from the original. $\endgroup$
    – Moo
    Dec 7 '21 at 13:57
5
$\begingroup$

If you want lighting without shadows (as opposed to None), set the altitude high (as shown in the docs):

LineIntegralConvolutionPlot[{{2 - 3*x^2 + y^2, x^2 - y^2}, {"noise", 
   500, 500}}, {x, -3, 3}, {y, -3, 3}, 
 ColorFunction -> "BeachColors",
 LightingAngle -> {0, Pi/2}, (* angle, altitude *)
 LineIntegralConvolutionScale -> 3, Frame -> False]
$\endgroup$

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.