[Radiance-general] applied material to all faces of a genbox

Marija Velickovic maricanis at gmail.com
Fri May 9 03:10:02 PDT 2008


Hi Greg,

I didn't know about new version of replmarks code, so I downloaded and
used it now. It partially solves my problem.
I use the formulas from the replmarks but think my vector values for
calculation (in the code xp,yp and zp vectors) are wrong.

1.right-oriented coordinate system where pattern is defined is defined
with vectors x0,y0,z0  (plane where material is defined and its
normal) and
2. surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

How do I calculate xp,yp, ans zp vectors?
I tried to use xp=x1-x0, yp=y1-y0 and zp=z1-z0, but it seems my
calculation results aren't correct.

Marija.

On Thu, May 8, 2008 at 6:12 PM, Greg Ward <gregoryjward at gmail.com> wrote:
> Hi Marija,
>
> Which version of replmarks.c are you using?  There was a bug pointed out by
> Zack Rogers and fixed in late January of this year in this part of the code,
> so you should be sure you have the latest copy (vers. 2.15, reported at the
> top of the file).  Specifically, it spat out incorrect rotations when the
> new X' axis was aligned with the world Z axis.
>
> -Greg
>
>> From: "Marija Velickovic" <maricanis at gmail.com>
>> Date: May 8, 2008 4:25:23 AM PDT
>>
>> Thanks Greg,
>>
>> Your explanation solves my problem, and now I have another related
>> question, of course :)
>>
>> If my material is defined in some plane, for example ZX, and I have a
>> surface in some other plane, how can I calculate needed
>> transformations (rotations), to place the material correctly.
>>
>> I wrote the script and used the code from replmarks.c but it seems I'm
>> missing something important. Calculated rotations give good results
>> for some surfaces and bad for others.
>>
>> So question is how should I calculate 3 rotation angles for -rx -ry
>> and -rz, if I have:
>> * starting right-oriented coordinate system defined with vectors
>> x0,y0,z0  (plane where material is defined) and
>> * surface coordinate system defined with vectors x1,y1,z1 (calculated
>> from tree points on surface plane and normal)
>>
>> Thanks again,
>> Marija.



More information about the Radiance-general mailing list