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 
Return to the default flat view Create a new topic Submit Reply
Re: ROTATE MODEL [message #66588 is a reply to message #66584] Tue, 26 May 2009 11:57 Go to previous messageGo to previous 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: hist_2d, contour
Next Topic: ROTATE MODEL

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

Current Time: Fri Oct 10 04:52:31 PDT 2025

Total time taken to generate the page: 1.20357 seconds