POV-Ray : Newsgroups : povray.advanced-users : how can a square mesh be changed to a rhomboid : Re: how can a square mesh be changed to a rhomboid Server Time
1 Jul 2024 06:15:16 EDT (-0400)
  Re: how can a square mesh be changed to a rhomboid  
From: clipka
Date: 10 Aug 2010 05:55:30
Message: <4c612212$1@news.povray.org>
Am 09.08.2010 21:52, schrieb davidafisher:

> New                                                   current
> x   |-446.448|   | 1+20.4894,  0.8421,    -0.247    |   |x|
> y = | 125.157| + |-0.8421,     1+20.4894,  0.1502   | * |y|
> z   |-542.06 |   | 0.247,     -0.1502,     1+20.4894|   |z|
>
> but I don't know how the matrix command works within POV-Ray and whether it can
> be used in this manner. My mind has stopped working and I'm stuck on thinking I
> have to build a separate routine to parse and convert every triangle coordinate
> within the mesh

No, this is exactly the kind of job the POV-Ray "matrix" statement is 
made for. See section 2.2.7 "POV-Ray Coordinate System" of the 
documentation, subsection 2.2.7.1.4 "Matrix", for how the 12 
coefficients are interpreted.

I must confess I'm not too familiar with the mathematical notation of 
matrices, but I /think/ the parameters should be as follows:

New                                   current
x   |Val30|   |Val00, Val10, Val20|   |x|
y = |Val31| + |Val01, Val11, Val21| * |y|
z   |Val32|   |Val02, Val12, Val22|   |z|

    =>

matrix <Val00, Val01, Val02,
         Val10, Val11, Val12,
         Val20, Val21, Val22,
         Val30, Val31, Val32>

I hope I'm of help.


Post a reply to this message

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