|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi.
I want to apply an unregular scaling to an object.
Example:
I have a box, bottom on Y=0 and top on Y=1. I want to scale the box along
the Z-axis, but in a way that the top of the box (at Y=1) is scaled by the
factor of 2, and the bottom of the box (at Y=0) by the factor of 1 (no
scale).
The result should be a box whit a Z-side which is not anymore vertical but
diagonal.
I know that Povray knows macros and functions but I am not certain what
would be the solution.
Thank you very much for your help.
Sven Littkowski
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I have a box, bottom on Y=0 and top on Y=1. I want to scale the box along
> the Z-axis, but in a way that the top of the box (at Y=1) is scaled by the
> factor of 2, and the bottom of the box (at Y=0) by the factor of 1 (no
> scale).
This can't be done directly in POV-Ray. POV-Ray only supports linear
transformations, which basically means (for your example) that if the far
side of the box is diagonal, the near side of the box is going to be
diagonal too. You can't do an "uneven scaling."
If you're really only concerned about boxes, then the shape you described
could be made instead with CSG. If you're working with more complex shapes,
you may have to model them as an isosurface, since you *can* apply any sort
of transformation you want to an isosurface function.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime nous apporta ses lumieres en ce 2005-08-02 17:57:
>>I have a box, bottom on Y=0 and top on Y=1. I want to scale the box along
>>the Z-axis, but in a way that the top of the box (at Y=1) is scaled by the
>>factor of 2, and the bottom of the box (at Y=0) by the factor of 1 (no
>>scale).
>
>
> This can't be done directly in POV-Ray. POV-Ray only supports linear
> transformations, which basically means (for your example) that if the far
> side of the box is diagonal, the near side of the box is going to be
> diagonal too. You can't do an "uneven scaling."
>
> If you're really only concerned about boxes, then the shape you described
> could be made instead with CSG. If you're working with more complex shapes,
> you may have to model them as an isosurface, since you *can* apply any sort
> of transformation you want to an isosurface function.
>
> - Slime
> [ http://www.slimeland.com/ ]
>
>
I know! Once, I've done a inversely proportional scaling relative to a plane on an
isosurface.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> > If you're working with more complex shapes,
> > you may have to model them as an isosurface, since you *can* apply any sort
> > of transformation you want to an isosurface function.
> >
> > - Slime
> > [ http://www.slimeland.com/ ]
> >
But isn't the isosurface shape itself always "constrained by" the box or
sphere CONTAINER that always has to accompany it? I admit I've only done a
few isosurface tests , but this container object *seems* to limit an
isosurface shape to being either "box-like" or "sphere-like." Am I wrong
about that? Is there actually a way around that limitation, to get much
more complex shapes and geometry?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> But isn't the isosurface shape itself always "constrained by" the box or
> sphere CONTAINER that always has to accompany it? I admit I've only done a
> few isosurface tests , but this container object *seems* to limit an
> isosurface shape to being either "box-like" or "sphere-like." Am I wrong
> about that? Is there actually a way around that limitation, to get much
> more complex shapes and geometry?
Usually you just make the container bigger than the object before doing
weird transformations to it. As long as the object doesn't *rely* on the
container object for its shape, this isn't a problem. This is the case for
most isosurface functions, especially those made with IsoCSG.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Sven Littkowski" <wrt### [at] yahoocom> wrote:
> Hi.
>
> I want to apply an unregular scaling to an object.
>
> Example:
>
> I have a box, bottom on Y=0 and top on Y=1. I want to scale the box along
> the Z-axis, but in a way that the top of the box (at Y=1) is scaled by the
> factor of 2, and the bottom of the box (at Y=0) by the factor of 1 (no
> scale).
>
> The result should be a box whit a Z-side which is not anymore vertical but
> diagonal.
>
> I know that Povray knows macros and functions but I am not certain what
> would be the solution.
>
> Thank you very much for your help.
>
> Sven Littkowski
Unfortunately, this transformation is 2nd-order (vs. matrix, which covers
all of the 1st-order transformations - rotates, uniform scales,
translations, shears, etc.), as you'd need to multiply the Z coordinate by
a value based off the Y coordinate. matrix can't produce the necessary yz
term required; you're out of luck here, as it's not gonna work without
someone producing a patch capable of higher-order well-behaved (i.e.
integer exponents only) transforms - I'd consider doing it myself, but
there's no way I could actually put it through testing for a couple of
weeks minimum.
If there's any actual call for this kind of addition (not just one or two
people who can't figure out how to rework the whole thing), though, I'd be
up for trying to code it...
(BTW: for anything that's not sharp-edged, you can pull off these types of
transforms without too much trouble, though the equations get hairy on
occasion - just use an isosurface and make the substitutions as necessary.
Transforming anything with a sharp edge [e.g. cubes, cones, cylinders] is
somewhat more problematic, as they're not easily defined with an
isosurface.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|