|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi! Is it possible to make a genetral transformation of an object in Povray in
the way that I assign a new values (x',y',z') to the existing x,y,z coordinates
of the object, according to some rule? E.g. I have the following: x'=x; y'=
y+0.8*z*(y*z)/(300-z); z'=0.8*z . I was trying to play around with matrix, but
it doesn't seem to be the way.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
houmr schrieb:
> Hi! Is it possible to make a genetral transformation of an object in Povray in
> the way that I assign a new values (x',y',z') to the existing x,y,z coordinates
> of the object, according to some rule? E.g. I have the following: x'=x; y'=
> y+0.8*z*(y*z)/(300-z); z'=0.8*z . I was trying to play around with matrix, but
> it doesn't seem to be the way.
No, POV-Ray only supports affine transformations, i.e. any
transformations where each new coordinate is some linear combination of
the original coordinates and some constant.
Some people have experimented with "slicing" the object to be
transformed, and transforming each slice with a different matrix.
Another approach would be to convert the object to an isosurface (much
work has been done in this direction recently), and then use that to
define another arbitrarily-transformed variant of the object.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it houmr who wrote:
>Hi! Is it possible to make a genetral transformation of an object in Povray in
>the way that I assign a new values (x',y',z') to the existing x,y,z coordinates
>of the object, according to some rule? E.g. I have the following: x'=x; y'=
>y+0.8*z*(y*z)/(300-z); z'=0.8*z . I was trying to play around with matrix, but
>it doesn't seem to be the way.
You can't perform non-linear transformations on general POV objects, but
if you can express your object as an isosurface function you can perform
non-linear variable substitution on that function.
http://www.econym.demon.co.uk/isotut/substitute.htm#nls
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
houmr wrote:
> Hi! Is it possible to make a genetral transformation of an object in Povray in
> the way that I assign a new values (x',y',z') to the existing x,y,z coordinates
> of the object, according to some rule? E.g. I have the following: x'=x; y'=
> y+0.8*z*(y*z)/(300-z); z'=0.8*z . I was trying to play around with matrix, but
> it doesn't seem to be the way.
What are you trying to do with this? There maybe other things you could do
other than use 'matrix'. You might be able to use a macro to deform and
then place your object.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Leroy Whetstone <lrw### [at] joplincom> wrote:
> What are you trying to do with this? There maybe other things you could do
> other than use 'matrix'. You might be able to use a macro to deform and
> then place your object.
In fact the result of the transformation is kind of uneven shearing. The shear
is along the y axis, but the value is proportional to the y coordinate. (If you
imagine a cube, the angle formed by upper side and the z axis is about twice of
the angle formed by the bottom side and the z axis. So the sheared box becomes
wider on one side and narrower on the other side. All the faces remain planar).
I need to use this transformation to compensate a distortion involved by an
optical system while projecting the rendered images. Since the models are of
arbitrary and real sceneries, I doubt being able to convert it to isosurfaces.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
houmr schrieb:
> In fact the result of the transformation is kind of uneven shearing. The shear
> is along the y axis, but the value is proportional to the y coordinate. (If you
> imagine a cube, the angle formed by upper side and the z axis is about twice of
> the angle formed by the bottom side and the z axis. So the sheared box becomes
> wider on one side and narrower on the other side. All the faces remain planar).
> I need to use this transformation to compensate a distortion involved by an
> optical system while projecting the rendered images. Since the models are of
> arbitrary and real sceneries, I doubt being able to convert it to isosurfaces.
If the faces really remain planar, you can create the desiered shape
using...
(a) an intersection of planes (Warning: Does not bound properly!)
(b) an intersection of well-sized boxes
(c) a prism object
...
to name just the first three ideas that cross my mind.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"houmr" <nomail@nomail> wrote in message
news:web.4aeec54aeee70a117fab4e430@news.povray.org...
> Leroy Whetstone <lrw### [at] joplincom> wrote:
>
>> What are you trying to do with this? There maybe other things you could
>> do
>> other than use 'matrix'. ...
>
> In fact the result of the transformation is kind of uneven shearing...
> I need to use this transformation to compensate a distortion involved by
> an
> optical system while projecting the rendered images. Since the models are
> of
> arbitrary and real sceneries, I doubt being able to convert it to
> isosurfaces.
>
If it's to address real-world projection issues then it may be possible to
do what you want in two passes:
Pass 1 - Render the scene as normal (or use a scanned photo).
Pass 2 - Apply the image to a surface within a scene that emulates the
physical screen, projector and potentially any strange optics. The camera or
cameras can be positioned where the projector would be in the equivalent
real-world environment, using appropriate lens settings so that you get
images that are appropriately distorted.
I recall that someone was using this sort of technique a few years back to
adjust images projected from 4 projectors onto a cylindrical screen so that
they could mesh the images together correctly into a full 360 degree image.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |