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

Home » Public Forums » archive » Object graphics questions and comment
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: object graphics question [message #37869 is a reply to message #9709] Wed, 04 February 2004 06:54 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Karsten Rodenacker wrote:
>
> I have a problem with coordinated transformations of IDLgrImage and
> other objects, e.g. IDLgrContour.
>
> Does anybody know why rotating behaves like it does?
> In the small example:
>
> img=read_png( filepath('mineral.png', SUBDIR=['examples','data']))
> m=obj_new('IDLgrModel')
> m->add,obj_new('IDLgrImage',img)
> m->add,obj_new('IDLgrContour',img,color=[255,0,0])
> xobjview,m,/block
>
> rotation shows a quite bizar behaviour.
>
> I would expect that the image moves like one level of the contour object.
>

Hi Karsten,

Yes, that is wierd... but there is a solution.

You should really be rendering a polygon with the image as a texture
map. IDLgrImage are always displayed at Z=0 (or some such place.) To
give the image a real coordinate system you have to attach it to some
spatial object, like a polygon or a surface.

img=read_png( filepath('mineral.png', SUBDIR=['examples','data']))
m=obj_new('IDLgrModel')
oimg = obj_new('IDLgrImage',img)
oimg -> GetProperty, dim = dim
poly = obj_new("IDLgrPolygon", [0,0,dim[0]-1, dim[0]-1], $
[0,dim[1]-1,dim[1]-1, 0], $
color = [255,255,255], $
Texture_Map = oImg,$
Texture_Coord = [[0,0],[0,1], [1,1], [1,0]])
m->add, poly
m->add,obj_new('IDLgrContour',img,color=[255,0,0])
xobjview,m,/block



Cheers,
Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object graphics questions
Next Topic: Re: Editting IDL files under MacOS X

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

Current Time: Sat Oct 18 13:46:28 PDT 2025

Total time taken to generate the page: 2.00474 seconds