POV-Ray : Newsgroups : povray.newusers : Coordinates of an object : Re: Coordinates of an object Server Time
27 Jun 2024 17:30:17 EDT (-0400)
  Re: Coordinates of an object  
From: Alain
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.