POV-Ray : Newsgroups : povray.general : How to center an object by visibility? : Re: How to center an object by visibility? Server Time
26 Apr 2024 13:54:36 EDT (-0400)
  Re: How to center an object by visibility?  
From: Bald Eagle
Date: 3 Dec 2019 07:30:01
Message: <web.5de6542d5a7e05f54eec112d0@news.povray.org>
"Kima" <nomail@nomail> wrote:
> Consider an object as
>
> #declare obj = union {
> cylinder{ <-1,-1,-1>,<1,1,1>,.1
> cylinder{ <-1.5,-1.5,-1.5>,<1,1,1>,.1
> }
>
> I can center the object by its bounding box using max_extent and min_extent.
> Evidently, the bounding box is centered not the visible object.
>
> In this case, the right side is empty because there's nothing in the bounding
> (the cylinder side is at z=1, the farthest point).

Well, the best I know of so far is to define a reference point and use that.

So do some math, define a center point, and then use a transform.

http://news.povray.org/povray.newusers/message/%3C56d3df45%241%40news.povray.org%3E/#%3C56d3df45%241%40news.povray.org%
3E

Aside from that, maybe use trace or the screen object placement macros that were
being fiddled with a while back

http://news.povray.org/povray.tools.general/thread/%3Cweb.5ba183edb47e1707a47873e10%40news.povray.org%3E/


Post a reply to this message

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