Re: Help Plotting director fields

*To*: mathgroup at smc.vnet.net*Subject*: [mg120206] Re: Help Plotting director fields*From*: Heike Gramberg <heike.gramberg at gmail.com>*Date*: Wed, 13 Jul 2011 03:10:40 -0400 (EDT)*References*: <201107121059.GAA22206@smc.vnet.net>

I think the problem is that ArcTan[y/x] in your definition of theta should actually be the polar angle of the vector {x,y}. For x>0 this is indeed ArcTan[y/x], but for x<0 the polar angle becomes ArcTan[y/x] + Pi for y>0 and ArcTan[y/x]-Pi for y<0. One way around this is to define theta according to theta = s Arg[x+I y] + theta0 so for example AAA = {Cos[-1/2 Arg[x + I y] + 0], Sin[-1/2 Arg[x + I y] + 0]} StreamPlot[AAA, {x, -1, 1}, {y, -1.5, 1.5}, StreamPoints -> 20, StreamScale -> None] Heike. On 12 Jul 2011, at 11:59, Liquid Crystal wrote: > Hello, > > I am trying to plot a director field for nematic liquid crystals. > The form of the director is, in pseudo-mathematica > > n = {Cos[theta],Sin[theta]} > > Where: > > theta = s ArcTan[y/x] + theta_0 > > If you reference the following links, you will see the various > disinclinations induced in the director field by choosing various s > and theta_0 > > http://learnliquid.blogspot.com/2011/07/test.html > > However, using the following code I am not able to produce these images. > Any suggestions? > > AAA = {Cos[-1/2 ArcTan[y/x] + 0/2], Sin[-1/2 ArcTan[y/x] + 0/2]} > > StreamPlot[AAA, {x, -1, 1}, {y, -1, 1}, StreamPoints -> 12, > AspectRatio -> 1, StreamScale -> None] > > Thank you, > > LL >

**References**:**Help Plotting director fields***From:*Liquid Crystal <liqlearner@gmail.com>