POV-Ray : Newsgroups : povray.general : an extraordinary rotation question : Re: an extraordinary rotation question Server Time
30 Jul 2024 14:26:55 EDT (-0400)
  Re: an extraordinary rotation question  
From: Chris B
Date: 25 Jun 2009 08:57:28
Message: <4a437438@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote in message 
news:web.4a436039cfb6d60e4e47a1b0@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> Yes, but in the modeller you need to decide which bit of a model is
>> positioned at <0,0,0>.
>> If you centre two differently shaped door handle models so that their
>> geometric centres are at <0,0,0>, then you have to perform different
>> translations to fit each of them to a door. >
>
> You lose me when you say "geometric centres are at <0,0,0>"
>
> Who, What decides centres to be at <0,0,0>, when why how,
>

It's you. You do it!  Honest :-)

I've tried to explain further below, but it may be that others can explain 
differently in a way that may suit you better. So if anyone can phrase it 
differently it's probably worth posting.  I think that understanding this is 
the key to you understanding the answer to your original 
translation/rotation question.


Whenever you add a vertex into an object that you are modelling, for example 
in 3D Max, the position of that vertex is defined relative to an origin 
(position <0,0,0>). This could be in the Global coordinate system of the 
modeller, or some modellers allow you to define a Local coordinate system 
for each of the different objects that you have added into the model.

Also, whenever you add a line into a 2D drawing it is relative to some 
origin (position 0.00, 0.00), which is usually the top left or bottom left 
of the screen or page (though some applications place it in the middle of 
the page). Sometimes you don't see this in a 2D graphics application because 
it's handled behind the scenes, but any decent 2D or 3D application will 
have an option to display something to indicate the actual coordinates and 
then you can see where the origin is.

When you export an object from 3D Max, you need to know how the origin of 
the coordinate system in the generated file relates to your object. I don't 
know if an object is always written out using the Global coordinate system 
or whether 3D Max has an option to allow you to export an object using Local 
coordinate system coordinates. If you can't tell, then translating and 
rotating it, as necessary to map to the coordinate system used by your 2D 
software, becomes mind-bogglingly difficult (or degenerates to a matter of 
guesswork (sometimes called 'successive approximation')).

If you are able to control where the origin is, relative to your 3D models 
and your 2D plan, then life becomes an awful lot easier. Particularly when 
you come to mapping the 3D objects to your 2D plan and assembling all the 
bits in POV_Ray. even if you can't control the positioning of the origin you 
still need to know where the origin is to get the translations and rotations 
working right.

Regards,
Chris B.


Post a reply to this message

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