User:Le Forgeron/gsd

From POV-Wiki
< User:Le Forgeron
Revision as of 11:15, 4 July 2018 by Le Forgeron (talk | contribs) (Created page with "{{User:Le_Forgeron/HgPovray38/soon}} == GSD : Generalised Symetric Difference == <pre> RANGE: (NUMBER|VECTOR)[,RANGE] VECTOR: <NUMBER, NUMBER> NUMBER: number of intersectio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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

syntax is

interunion { 
  OBJECTS...
  [range{ RANGE } ]*
  [OBJECT_MODIFIERS...] 
 }

Interunion

#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 }

Intermerge

syntax is

intermerge { 
  OBJECTS...
  [range{ RANGE } ]*
  [OBJECT_MODIFIERS...] 
 }

Intermerge

#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 }