       Re: VectorPlot on a Circle

• To: mathgroup at smc.vnet.net
• Subject: [mg114781] Re: VectorPlot on a Circle
• Date: Fri, 17 Dec 2010 03:27:11 -0500 (EST)
• References: <ie297c\$mrj\$1@smc.vnet.net> <201012130852.DAA09458@smc.vnet.net> <201012161049.FAA11856@smc.vnet.net> <086FCBD6-0907-4B16-8A41-48E4A8258A16@trm.uni-leipzig.de> <2E8ED7A7B0E645D5A110089B1ED87107@DV73080US> <C3A25BE7-34C3-4778-B0BC-955567831DA0@trm.uni-leipzig.de>

```Patrick,

VectorPlot[{x, y}, {x, -2, 2}, {y, -2, 2},
VectorPoints -> Table[{Cos[phi], Sin[phi]}, {phi, 0, 2 Pi, 0.1}]]
works great!

Thanks,
Dave

-----Original Message-----
From: Patrick Scheibe
Sent: Thursday, December 16, 2010 10:46 AM
Cc: Mathematica Group
Subject: [mg114781] Re: [mg114766] VectorPlot on a Circle

Ahh,

ok I have read you mail too fast.
Usually (in the case of other plots too) this is no easy to achieve since
the plot samples in any way your domain. Your line on the circle
is infinite small and the sampling does not find such things easily.

Nevertheless, in your case and in your *real* application too, you may can
use something like

VectorPlot[{x, y}, {x, -2, 2}, {y, -2, 2},
VectorPoints -> Table[{Cos[phi], Sin[phi]}, {phi, 0, 2 Pi, 0.1}]]

Hope this helps,

Cheers
Patrick

On Dec 16, 2010, at 7:20 PM, Dave Snead wrote:

> Hi Patrick,
>
> Thanks, but
> VectorPlot[{x, y}, {x, -1, 1}, {y, -1, 1},
> RegionFunction -> Function[{x, y}, x^2 + y^2 < 1]]
> plots vectors on the unit disk,  I just want to define the vectors on the
> unit circle.
>
> What I would like is something like
> VectorPlot[{x, y}, {x, -1, 1}, {y, -1, 1},
> RegionFunction -> Function[{x, y}, x^2 + y^2 == 1]]
> but this function only does a sparse plot of the vectors, and some
> of them are not on the circle!
>
> I'd like to know if Mathematica has the capability to restrict these
> vectors to a one dimensional,
> rather than a two dimensional region and do a decent plot.
>
> Cheers,
> Dave
>
> -----Original Message----- From: Patrick Scheibe
> Sent: Thursday, December 16, 2010 5:08 AM
> Cc: mathgroup at smc.vnet.net
> Subject: Re: [mg114766] VectorPlot on a Circle
>
> Hi,
>
>
> VectorPlot[{x, y}, {x, -1, 1}, {y, -1, 1},
> RegionFunction -> Function[{x, y}, x^2 + y^2 < 1]]
>
> ?
>
> Cheers
> Patrick
>
>
> On Dec 16, 2010, at 11:49 AM, Dave Snead wrote:
>
>> Hi,
>>
>> I'm trying to do a vector plot but confine the vectors to a unit circle.
>>
>> VectorPlot[
>> If[Abs[x^2 + y^2 - 1] == 0, {x, y}, {0, 0}], {x, -1, 1}, {y, -1, 1}]
>> only plots a couple of vectors, not the dense set of vectors that I want.
>>
>> and
>> VectorPlot[
>> If[Abs[x^2 + y^2 - 1] <.1, {x, y}, {0, 0}], {x, -1, 1}, {y, -1, 1}]
>> plots lots of vectors but they're on an annulus rather than a circle.
>>
>> Is there any way to do this?
>>
>> Or more generally is there any way to confine the vectors to a curve.
>> Or, kicking the dimension up by 1, can VectorPlot3D confine the vectors
>> to a surface?
>>
>> Thanks,