POV-Ray : Newsgroups : povray.general : Transformations, Scaling on one axis Server Time
6 Nov 2024 00:27:22 EST (-0500)
  Transformations, Scaling on one axis (Message 1 to 2 of 2)  
From: Summit Group
Subject: Transformations, Scaling on one axis
Date: 17 Oct 2004 11:30:00
Message: <web.41728f0979abf3a9e8ca2dfa0@news.povray.org>
I have a question about scaling objects on one axis only. I exported an
object from 3D Studio into a set of smooth triangles:

// Triangles for object 'Moldg_ceilling' (97 triangles)
object {
union {    // Surface 'Moldg'
smooth_triangle { < -7086.61, 11811, 8267.72 >, < 1, 0, 0 >, < -7086.61,
11771.7, 8267.72 >, < 1, 0, 0 >, < -7086.61, 11811, -7086.61 >, < 1, 0, 0 >
}
smooth_triangle { < -7086.61, 11771.7, 8267.72 >, < 1, 0, 0 >, < -7086.61,
11771.7, -7086.61 >, < 1, 0, 0 >, < -7086.61, 11811, -7086.61 >, < 1, 0, 0
> }
smooth_triangle { < -7086.61, 11811, -7086.61 >, < 0, 0, 1 >, < -7086.61,
11771.7, -7086.61 >, < 0, 0, 1 >, < 8267.72, 11811, -7086.61 >, < 0, 0, 1 >
}
....

What I'd like to do is make this object scale along the Y axis only as part
of an animation. The problem is that the transform commands only offer
scale as a multiplier rather than a vector. I need to be able to do
something like this:

scale <1,1*animscale,1>

Another approach to the problem could be to define a variable shape and then
control the extrusion of that shape with an animation variable. Does anyone
know if and how either of these approaches can this be done with Pov-Ray?

Thanks,

Ron.


Post a reply to this message

From: Slime
Subject: Re: Transformations, Scaling on one axis
Date: 17 Oct 2004 12:40:56
Message: <4172a098$1@news.povray.org>
> What I'd like to do is make this object scale along the Y axis only as
part
> of an animation. The problem is that the transform commands only offer
> scale as a multiplier rather than a vector. I need to be able to do
> something like this:
>
> scale <1,1*animscale,1>

That is valid POV-Ray code and will do exactly what you're trying to do.

Of course, the 1* is unnecessary; scale <1,animscale,1> will work fine.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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