Difference between revisions of "User:Le Forgeron/gsd"

From POV-Wiki
Jump to navigation Jump to search
Line 69: Line 69:
 
syntax is
 
syntax is
  
<pre>
+
intermerge {  
intermerge {  
+
  OBJECTS...
  OBJECTS...
+
  [range{ RANGE } ]*
  [range{ RANGE } ]*
+
  [OBJECT_MODIFIERS...]  
  [OBJECT_MODIFIERS...]  
+
  }
}
 
</pre>
 
  
[[Image:LeForgeronIntermerge.png|Intermerge]]
+
<table class="matte" width="670px" cellpadding="0" cellspacing="10">
 +
<tr>
 +
  <td>
  
 
<source lang="pov">
 
<source lang="pov">
Line 84: Line 84:
  
 
camera { location -560*z
 
camera { location -560*z
        direction z
+
direction z
        up y
+
up y
        right image_width*x/image_height
+
right image_width*x/image_height
        angle 5
+
angle 5
      }
+
}
  
 
#include "colors.inc"
 
#include "colors.inc"
Line 95: Line 95:
 
#for(i,0,359.99,60)
 
#for(i,0,359.99,60)
 
#local pos= vrotate(6*x,i*z);
 
#local pos= vrotate(6*x,i*z);
            cylinder { pos-z,pos+31*z,10 texture { pigment { color CH2RGB(i) filter 0.45 } } }
+
cylinder { pos-z,pos+31*z,10 texture { pigment { color CH2RGB(i) filter 0.45 } } }
 
#end
 
#end
            range { <2,4> }
+
range { <2,4> }
            clipped_by {cylinder { 30*z,0, 20  } }
+
clipped_by {cylinder { 30*z,0, 20  } }
          }
+
}
 
 
 
box { 30*z-20*x-20*y, 30*z+20*x+20*y texture { pigment { color White }}}
 
box { 30*z-20*x-20*y, 30*z+20*x+20*y texture { pigment { color White }}}
  
Line 109: Line 108:
 
light_source { 10*<10,10,-50>, 0.9 }
 
light_source { 10*<10,10,-50>, 0.9 }
 
</source>
 
</source>
 +
</td>
 +
<td>
 +
[[Image:LeForgeronIntermerge.png|center|240px<!--right-->]]
 +
</td>
 +
</tr>
 +
</table>

Revision as of 11:18, 4 July 2018


GSD : Generalised Symetric Difference

RANGE: (NUMBER|VECTOR)[,RANGE]
VECTOR: <NUMBER, NUMBER>
NUMBER: number of intersection, negative number are added to total number of object+1

GSD

The minimal number of objects is three.

Interunion

Interunion

syntax is

interunion { 
  OBJECTS...
  [range{ RANGE } ]*
  [OBJECT_MODIFIERS...] 
 }
#version 3.7;
global_settings { assumed_gamma 1.0 }

camera { location -560*z
direction z
up y
right image_width*x/image_height
angle 5
}

#include "colors.inc"

interunion{
#for(i,0,359.99,60)
#local pos= vrotate(6*x,i*z);
cylinder { pos-z,pos+31*z,10 texture { pigment { color CH2RGB(i) filter 0.45 } } }
#end
range { <2,4> }
clipped_by {cylinder { 30*z,0, 20  } }
}
box { 30*z-20*x-20*y, 30*z+20*x+20*y texture { pigment { color White }}}

light_source { 10*<0,0,-20>, 0.9 }
light_source { 10*<-5,10,-50>, 0.9 }
light_source { 10*<-10,10,-50>, 0.9 }
light_source { 10*<5,10,-50>, 0.9 }
light_source { 10*<10,10,-50>, 0.9 }
LeForgeronInterunion.png

Intermerge

syntax is

intermerge { 
  OBJECTS...
  [range{ RANGE } ]*
  [OBJECT_MODIFIERS...] 
 }
#version 3.7;
global_settings { assumed_gamma 1.0 }

camera { location -560*z
direction z
up y
right image_width*x/image_height
angle 5
}

#include "colors.inc"

intermerge{
#for(i,0,359.99,60)
#local pos= vrotate(6*x,i*z);
cylinder { pos-z,pos+31*z,10 texture { pigment { color CH2RGB(i) filter 0.45 } } }
#end
range { <2,4> }
clipped_by {cylinder { 30*z,0, 20  } }
}
box { 30*z-20*x-20*y, 30*z+20*x+20*y texture { pigment { color White }}}

light_source { 10*<0,0,-20>, 0.9 }
light_source { 10*<-5,10,-50>, 0.9 }
light_source { 10*<-10,10,-50>, 0.9 }
light_source { 10*<5,10,-50>, 0.9 }
light_source { 10*<10,10,-50>, 0.9 }
LeForgeronIntermerge.png