





 
 




 
 


Hi,
Does anybody know the method of object scaling by some function,
log() , for example?
I mean scaling along the desired axis, applying scale factor, say,
to the top part of the object more than to the lower part.

YB
Post a reply to this message


 
 




 
 


yesbird <sya### [at] gmailcom> wrote:
> Hi,
> Does anybody know the method of object scaling by some function,
> log() , for example?
> I mean scaling along the desired axis, applying scale factor, say,
> to the top part of the object more than to the lower part.
> 
> YB
Check out pg 15 of the tutorial PDF.
Nonlinear scale
#declare P = function {x*x + y*y + z*z  1}
isosurface {
function {P(x, y*(1.05y/5), z)}
....
A nonlinear stretch has turned this sphere into something like a hen's egg. The
sphere is stretched more as y
becomes larger, and compressed more as y becomes more negative.
Post a reply to this message


 
 




 
 


"Bald Eagle" <cre### [at] netscapenet> wrote:
> Check out pg 15 of the tutorial PDF.
Thanks, this is it !

YB
Post a reply to this message


 
 




 
 


Le 20230221 à 10:31, yesbird a écrit :
> Hi,
> Does anybody know the method of object scaling by some function,
> log() , for example?
> I mean scaling along the desired axis, applying scale factor, say,
> to the top part of the object more than to the lower part.
> 
> YB
>
For that, you need to use an isosurface equivalent of the shape.
Post a reply to this message


 
 




 
 


On 21/02/2023 21:22, Bald Eagle wrote:
> Nonlinear scale
> #declare P = function {x*x + y*y + z*z  1}
> isosurface {
> function {P(x, y*(1.05y/5), z)}
> ....
> A nonlinear stretch has turned this sphere into something like a hen's egg. The
> sphere is stretched more as y
> becomes larger, and compressed more as y becomes more negative.
It works fine for isosurfaces, but is it possible to scale arbitrary
object nonlinear way ?

YV
Post a reply to this message


 
 




 
 


On 22/02/2023 18:07, Alain Martel wrote:
> For that, you need to use an isosurface equivalent of the shape.
Thanks, taking into account wide specter of isosurfaces, it will be not
too difficult.

YB
Post a reply to this message


 
 




 
 


Le 22/02/2023 à 16:09, yesbird a écrit :
> On 21/02/2023 21:22, Bald Eagle wrote:
>> Nonlinear scale
>> #declare P = function {x*x + y*y + z*z  1}
>> isosurface {
>> function {P(x, y*(1.05y/5), z)}
>> ....
>> A nonlinear stretch has turned this sphere into something like a
>> hen's egg. The
>> sphere is stretched more as y
>> becomes larger, and compressed more as y becomes more negative.
> It works fine for isosurfaces, but is it possible to scale arbitrary
> object nonlinear way ?
On any objects, you can only have linear transformation, because of the
transformation arithmetic used: it's only a matrix of constant
coefficients applied to the ray equation.
nonlinear scale is only possible on object whose definition is updated
by the operation: you get a new object.
That's what happen for isosurface by pushing the transformation over
input data.
You can also mangle the same way the data which create mesh/mesh2 and
maybe parametric and bicubic_patch.
I did play a bit with transforming mesh ( to get another mesh) with
nonlinear transformation on hgpovray
https://wiki.povray.org/content/User:Le_Forgeron#Getting_a_new_mesh_from_a_mesh
> https://wiki.povray.org/content/User:Le_Forgeron#Getting_a_new_mesh_from_a_mesh
and https://wiki.povray.org/content/User:Le_Forgeron/mesh
> https://wiki.povray.org/content/User:Le_Forgeron/mesh
Post a reply to this message


 
 




 
 


Le_Forgeron <jgr### [at] freefr> wrote:
> On any objects, you can only have linear transformation, because of the
> transformation arithmetic used: it's only a matrix of constant
> coefficients applied to the ray equation.
>
> nonlinear scale is only possible on object whose definition is updated
> by the operation: you get a new object.
>
> That's what happen for isosurface by pushing the transformation over
> input data.
>
> You can also mangle the same way the data which create mesh/mesh2 and
> maybe parametric and bicubic_patch.
Indeed. Though I was thinking if there was any way to actually do this from the
source code side (at some point)
That got me thinking about the kind of "sliding scale" that could be used, and i
suppose one could loop over an object, take a very small intersection slice, and
then scale the next slice, the slice after that would get translated to
compensate for the scaling, .... until you reached the end of the loop.
I guess it would kind of operate like I think those object bending macros work.
At least that way one could fully texture a CSG object and still "transform" it
without having to make the whole thing one monolithic object {} in the form of a
mesh or isosurface.
Post a reply to this message


 
 




 
 


On 24/02/2023 11:58, Le_Forgeron wrote:
> I did play a bit with transforming mesh ( to get another mesh) with
> nonlinear transformation on hgpovray
>
> https://wiki.povray.org/content/User:Le_Forgeron#Getting_a_new_mesh_from_a_mesh
>
>> https://wiki.povray.org/content/User:Le_Forgeron#Getting_a_new_mesh_from_a_mesh
>
> and https://wiki.povray.org/content/User:Le_Forgeron/mesh
>
>> https://wiki.povray.org/content/User:Le_Forgeron/mesh
Hi, Le_Forgeron.
Thank you for this idea, I will try it, may be this is a solution I'm
looking for ...

YB
Post a reply to this message


 
 




 