POV-Ray : Newsgroups : povray.general : Creating a Hexagonal Mesh? Server Time
1 Aug 2024 18:27:54 EDT (-0400)
  Creating a Hexagonal Mesh? (Message 1 to 3 of 3)  
From: McLilith
Subject: Creating a Hexagonal Mesh?
Date: 13 Apr 2005 15:14:34
Message: <425d6f9a@news.povray.org>
Does anyone know of a fairly simple way to create hexagonal mesh in 
POV-Ray? I want a 3D object, not a pattern. Here's a couple photos of 
something similar to what I have in mind:

http://www.mnpctech.com/pencil72.jpg

http://www.mnpctech.com/Black72b.jpg


Thanks,
McLilith


Post a reply to this message

From: Mike Williams
Subject: Re: Creating a Hexagonal Mesh?
Date: 13 Apr 2005 15:37:14
Message: <SQYnbDAATXXCFwZq@econym.demon.co.uk>
Wasn't it McLilith who wrote:
>Does anyone know of a fairly simple way to create hexagonal mesh in 
>POV-Ray? I want a 3D object, not a pattern. Here's a couple photos of 
>something similar to what I have in mind:

I'd probably do it like this, unless I needed rounded edges:

#version 3.6;
global_settings {assumed_gamma 1.0}
camera { location  <6, 0, -10> look_at <0, 0, 0> angle 30}
light_source {<100,200,-100> colour rgb 1}

#declare W=3;           // Width of whole thing
#declare T=0.03;        // Thickness
#declare S=5;           // Inverse scale

#include "functions.inc"
isosurface {
  function { 1-f_hex_x(x*S,y*S,z,0)}
  threshold 0.25        // breadth
  max_gradient 4.6      // will need tweaking when other params change
  contained_by{box {-<W,W,T>,<W,W,T>}}
  pigment {rgb 1}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: McLilith
Subject: Re: Creating a Hexagonal Mesh?
Date: 13 Apr 2005 15:42:50
Message: <425d763a$1@news.povray.org>
Mike Williams wrote:
> Wasn't it McLilith who wrote:
> 
>>Does anyone know of a fairly simple way to create hexagonal mesh in 
>>POV-Ray? I want a 3D object, not a pattern. Here's a couple photos of 
>>something similar to what I have in mind:
> 
> 
> I'd probably do it like this, unless I needed rounded edges:
> 
> #version 3.6;
> global_settings {assumed_gamma 1.0}
> camera { location  <6, 0, -10> look_at <0, 0, 0> angle 30}
> light_source {<100,200,-100> colour rgb 1}
> 
> #declare W=3;           // Width of whole thing
> #declare T=0.03;        // Thickness
> #declare S=5;           // Inverse scale
> 
> #include "functions.inc"
> isosurface {
>   function { 1-f_hex_x(x*S,y*S,z,0)}
>   threshold 0.25        // breadth
>   max_gradient 4.6      // will need tweaking when other params change
>   contained_by{box {-<W,W,T>,<W,W,T>}}
>   pigment {rgb 1}
> }
> 

Thanks a lot, that looks great!

For my needs, I dropped the threshold down to 0.15 and it's practically 
perfect.

Thanks again,
McLilith


Post a reply to this message

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