POV-Ray : Newsgroups : povray.newusers : Problem with union of several touching polygons resulting in closed surface : Problem with union of several touching polygons resulting in closed surface Server Time
2 Jun 2024 11:44:41 EDT (-0400)
  Problem with union of several touching polygons resulting in closed surface  
From:
Date: 23 Mar 2013 15:15:00
Message: <web.514dfe1cfd5a842d3ece0fa0@news.povray.org>
Hello everyone,

is there a common thing that I might have overlooked in the following problem?
I am trying to make an image of what is called the "first brillouinzone of an
fcc lattice". Essential I want to make an image of a closed surface that I think
can be constructed by
- first defining three touching polygons and make a union of them
- making a mirrored copy of this union using the scale object-modifier
- rotating the result four times by 90 degrees around the same axis
- mirroring the result with respect to a different plane.

However, one of the side faces I am looking for always turns out white. When I
tried to debug this and left out some of operations above I saw that I also get
different artifacts.

An approximate image of what I am trying to make can be found for example at:
http://www.ioffe.rssi.ru/SVA/NSM/Semicond/Append/figs/fmd11_2.gif

A snippet of the source code I use to implement the 4 operations is here, the
definitions of the points making up the polygon are given afterwards.

I'd appreciate any feedback. Thanks in advance!

Best,

Andreas

#declare irrBZSeiteX=object{
        polygon{4, X, W, Wp, X }
};

#declare irrBZSeiteL=object{
        polygon{6, Up, K, W, Wp, Wpp, Up}
};

#declare irrBZSeiteXp=object{
        polygon{4, Xp, Up, Wpp, Xp}
};

#declare irrBZSeiten=union{
        object{irrBZSeiteL}
        object{irrBZSeiteXp}
        object{irrBZSeiteX}
};

#declare irrBZSeiten2=union{
        object{irrBZSeiten}
        object{irrBZSeiten scale mirrorxz}
};
#declare irrBZSeiten3=union{
        object{irrBZSeiten2 rotate 0*rotz}
        object{irrBZSeiten2 rotate -90*rotz}
        object{irrBZSeiten2 rotate 180*rotz}
        object{irrBZSeiten2 rotate -90*rotz}
};
#declare irrBZSeiten4=union{
        object{irrBZSeiten3 }
        object{irrBZSeiten3 scale mirrorxy}
};


//The vectors used to define the original polygon are:
#declare G= <0, 0, 0>;
#declare L = 0.5*(k1+k2+k3) ;
#declare X = 0.5*(k2+k3);
#declare Xp = 0.5*(k1+k2);
#declare K = 0.25*(1+1/(2*coc*coc))*(k1+k2+2*k3);
#declare W = 0.5*((1/(2*coc*coc))*k1 +k2 + (1+1/(2*coc*coc))*k3);
#declare U = 0.125*( (1+1/(coc*coc))*k1 + 5*k2 + (4+1/(coc*coc))*k3);
#declare Wp = 0.25*(k1+3*k2+2*k3);
#declare Kp = 0.5*(0.75*k1+ (1.75 - 0.25/(coc*coc))*k2 + (1-0.25/(coc*coc))*k3
);
#declare Wpp = 0.5*k1 + (1-0.25/(coc*coc))*k2 + (0.5-0.25/(coc*coc))*k3;
#declare Up = 0.5*( (1.5-0.25/(coc*coc))*k1 + (1.5-0.25/(coc*coc))*k2 +
(1-0.5/(coc*coc))*k3 );

//where k1,k2, and k3 are
#declare k1=(-xdach+ydach+(1/coc)*zdach);
#declare k2=(xdach-ydach+(1/coc)*zdach);
#declare k3=(xdach+ydach-(1/coc)*zdach);

//and the vectors xdach, ydach, and zdach are used to define a right-handed
//cartesian coordinate system:
#declare xdach=<0,0,-1>;
#declare zdach=<0,1,0>;
#declare ydach=<1,0,0>;

//and the vectors rotz,roty, and rotx and mirrorxy, mirrorxz and mirroryz are
//used to implement rotations and mirrors with respect to the right-handed
//system:

#declare roty=<-1,0,0>;
#declare rotx=<0,0,-1>;
#declare rotz=<0,-1,0>;
#declare mirrorxz=<-1,1,1>;
#declare mirroryz=<1,1,-1>;
#declare mirrorxy=<1,-1,1>;


Post a reply to this message

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