comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » plot tangentail vector
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
plot tangentail vector [message #58032] Sat, 12 January 2008 21:41 Go to next message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
hi everybody
I need plot on each (x,y) a tangentail vector with known magnitude , I
have a file with three columns , x ,y , A.
where A is the magnitude of vector .
can anybody help me ?
best,nakisa
Re: plot tangentail vector [message #58078 is a reply to message #58032] Wed, 16 January 2008 05:44 Go to previous messageGo to next message
JMB is currently offline  JMB
Messages: 13
Registered: January 2008
Junior Member
Does this short example help you?

N = 200
X = FINDGEN(N)
Y = 10*SIN(x/16)-10*COS(x/8+2)
A = abs(16*SIN(x[1:N-2]/4.))

PLOT, X, Y

vx=X[2:N-1]-X[1:N-2]
vy=(Y[2:N-1]-Y[0:N-3])/2.

Norm=A/sqrt(vx^2+vy^2)

ARROW,X[1:N-2],Y[1:N-2],X[1:N-2]+Norm*vx,Y[1:N-2]+Norm*vy,/
DATA,color=220
PLOT, X, Y, /noerase

END

Regards,

Jérôme
Re: plot tangentail vector [message #58080 is a reply to message #58032] Wed, 16 January 2008 05:19 Go to previous messageGo to next message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Jan 16, 4:47 am, nakisa <nakisa.noor...@gmail.com> wrote:
> Hi
> Arrow ,as far as I understand , give initial and final point and draw
> a vector. My case is different. I have the initial point and want to
> draw a tangential vector !so I can't use Arrow for this aim.
> Nakisa

In that case, maybe VELOVECT will do what you want? Although, surely
if you have the vectors' magnitudes and directions you can just use
ARROW after working out your X1/Y1 values? It may even be simpler than
trying to get your head around constructing the correct U & V arrays
for VELOVECT! :-)

Good luck!

Chris
Re: plot tangentail vector [message #58192 is a reply to message #58078] Fri, 18 January 2008 21:58 Go to previous message
nakisa is currently offline  nakisa
Messages: 24
Registered: June 2007
Junior Member
hi Jerome
thanks but it isn't what I need. i want at each position (x,y) it
suppose a circle and plot a tangential vector with given magnitude !!!
nakisa



On Jan 16, 4:44 pm, JMB <jmb.lo...@gmail.com> wrote:
> Does this short example help you?
>
> N = 200
> X = FINDGEN(N)
> Y = 10*SIN(x/16)-10*COS(x/8+2)
> A = abs(16*SIN(x[1:N-2]/4.))
>
> PLOT, X, Y
>
> vx=X[2:N-1]-X[1:N-2]
> vy=(Y[2:N-1]-Y[0:N-3])/2.
>
> Norm=A/sqrt(vx^2+vy^2)
>
> ARROW,X[1:N-2],Y[1:N-2],X[1:N-2]+Norm*vx,Y[1:N-2]+Norm*vy,/
> DATA,color=220
> PLOT, X, Y, /noerase
>
> END
>
> Regards,
>
> Jérôme
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: bizzare idlwave abbrev behavior
Next Topic: Color table

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:17:42 PDT 2025

Total time taken to generate the page: 0.00562 seconds