POV-Ray : Newsgroups : povray.newusers : Coordinates of an object Server Time
22 Jun 2024 06:58:58 EDT (-0400)
  Coordinates of an object (Message 1 to 6 of 6)  
From: sniper
Subject: Coordinates of an object
Date: 25 Feb 2012 12:30:06
Message: <web.4f491a128a22bea25643b5860@news.povray.org>
Hello!

I have made an object, say dodecahedron. I defined vertices, then faces and
finally the cell. Then I transform the cell to an object. And then I scaled and
rotated it. Is there a possibility to transform back changed object for
achieving its coordinates of vertices? If no, how I could do this
mathematically? Thanks.


Post a reply to this message

From: James Holsenback
Subject: Re: Coordinates of an object
Date: 25 Feb 2012 12:55:23
Message: <4f49208b@news.povray.org>
On 02/25/2012 12:27 PM, sniper wrote:
> Hello!
>
> I have made an object, say dodecahedron. I defined vertices, then faces and
> finally the cell. Then I transform the cell to an object. And then I scaled and
> rotated it. Is there a possibility to transform back changed object for
> achieving its coordinates of vertices? If no, how I could do this
> mathematically? Thanks.
>
>
there are some functions that you can use: vtransform (i think) take a 
look at descriptions in the docs AND in the distribution include file 
(transform.inc) ... there's some good stuff in there ;-)

http://wiki.povray.org/content/Documentation:Reference_Section_7.5#transforms.inc

but usually most folks (not all) do scaling, rotating with the object at 
<0,0,0> the place it ...


Post a reply to this message

From: Warp
Subject: Re: Coordinates of an object
Date: 25 Feb 2012 13:28:22
Message: <4f492846@news.povray.org>
sniper <nomail@nomail> wrote:
> I have made an object, say dodecahedron. I defined vertices, then faces and
> finally the cell. Then I transform the cell to an object. And then I scaled and
> rotated it. Is there a possibility to transform back changed object for
> achieving its coordinates of vertices? If no, how I could do this
> mathematically? Thanks.

  You can #declare a 'transform' block identifier and then apply that
transformation to both an object and a point (using vtransform()).

-- 
                                                          - Warp


Post a reply to this message

From: sniper
Subject: Re: Coordinates of an object
Date: 25 Feb 2012 13:30:01
Message: <web.4f4927cf189521bc5643b5860@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 02/25/2012 12:27 PM, sniper wrote:
> > Hello!
> >
> > I have made an object, say dodecahedron. I defined vertices, then faces and
> > finally the cell. Then I transform the cell to an object. And then I scaled and
> > rotated it. Is there a possibility to transform back changed object for
> > achieving its coordinates of vertices? If no, how I could do this
> > mathematically? Thanks.
> >
> >
> there are some functions that you can use: vtransform (i think) take a
> look at descriptions in the docs AND in the distribution include file
> (transform.inc) ... there's some good stuff in there ;-)
>
> http://wiki.povray.org/content/Documentation:Reference_Section_7.5#transforms.inc
>
> but usually most folks (not all) do scaling, rotating with the object at
> <0,0,0> the place it ...

Thank you for the answer. I have studied these references but it seems no
possibility to achieve the coordinates of vertices of an object.
I have another idea, but also need help in its realization. I have coordinates
of a dodecahedron and its centroid, say <x,y,z>, so i could calculate the
distance from a given point to the centroid. I want to scale the dodecahedron
twice and achieve new coordinates of the vertices of dodecahedron. So the
distance between centroid in <x,y,z> and a given new point increases also twice.
How I could specify the direction?


Post a reply to this message

From: sniper
Subject: Re: Coordinates of an object
Date: 25 Feb 2012 14:05:00
Message: <web.4f49305b189521bc5643b5860@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> sniper <nomail@nomail> wrote:
> > I have made an object, say dodecahedron. I defined vertices, then faces and
> > finally the cell. Then I transform the cell to an object. And then I scaled and
> > rotated it. Is there a possibility to transform back changed object for
> > achieving its coordinates of vertices? If no, how I could do this
> > mathematically? Thanks.
>
>   You can #declare a 'transform' block identifier and then apply that
> transformation to both an object and a point (using vtransform()).
>
> --
>                                                           - Warp

It works! Thank you all!


Post a reply to this message

From: Alain
Subject: Re: Coordinates of an object
Date: 27 Feb 2012 18:52:56
Message: <4f4c1758@news.povray.org>

> James Holsenback<nom### [at] nonecom>  wrote:
>> On 02/25/2012 12:27 PM, sniper wrote:
>>> Hello!
>>>
>>> I have made an object, say dodecahedron. I defined vertices, then faces and
>>> finally the cell. Then I transform the cell to an object. And then I scaled and
>>> rotated it. Is there a possibility to transform back changed object for
>>> achieving its coordinates of vertices? If no, how I could do this
>>> mathematically? Thanks.
>>>
>>>
>> there are some functions that you can use: vtransform (i think) take a
>> look at descriptions in the docs AND in the distribution include file
>> (transform.inc) ... there's some good stuff in there ;-)
>>
>> http://wiki.povray.org/content/Documentation:Reference_Section_7.5#transforms.inc
>>
>> but usually most folks (not all) do scaling, rotating with the object at
>> <0,0,0>  the place it ...
>
> Thank you for the answer. I have studied these references but it seems no
> possibility to achieve the coordinates of vertices of an object.
> I have another idea, but also need help in its realization. I have coordinates
> of a dodecahedron and its centroid, say<x,y,z>, so i could calculate the
> distance from a given point to the centroid. I want to scale the dodecahedron
> twice and achieve new coordinates of the vertices of dodecahedron. So the
> distance between centroid in<x,y,z>  and a given new point increases also twice.
> How I could specify the direction?
>
>

Whenever you scale any object, the distance between any 2 points will 
change proportionately. So, if you do know the initial distance, then, 
you can apply the same scaling to the distance.

If you know the original location of any point of any object that you 
then scale, rotate or translate, you only need to apply the same 
transformations to that point to get the new coordinates of that point.



Alain


Post a reply to this message

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