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

Home » Public Forums » archive » Re: graphics formats, triangulisation & coordinate systems
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: graphics formats, triangulisation & coordinate systems [message #36247 is a reply to message #36221] Wed, 27 August 2003 15:24 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Neil" wrote in message ...

> Does anyone know how i can convert files in the 3DS format into the
> OBJ format, or have a code that can do this. This are many object in
> 3DS format but i want to manipulate verticies and polygons, so i need
> to access the raw data.

This really isn't a conversion, you simply need to read the .3ds files and
extract the relevant data. The other day I almost wrote a .dlm for IDL that
would read .3ds files but although that exercise would have been fun I
couldn't justify the time. Instead I used a utility to dump .3ds files to
ASCII. Google for "3dsrdr.c".

Another option is to use the freeware 3d modeling package OpenFX to read
your .3ds files and export them as .dxf. IDL can read .dxf files.


> I also need to convert all polygons to triangles, is there a simple
> triangulisation code i can use. I work in IDL so could this code be
> used in the conversion. To take care of reflections i need to ensure
> all surface are plane by definition, so i would like to convert all
> otherwise polygons to triangles

What polygons? How are they defined? If they are the polygons contained in
your .3ds files then they are already defined as a collection of triangles
by the vertices and connectivity data.


> Which is the best coordinate system to operate in for computer
> graphics, right-handed or left-handed. I am inclinded to use a
> right-hand coord system as most maths books use this.
>
> Also if i chose a particular system should i chose the z-coordinate as
> away (towards) the viewer or up (down). In know it is simple to
> convert, but i just want to use the same conventions as the majority
> of users.

You don't need to make these decisions as the people who wrote openGL and
IDL did it for you. Right handed, positive Z pointing towards the viewer,
positive rotation is counter-clockwise.

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Assoc and byteorder keywords
Next Topic: working with IDLtoAVI.dlm

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

Current Time: Fri Oct 10 16:55:08 PDT 2025

Total time taken to generate the page: 0.64106 seconds