POV-Ray : Newsgroups : povray.newusers : Scale by axis? : Re: Scale by axis? Server Time
5 Jul 2024 04:25:16 EDT (-0400)
  Re: Scale by axis?  
From: Alain
Date: 3 Jun 2010 16:37:56
Message: <4c0812a4@news.povray.org>

> Stephen<mca### [at] aolDOTcom>  wrote:

>
> For the sake of completeness, in case someone is reading this thread in the
> future.....
>
> Here is a fairly simple example of what I was asking about.  Take the following
> snippet....
>
> object {
>    box {<-1,-1,-1>,<1,1,1>}
>    scale_by_axis(y,x)
> }
>
> The hypothetical function/macro scale_by_axis would take the "y" values of the
> box, and scale them by their corresponding position on the x axis.  The end
> result would be two triangular prisms "joined" at the z axis (with the left half
> of the box inverted due to negative scaling).
>
> [Please note that this is *not* an example of the type of object I am interested
> in creating - I choose it as a simple example of the concept.]
>
>
>
That's imposible with normal objects.

For that, you need to convert that object into a mesh and deform the 
mesh or use an isosurface equivalent to your object, if such an 
isosurface is possible AND practical.

There is at least one macro that can construct a mesh out of an object.

Once the mesh have been created, it should be relatively easy to do what 
you want, but with a possible problem: part of the mesh may have 
insideness inversion.


Alain


Post a reply to this message

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