POV-Ray : Newsgroups : povray.advanced-users : mesh : Re: mesh Server Time
29 Jul 2024 04:32:50 EDT (-0400)
  Re: mesh  
From: Christoph Hormann
Date: 14 Jan 2003 13:04:31
Message: <3E24512E.BCF09FAC@gmx.de>
Gena wrote:
> 
> I have to apply transformations (scale/rotate/translate) on triangles.
> Mesh syntax doesn't allow transformations for triangles. So I decided
> to create separate array of triangles and then build mesh based on
> that array. It doesn't work.
> 
> If I'll keep vectors (triangles' vertices) instead of triangles in that array
> what's the best way to apply transformations on those vertices ?
> 

You can use the 'vtransform()' macro.  If you apply the same transform to
a lot of vertices it will be more efficient to declare the transform
function once and apply it to the vertices.  See the 'vtransform()'
declaration in 'transforms.inc' for how this can be done.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 31 Dec. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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