POV-Ray : Newsgroups : povray.general : Feature suggestion: coordinate conversion built into POV-Ray. Server Time
31 Oct 2024 14:11:39 EDT (-0400)
  Feature suggestion: coordinate conversion built into POV-Ray. (Message 1 to 3 of 3)  
From: Allen
Subject: Feature suggestion: coordinate conversion built into POV-Ray.
Date: 4 Aug 2005 16:25:00
Message: <web.42f2793a3bf1b8fd97b9d6b0@news.povray.org>
Is this the correct place to post suggestions?  If not, I'm sorry.

I've used several external programs in conjunction with POV-Ray. Some are
good and some are bad.  Some of them don't properly export the coordinate
values or export in the right-handed system when I prefer the left-handed
system, etc.

Would it be possible to implement a built in conversion into POV-Ray using
directives.  Such conversions would set the coordinate real x,y,z points
based on the stated x,y,z points and a simple formula that can only use
+,-,x,y,z

For example

.... Start of scene stuff

// Include an external mesh object
#coordinates x=x, y=y, z=-z
#include "myobject.inc"
#coordinates off

// Include another poorly exported object
#coordinates x=x, y=z, z=y
#include "myobject2.inc"
#coordinates off


The idea is that POV-Ray would load the objects in memory, and at parse
time, automatically fix any coordinates based on the settings.  The first
object would have the z coordinate negated.  The second object would have
the y and z coordinates flipped.


Post a reply to this message

From: Rune
Subject: Re: Feature suggestion: coordinate conversion built into POV-Ray.
Date: 4 Aug 2005 16:51:14
Message: <42f27fc2$1@news.povray.org>
Allen wrote:
> // Include an external mesh object
> #coordinates x=x, y=y, z=-z
> #include "myobject.inc"
> #coordinates off

> The idea is that POV-Ray would load the objects in memory, and at
> parse time, automatically fix any coordinates based on the settings.

How "fix any coordinates"?

What should this:

sphere {<1,1,-1> scale <1,1,-1>}

be fixed to with this setting:

#coordinates x=x, y=y, z=-z

?

I think what you want can easily be done by applying a transform to your 
poorly exported object like this:

object {MyObject matrix<1,0,0,0,1,0,0,0,-1,0,0,0>} // x=x, y=y, z=-z

object {MyObject2 matrix<1,0,0,0,0,1,0,1,0,0,0,0>} // x=x, y=z, z=y

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Warp
Subject: Re: Feature suggestion: coordinate conversion built into POV-Ray.
Date: 5 Aug 2005 03:13:56
Message: <42f311b4@news.povray.org>
If what you want is to change the directions of the universe coordinate
axes, it's enough to set up the camera properly.
  For example, if you want to use a right-handed coordinate system (instead
of the left-handed which is default in POV-Ray) it's enough to use
"right -x*4/3" in the camera and then rotating it so that it is oriented as
you wish (eg. looking towards the positive y direction or whatever).

-- 

                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.