# DF for a polygon

Dear users,

I am calculating DF for a polygon. My approach for this is to use cnt, rcalc and rtrace as described below.

cnt 3000 4351 | rcalc -e 'x=157-\$1*0.01; y=168.41-\$2*0.01; z=0.85; \$1=x; \$2=y; \$3=z; \$4=0; \$5=0; \$6=1' > grids/grid_level_0.xyz

I then deleted the lines outside my polygon and initiated rtrace.

cat grids/grid_level_0.xyz | rtrace -I -ab 4 -aa 0.05 -ar 128 -ad 512 -as 256 -x 4351 -y 3000 -af ambfiles/df.amb -fac octrees/LSE_DF.oct > images/grid2illum_level_0.pic

which results the following error:

rtrace: fatal - unexpected EOF on input
pfilt: truncated input (y=754)

Two of the errors occur when I start to work with the grid2illum_level_0.pic image. If I do not specify the picture size in the rtrace command I get the following error:

Does this error occur because i delete points in the plane and how do I get around this this?

Best regard

Per Haugaard,

···

________________________________________________________
Audi, Fiat, Peugeot, Skoda, Porsche, Toyota, Ford - Kelkoo har brugte biler til en hver smag! Klik her for at sammenligne priser.(http://dk.yahoo.com/r/pat/mmb)

Yes, your errors are most likely resulting from deleting some of rtrace
points. Rtrace is expecting 4351*3000 points and is getting fewer, hence
the unexpected end of file error.

From the rtrace manual page: ³If the direction vector is (0,0,0), a bogus

record is printed...² Instead of deleting you could change the vector to
0 0 0¹ and then the area outside of your polygon would be comprised of
bogus records (zeros). This method might not work if you are expecting

···

On 5/26/09 5:09 AM, "Per Haugaard" <[email protected]> wrote:

Dear users,

I am calculating DF for a polygon. My approach for this is to use cnt, rcalc
and rtrace as described below.

cnt 3000 4351 | rcalc -e 'x=157-\$1*0.01; y=168.41-\$2*0.01; z=0.85; \$1=x; \$2=y;
\$3=z; \$4=0; \$5=0; \$6=1' > grids/grid_level_0.xyz

I then deleted the lines outside my polygon and initiated rtrace.

cat grids/grid_level_0.xyz | rtrace -I -ab 4 -aa 0.05 -ar 128 -ad 512 -as 256
-x 4351 -y 3000 -af ambfiles/df.amb -fac octrees/LSE_DF.oct >
images/grid2illum_level_0.pic

which results the following error:

rtrace: fatal - unexpected EOF on input
pfilt: truncated input (y=754)

Two of the errors occur when I start to work with the grid2illum_level_0.pic
image. If I do not specify the picture size in the rtrace command I get the
following error:

Does this error occur because i delete points in the plane and how do I get
around this this?

Best regard

Per Haugaard,

Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på LCD
TV <http://dk.yahoo.com/r/pat/lcd> !

_______________________________________________
[email protected]

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hey Andrew,

Thank you for your help. I actually tried that after posting the message yesterday and it worked well. I got daylight factor equal to zero and a nice picture.

I am hoping to illustrate DF=0 with a black color instead of purple. Can I change the puple color (DF=0) to black and how can this be done?

Best regards

Per Haugaard,

···

Den tirs 26/5/09 skrev Andrew McNeil <[email protected]>:

Fra: Andrew McNeil <[email protected]>
Emne: Re: [Radiance-general] DF for a polygon
Til: [email protected], "Radiance general discussion" <[email protected]>
Dato: tirsdag 26. maj 2009 17.30

Re: [Radiance-general] DF for a polygon
Yes, your errors are most likely resulting from deleting some of rtrace points. Rtrace is expecting 4351*3000 points and is getting fewer, hence the unexpected end of file error.

From the rtrace manual page: “If the direction vector is (0,0,0), a bogus record is printed...” Instead of deleting you could change the vector to ‘0 0 0’ and then the area outside of your polygon would be comprised of bogus records (zeros). This method might not work if you are expecting legitimate zeros in your output.

On 5/26/09 5:09 AM, "Per Haugaard" <[email protected]> wrote:

Dear users,

I am calculating DF for a polygon. My approach for this is to use cnt, rcalc and rtrace as described below.

cnt 3000 4351 | rcalc -e 'x=157-\$1*0.01; y=168.41-\$2*0.01; z=0.85; \$1=x; \$2=y; \$3=z; \$4=0; \$5=0; \$6=1' > grids/grid_level_0.xyz

I then deleted the lines outside my polygon and initiated rtrace.

cat grids/grid_level_0.xyz | rtrace -I -ab 4 -aa 0.05 -ar 128 -ad 512 -as 256 -x 4351 -y 3000 -af ambfiles/df.amb -fac octrees/LSE_DF.oct > images/grid2illum_level_0.pic

which results the following error:

rtrace: fatal - unexpected EOF on input

pfilt: truncated input (y=754)

Two of the errors occur when I start to work with the grid2illum_level_0..pic image. If I do not specify the picture size in the rtrace command I get the following error:

Does this error occur because i delete points in the plane and how do I get around this this?

Best regard

Per Haugaard,

Trænger du til at se det store billede? Kelkoo giver dig gode tilbud på LCD TV <http://dk.yahoo.com/r/pat/lcd> !

_______________________________________________

[email protected]

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Find din nye laptop på kelkoo.dk. Se de gode tilbud her - http://dk.yahoo.com/r/pat/mm

Hi Per,

It's a bit non-standard, but you make a duplicate copy of the falsecolor script and customize the new one by altering some lines in there relating to the color scale. Change the line:

def_redp(i):select(i,0.18848,0.05468174,
to:
def_redp(i):select(i,0,0.05468174,

Similarly, change:

def_grnp(i):select(i,0.0009766,2.35501e-05,
to:
def_grnp(i):select(i,0,2.35501e-05,

and:

def_blup(i):select(i,0.2666,0.3638662,0.4770437,
to:
def_blup(i):select(i,0,0.3638662,0.4770437,

I'm thinking this should make the darkest values come out black.

Best,
-Greg

···

From: Per Haugaard <[email protected]>
Date: May 27, 2009 12:23:07 AM PDT

Hey Andrew,

Thank you for your help. I actually tried that after posting the message yesterday and it worked well.. I got daylight factor equal to zero and a nice picture.

I am hoping to illustrate DF=0 with a black color instead of purple. Can I change the puple color (DF=0) to black and how can this be done?

Best regards

Per Haugaard,

Hi Greg,

A falsecolor scale that colors zero as black is actually very useful. I
often use pcompos and image masks to achieve the same effect. A second
version of falsecolor modified as you suggested is a major convenience for
me. Thanks!

If others agree that it is useful, maybe it can be incorporated in
falsecolor as an alternate color scale (similar to the -spec option)?

Thanks,
Andy

···

On 5/27/09 8:37 AM, "Greg Ward" <[email protected]> wrote:

Hi Per,

It's a bit non-standard, but you make a duplicate copy of the
falsecolor script and customize the new one by altering some lines in
there relating to the color scale. Change the line:

def_redp(i):select(i,0.18848,0.05468174,
to:
def_redp(i):select(i,0,0.05468174,

Similarly, change:

def_grnp(i):select(i,0.0009766,2.35501e-05,
to:
def_grnp(i):select(i,0,2.35501e-05,

and:

def_blup(i):select(i,0.2666,0.3638662,0.4770437,
to:
def_blup(i):select(i,0,0.3638662,0.4770437,

I'm thinking this should make the darkest values come out black.

Best,
-Greg

From: Per Haugaard <[email protected]>
Date: May 27, 2009 12:23:07 AM PDT

Hey Andrew,

Thank you for your help. I actually tried that after posting the
message yesterday and it worked well.. I got daylight factor equal
to zero and a nice picture.

I am hoping to illustrate DF=0 with a black color instead of
purple. Can I change the puple color (DF=0) to black and how can
this be done?

Best regards

Per Haugaard,

_______________________________________________
[email protected]

____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

Hi Andy,

The trouble with such a scale is that it isn't compatible with the -cl and -cb options, since the lines disappear near the bottom end of the scale. That's why I decided against it in the first place.

Cheers,
-Greg

···

From: Andrew McNeil <[email protected]>
Date: May 27, 2009 9:51:34 AM PDT

Hi Greg,

A falsecolor scale that colors zero as black is actually very useful. I
often use pcompos and image masks to achieve the same effect. A second
version of falsecolor modified as you suggested is a major convenience for
me. Thanks!

If others agree that it is useful, maybe it can be incorporated in
falsecolor as an alternate color scale (similar to the -spec option)?

Thanks,
Andy