POV-Ray : Newsgroups : povray.newusers : Getting coordinates as text from a complex object. : Re: Getting coordinates as text from a complex object. Server Time
2 Jul 2024 23:25:02 EDT (-0400)
  Re: Getting coordinates as text from a complex object.  
From: clipka
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

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