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

Home » Public Forums » archive » Re: texture_coord
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: texture_coord [message #27748 is a reply to message #27747] Thu, 01 November 2001 07:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Harald von der Osten-Woldenburg (hvdosten@lb.netic.de) writes:

> maybe it's easier than I feel, but I don't came along with it:
>
> I would like to map a jpeg-file onto a small part of a 3D-surface. It
> works fine if I consider the entire surface. But this is not what I want
> to have. The problem seems to be the array texture_coord.
>
> If the surface is of an arry of - lets say - 1000 x 1200, how could I
> map a jpeg-file onto this surface with the subsurface-grid-coordinates
> [100, 50], [200,50], [200,300], [100,300]? And: I hope that the
> jpeg-file can have a higher resolution than [100 x 250] pixels for this
> example?
>
> Whatever I try - I get the error-message "number of vertices, normals,
> and texture coordinates do not match". Concerning to the online-help
> "TEXTURE_COORD property defines how individual data points within the
> image data are mapped...". I don't hope that each pixel in the jpeg-file
> must be referenced by corresponding coordinates....
>
> Thanks for each encouraging hint...

Oh, goody. Another simple problem. :-)

I don't know, Harald. I can't even add a texture
map to the surface at all without getting this
error:

thisImage = Obj_New('IDLgrImage', image)
thisSurface = OBJ_NEW('IDLgrSurface', data, x, y, Style=2, $
Color=[255,255,255], Texture_Map=thisImage, $
Texture_Coord=[[0,0], [1,0], [1,1], [0,1], [0,0]]

IDL>Simple_Surface, Image=myimage
% IDLGRSRCDEST::DRAW: Error, numbers of vertices, normals, and
texture coordinates do not match.

Although the image *does* show up on the surface, oddly enough. But
changing the values of the texture coordinates does absolutely
nothing with respect to mapping the image on the surface. It always
covers the entire surface. I'm using IDL 5.5.

I've got work to do. I think you are going to have to handle
this one yourself. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[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
Previous Topic: Re: _Ref_Extra : BUG? (in Win2K 55b) corrected test file
Next Topic: Homogenity of an area

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

Current Time: Sat Oct 11 08:07:34 PDT 2025

Total time taken to generate the page: 1.67784 seconds