POV-Ray : Newsgroups : povray.advanced-users : Location changing while scaling : Re: Location changing while scaling Server Time
9 Nov 2024 05:27:45 EST (-0500)
  Re: Location changing while scaling  
From: ingo
Date: 2 Sep 2024 06:50:00
Message: <web.66d597e6785710d117bac71e8ffb8ce3@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:
> Hi, all !
>
> While playing with meshes I've encountered strange behavior of spheres,
> positioned at mesh vertices - after changing the scale they are moving
> from previous locations (see images). [...]
>
> // Spheres
> #local len = dimension_size(VertexVectors,1) - 1;
> #for (i, 0, len)
>    sphere { VertexVectors[i], 0.04
>             texture { pigment {rgb <0.1, 0.3, 0.1>} }
>             scale y * 1.2 // Why they moves ?
>    }
> #end
> // ------------------------------------------------------------------

You should create and scale the sphere at the origin and then move it to the
mesh vertex vector.


// Spheres
#local len = dimension_size(VertexVectors,1) - 1;
#for (i, 0, len)
   sphere { <0,0,0>, 0.04
            texture { pigment {rgb <0.1, 0.3, 0.1>} }
            scale y * 1.2 // Why they moves ?
            translate VertexVectors[i]
  }

ingo


Post a reply to this message

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