# Simulating Perforated Metal

**URL:** <https://discourse.radiance-online.org/t/simulating-perforated-metal/2583>\
**Category:** radiance-general\
**Created:** [July 24, 2002, 5:08pm UTC](https://discourse.radiance-online.org/t/simulating-perforated-metal/2583 "2002-07-24T17:08:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dela](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@dela](https://discourse.radiance-online.org/u/dela)\
**Post date:** [July 24, 2002, 5:08pm UTC](https://discourse.radiance-online.org/t/simulating-perforated-metal/2583/1 "2002-07-24T17:08:13Z")

</div>

Hi everyone!

I'm trying to simulate perforated metal and would  
like to know if anyone knows of any examples where  
this has been done. (or if this has been discussed  
in a previous digest)

I suppose one way to do it would be to have a metal  
plane and array a series of antimatter spheres which  
would subtract holes in the metal. Seems like this  
would work, but is perhaps not the most efficient way  
to do this.

Thanks in advance for any help.

Mark de la Fuente

---

<div class="post-metadata">

**Author:** ![Peter\_Apian-Bennewi1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/p/c2a13f/32.png) [@Peter\_Apian-Bennewi1](https://discourse.radiance-online.org/u/Peter_Apian-Bennewi1)\
**Post date:** [July 24, 2002, 9:59pm UTC](https://discourse.radiance-online.org/t/simulating-perforated-metal/2583/2 "2002-07-24T21:59:53Z")

</div>

dela wrote:

> Hi everyone!
> 
> I'm trying to simulate perforated metal and would  
> like to know if anyone knows of any examples where  
> this has been done. (or if this has been discussed  
> in a previous digest)

Hi Mark,

good question:  
I may take this nicely timed opportunity to announce that there's a  
search engine running at [http://www.radiance-online.org](http://www.radiance-online.org) now.  
Conveniently, it includes radsite.lbl.gov, so a check for "perforated"  
gives a 1997 entry with some hints on using trans for this.

> I suppose one way to do it would be to have a metal  
> plane and array a series of antimatter spheres which  
> would subtract holes in the metal. Seems like this  
> would work, but is perhaps not the most efficient way  
> to do this.

Could be done that way, but uses a lot of space and is prone to aliasing  
effects. Only recommended if your viewpoint is the same order of  
magnitude as the hole pattern. Further away, use trans to model the  
average transmittance. If both is needed on one surface, you may want to  
use mixfunc to blend between the two by view distance.

-Peter

> **···**
>
> --  
> pab-opto, Freiburg, Germany, [www.pab-opto.de](http://www.pab-opto.de)

---

<div class="post-metadata">

**Author:** ![Georg\_Mischler](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/g/7feea3/32.png) [@Georg\_Mischler](https://discourse.radiance-online.org/u/Georg_Mischler)\
**Post date:** [July 25, 2002, 12:03am UTC](https://discourse.radiance-online.org/t/simulating-perforated-metal/2583/3 "2002-07-25T00:03:45Z")

</div>

dela wrote:

> Hi everyone!
> 
> I'm trying to simulate perforated metal and would  
> like to know if anyone knows of any examples where  
> this has been done. (or if this has been discussed  
> in a previous digest)

Use this:

> **···**
>
> ----------------------------------------------------------  
> {  
> &nbsp;&nbsp;perforate.cal  
> &nbsp;&nbsp;&nbsp;&nbsp;Perforation function for approximately horizontal sufaces,  
> &nbsp;&nbsp;for use in a mixfunc. Foreground is solid, background the holes.  
> &nbsp;&nbsp;Set background to empty for a true perforation, or to a different  
> &nbsp;&nbsp;material for polka dots.
> 
> &nbsp;&nbsp;Relative hole size is determined by A1.  
> &nbsp;&nbsp;&nbsp;&nbsp;Size of single circle is 1 - scale as required (eg. 0.05m).
> 
> &nbsp;&nbsp;x\_hole cuts holes in x-direction (through the y-z plane)  
> &nbsp;&nbsp;y\_hole cuts holes in y-direction (through the x-z plane)  
> &nbsp;&nbsp;z\_hole cuts holes in z-direction (through the x-y plane)
> 
> &nbsp;&nbsp;&nbsp;&nbsp;Georg Mischler 30. 04. 1993  
> }
> 
> `xn = mod(Px, 1) - 0.5;  
> `yn = mod(Py, 1) - 0.5;  
> `zn = mod(Pz, 1) - 0.5;
> 
> `outofcirc(x, y, r) = if(sqrt(x\*x + y\*y) - r, 1, 0);
> 
> z\_hole = `outofcirc(`xn, `yn, A1);  
> x\_hole = `outofcirc(`yn, `zn, A1);  
> y\_hole = `outofcirc(`zn, `xn, A1);
> 
> { end of perforate.cal }  
> ----------------------------------------------------------
> 
> Then define a mixfunc as follows (for horizontal sheets):
> 
> &nbsp;&nbsp;void mixfunc z\_perforation  
> &nbsp;&nbsp;6 some\_material void z\_hole perforate.cal -s 0.05  
> &nbsp;&nbsp;0  
> &nbsp;&nbsp;1 0.4
> 
> where "some\_material" is whatever you want your metal to  
> look like.
> 
> Have fun!
> 
> -schorsch
> 
> --  
> Georg Mischler -- simulations developer -- schorsch at schorsch.com  
> +schorsch.com+ -- lighting design tools -- [http://www.schorsch.com/](http://www.schorsch.com/)
