|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi, Boys,
I have this problem for an IRTC entry, but it should be interesting in
general.
I have a scene with, say, a dozen of objects. Every object is built at
<0,0,0> and then translated + rotated the same way: every object gets the
translations+rotations from all objects before plus an additional
translate+rotate.
Is there any way to ask POV-Ray where exactly the last object is located? I
can find its location of course drawing triangles on paper ;-) but I am
looking for some "magic" feature that writes the location directly to the
message window or something else.
TIA for any hints
Rm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Is there any way to ask POV-Ray where exactly the last object is located?
I
> can find its location of course drawing triangles on paper ;-) but I am
> looking for some "magic" feature that writes the location directly to the
> message window or something else.
Instead of transforming the object directly, do this:
#declare trans = transformation {
rotate...
scale...
translate...
}
then, use transformation{ trans } to transform the object, and you can also
use the vtransform() function with the same transformation and find the
place where a certain point is transformed to.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
>use the vtransform() function with the same transformation and find the
>place where a certain point is transformed to.
I thought of vtransform{} and also I thought of min_extent/max_extent as the
doc says in both cases it will return values, but I cannot figure out to
(means, I have no clue how to get it to work correctly).
Do You know of any scene file out there where I can see the code "in
wildlife"?
Thanks
Rm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
news:web.3fb9705e4b0664231e2d84430@news.povray.org...
> Is there any way to ask POV-Ray where exactly the last object is located?
The only way I know is to calculate the position using vector functions and
then using the value for screen output.
For example :
#declare
MyPos=vaxis_rotate(vaxis_rotate(<10,30,-20>,y,50)+<50,-10,12>,z,30);
#debug
concat(str(Mypos.x,0,3),",",str(Mypos.y,0,3),",",str(Mypos.z,0,3),"\n")
G.
--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3fb9705e4b0664231e2d84430@news.povray.org>,
"Steely" <Rob### [at] hamburgde> wrote:
> Is there any way to ask POV-Ray where exactly the last object is located? I
> can find its location of course drawing triangles on paper ;-) but I am
> looking for some "magic" feature that writes the location directly to the
> message window or something else.
What's the location of an object? There is no such thing.
> I thought of vtransform{} and also I thought of min_extent/max_extent as the
> doc says in both cases it will return values, but I cannot figure out to
> (means, I have no clue how to get it to work correctly).
The min_extent() function returns the lower-left-front corner of the
bounding box of the object, the max_extent() function returns the
upper-right-back corner. The documentation explains this fully, I
suggest you read it again. The vtransform() macro (parentheses, not
curly brackets...it's a macro) transforms a point with a given
transformation. Pick the point you want to treat as the "center" of the
object and transform it with the same transformation you used on the
object.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Gilles Tran wrote:
> #debug
> concat(str(Mypos.x,0,3),",",str(Mypos.y,0,3),",",str(Mypos.z,0,3),"\n")
Yepp. Can't test it right now, (the Windows machine crashed last night) but
this seems to be exactly what I'm looking for.
Merci
Rm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher James Huff wrote:
> What's the location of an object? There is no such thing.
Hmmmmmm ....
> The min_extent() function returns the lower-left-front corner of the
> bounding box of the object, the max_extent() function returns the
> upper-right-back corner. The documentation explains this fully, I
> suggest you read it again.
HmHmmHmmm ... If You wanted to name me whatever You succeeded. You also
managed to quote the docs correctly. How about answering the question next
time?
Rm
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3fbb018b@news.povray.org>,
Steely <rob### [at] hamburgde> wrote:
> > The min_extent() function returns the lower-left-front corner of the
> > bounding box of the object, the max_extent() function returns the
> > upper-right-back corner. The documentation explains this fully, I
> > suggest you read it again.
>
> HmHmmHmmm ... If You wanted to name me whatever You succeeded.
Er, thank you?
> You also managed to quote the docs correctly. How about answering the
> question next time?
I did. Your exact question has no answer, because the question itself is
nonsense, but I gave you two ways of accomplishing your apparent goal.
To repeat myself: there is no magic way of getting the object's
"location", because in general, there is no such thing. What's the
location of a person? Their center of mass? The point in between the
centers of area of their feet? Or even simpler: what's the location of a
triangle? A triangle has at least twenty known "centers", starting with
the incenter, centroid, circumcenter, and orthocenter, and your desired
"location" may be none of these.
(http://mathworld.wolfram.com/Center.html,
http://mathworld.wolfram.com/TriangleCenter.html)
Instead of some mysterious location value, you can get an approximation
of the extents of the object along each axis, or pick a point to call
the location of the object and transform that point with the same
transform you applied to the object.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|