POV-Ray : Newsgroups : povray.newusers : Getting coordinates as text from a complex object. Server Time
1 Nov 2024 04:12:47 EDT (-0400)
  Getting coordinates as text from a complex object. (Message 1 to 3 of 3)  
From: Spade
Subject: Getting coordinates as text from a complex object.
Date: 14 Dec 2010 10:20:01
Message: <web.4d078adbec65b567dd7bdacd0@news.povray.org>
Hi I wonder if there is a way to get the coordinates as text from a complex
object.

Something that would look like #debug printobj(intersection(P1,P2,P3)).

Regards Spade.


Post a reply to this message

From: clipka
Subject: Re: Getting coordinates as text from a complex object.
Date: 14 Dec 2010 10:26:21
Message: <4d078c9d$1@news.povray.org>
Am 14.12.2010 16:18, schrieb Spade:
> Hi I wonder if there is a way to get the coordinates as text from a complex
> object.
>
> Something that would look like #debug printobj(intersection(P1,P2,P3)).
>
> Regards Spade.

You can use

     #declare MyObj = intersection { P1 P2 P3 }
     #declare V1 = min_extent(MyObj);
     #declare V2 = max_extent(MyObj);
     #declare Center = (V1+V2)/2;

and then use the vstr() function to convert those vectors to string; 
that would give you the dimensions and center of the object's /bounding 
box/. Note however that this is not necessarily the smallest box in 
which the object would fit.


Post a reply to this message

From: Spade
Subject: Re: Getting coordinates as text from a complex object.
Date: 15 Dec 2010 13:50:00
Message: <web.4d090d6321ca434f2baf18090@news.povray.org>
thank you for the help. Got it working


Post a reply to this message

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