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

Home » Public Forums » archive » Re: ROTATE MODEL
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
Re: ROTATE MODEL [message #66584] Tue, 26 May 2009 12:19 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Thank you Mike,

you example is good, I've good results,
thank you
Re: ROTATE MODEL [message #66588 is a reply to message #66584] Tue, 26 May 2009 11:57 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
mgalloy wrote:
> nata wrote:
>> On May 26, 2:30 pm, mgalloy <mgal...@gmail.com> wrote:
>>> nata wrote:
>>>> Hi people,
>>>> I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
>>>> 30 degrees.
>>>> I tried to use the IDLgrModel::Rotate method and I did not succeed
>>>> with the rotation.
>>>> I tried a lot of combinations:
>>>> model->rotate, [0,0,0], 30
>>>> model->rotate, [1,0,0], 30
>>>> etc..
>>>> Why the images don't rotate? grgrgggrrrr ....
>>>> How to do that ?
>>>> Thanks in advance,
>>>> nata
>>> Set the TRANSFORM_MODE property of the IDLgrImage to 1 (assuming you
>>> have IDL 6.2+).
>>>
>>
>> No results,
>>
>> I try with the TRANSFORM_MODE KEYWORD set to 1 and nothing happens.
>>
>> topo=OBJ_NEW('IDLgrImage',DIMENSIONS=image_sz
>> [1:2],DATA=image.image,LOCATION=[0,0],/TRANSFORM_MODE)
>> model=OBJ_NEW('IDLgrModel')
>> model->Add, topo
>> ;--------------------------
>> model->Rotate, [0,0,0], 120l
>> ;--------------------------
>> view->Add, model
>> scene->Add, view
>> ...
>>
>> What am i doing wrong?
>
> Rotate about a non-zero vector i.e. model->rotate, [0, 0, 1], 120.0
>
> Mike

Here's a simple example (try changing TRANSFORM_MODE to 0 to see the odd
results):

ali = read_image(file_which('people.jpg'))

view = obj_new('IDLgrView')

model = obj_new('IDLgrModel')
view->add, model

image = obj_new('IDLgrImage', ali, transform_mode=1)
model->add, image

model->rotate, [0, 0, 1], 30.0

xc = [-1., 2. / 255.]
image->setProperty, xcoord_conv=xc, ycoord_conv=xc

win = obj_new('IDLgrWindow', dimensions=[256, 256])
win->draw, view

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
Re: ROTATE MODEL [message #66589 is a reply to message #66588] Tue, 26 May 2009 11:47 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
nata wrote:
> On May 26, 2:30 pm, mgalloy <mgal...@gmail.com> wrote:
>> nata wrote:
>>> Hi people,
>>> I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
>>> 30 degrees.
>>> I tried to use the IDLgrModel::Rotate method and I did not succeed
>>> with the rotation.
>>> I tried a lot of combinations:
>>> model->rotate, [0,0,0], 30
>>> model->rotate, [1,0,0], 30
>>> etc..
>>> Why the images don't rotate? grgrgggrrrr ....
>>> How to do that ?
>>> Thanks in advance,
>>> nata
>> Set the TRANSFORM_MODE property of the IDLgrImage to 1 (assuming you
>> have IDL 6.2+).
>>
>
> No results,
>
> I try with the TRANSFORM_MODE KEYWORD set to 1 and nothing happens.
>
> topo=OBJ_NEW('IDLgrImage',DIMENSIONS=image_sz
> [1:2],DATA=image.image,LOCATION=[0,0],/TRANSFORM_MODE)
> model=OBJ_NEW('IDLgrModel')
> model->Add, topo
> ;--------------------------
> model->Rotate, [0,0,0], 120l
> ;--------------------------
> view->Add, model
> scene->Add, view
> ...
>
> What am i doing wrong?

Rotate about a non-zero vector i.e. model->rotate, [0, 0, 1], 120.0

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
Re: ROTATE MODEL [message #66590 is a reply to message #66589] Tue, 26 May 2009 11:44 Go to previous messageGo to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
On May 26, 2:30 pm, mgalloy <mgal...@gmail.com> wrote:
> nata wrote:
>> Hi people,
>
>> I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
>> 30 degrees.
>> I tried to use the IDLgrModel::Rotate method and I did not succeed
>> with the rotation.
>
>> I tried a lot of combinations:
>> model->rotate, [0,0,0], 30
>> model->rotate, [1,0,0], 30
>> etc..
>
>> Why the images don't rotate? grgrgggrrrr ....
>> How to do that ?
>
>> Thanks in advance,
>> nata
>
> Set the TRANSFORM_MODE property of the IDLgrImage to 1 (assuming you
> have IDL 6.2+).
>

No results,

I try with the TRANSFORM_MODE KEYWORD set to 1 and nothing happens.

topo=OBJ_NEW('IDLgrImage',DIMENSIONS=image_sz
[1:2],DATA=image.image,LOCATION=[0,0],/TRANSFORM_MODE)
model=OBJ_NEW('IDLgrModel')
model->Add, topo
;--------------------------
model->Rotate, [0,0,0], 120l
;--------------------------
view->Add, model
scene->Add, view
...

What am i doing wrong?
nata
Re: ROTATE MODEL [message #66591 is a reply to message #66590] Tue, 26 May 2009 11:30 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
nata wrote:
> Hi people,
>
> I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
> 30 degrees.
> I tried to use the IDLgrModel::Rotate method and I did not succeed
> with the rotation.
>
> I tried a lot of combinations:
> model->rotate, [0,0,0], 30
> model->rotate, [1,0,0], 30
> etc..
>
> Why the images don't rotate? grgrgggrrrr ....
> How to do that ?
>
> Thanks in advance,
> nata
>

Set the TRANSFORM_MODE property of the IDLgrImage to 1 (assuming you
have IDL 6.2+).

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
Re: ROTATE MODEL [message #66670 is a reply to message #66584] Wed, 27 May 2009 08:42 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
I've a last question related with this discussion.
There is a way to rotate IDLgrPolyline objects ? I mean, IDlgrImage
has the /TRANSFORM_MODE keyword but if I use others graphics objects I
can't rotate them. So, if it's possible to rotate graphics objects in
general ?

Thanks,
nata
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: hist_2d, contour
Next Topic: ROTATE MODEL

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

Current Time: Wed Oct 08 19:57:05 PDT 2025

Total time taken to generate the page: 0.00489 seconds