|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"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).
adjust the BB?
<http://news.povray.org/povray.text.scene-files/message/%3Cweb.5dc0bff634d8ef06feeb22ff0%40news.povray.org%3E/#%3Cweb.5
dc0bff634d8ef06feeb22ff0%40news.povray.org%3E>
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2019-12-03 à 06:00, Kima a écrit :
> 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).
>
>
That's a badly defined object. It must be :
#declare obj = union {
cylinder{ <-1,-1,-1>,<1,1,1>,.1}
cylinder{ <-1.5,-1.5,-1.5>,<1,1,1>,.1}
}
It's obvious that the lower right part is empty because the bounding
box's faces are always parallel to the reference planes.
This don't change the fact that the bounding box for that object is as
small as it can be.
What you seems to want is a bounding box that is rotated to match the
length of that object. That would reduce the efficiency of the bounding
mechanism.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|