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

Home » Public Forums » archive » help with cgDrawVectors in write_gif procedure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: help with cgDrawVectors in write_gif procedure [message #91093 is a reply to message #91092] Wed, 03 June 2015 03:57 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Wednesday, June 3, 2015 at 12:26:34 PM UTC+2, g.na...@gmail.com wrote:
> Actually I used write_gif before. But I had only one image. Now I need to overplot the vectors on top of the image that's why I didn't manage to do that.

It's a bit tricky, but all the info is out there. Below is a working solution to make a series of gifs with rotating arrow arrow:

pro testGifOut
xSize = 400
ySize = 400
window, xsize=xSize, ysize=ySize, /free
tvscl, bytscl(sin(dist(xSize)))
xPos = cos(!pi*2.0*findgen(11)/10.0)
yPos = sin(!pi*2.0*findgen(11)/10.0)
cgArrow, 0.5, 0.5, 0.3*xPos[0]+0.5, 0.3*yPos[0]+0.5, /Solid, /normal, thick=4, color='red'
inImg = tvrd(0, 0, xSize, ySize, /True)
image2D = color_quan(inImg, 1, r, g, b, Colors=256)
write_gif, 'testGif.gif', image2D, r, g, b, /multiple, repeat_count=0, delay_time=20
for i=1,10 do begin
tvscl, bytscl(sin(dist(xSize)*i*0.1))
cgArrow, 0.5, 0.5, 0.3*xPos[i]+0.5, 0.3*yPos[i]+0.5, /Solid, /normal, thick=4, color='red'
inImg = tvrd(0, 0, xSize, ySize, /True)
image2D = color_quan(inImg, 1, r, g, b, Colors=256)
write_gif, 'testGif.gif', image2D, r, g, b, /multiple, repeat_count=0, delay_time=20
endfor
write_gif, 'testGif.gif', image2D, /close
end

Hope it helps,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Vertical text orientation?
Next Topic: Pure IDL interface for video cameras -- linux only

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

Current Time: Wed Oct 08 18:03:39 PDT 2025

Total time taken to generate the page: 0.00261 seconds