Difference between revisions of "User:Le Forgeron/gsd"
Jump to navigation
Jump to search
Le Forgeron (talk | contribs) |
Le Forgeron (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 110: | Line 110: | ||
<td> | <td> | ||
[[Image:LeForgeronIntermerge.png|center|240px<!--right-->]] | [[Image:LeForgeronIntermerge.png|center|240px<!--right-->]] | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | == Sample scenes == | ||
+ | |||
+ | === scene 1 === | ||
+ | <table class="matte" width="670px" cellpadding="0" cellspacing="10"> | ||
+ | <tr> | ||
+ | <td> | ||
+ | |||
+ | <source lang="pov"> | ||
+ | |||
+ | #version 3.8; | ||
+ | global_settings{ assumed_gamma 1.0 } | ||
+ | |||
+ | #include "colors.inc" | ||
+ | #include "metals.inc" | ||
+ | #include "skies.inc" | ||
+ | |||
+ | #declare Unzoom = 3; | ||
+ | #declare Radius = 18.5; | ||
+ | |||
+ | camera { orthographic | ||
+ | location 6*Radius*<-6,2,-9> | ||
+ | direction Radius*z | ||
+ | up Unzoom*Radius*y | ||
+ | right Unzoom*Radius*x*image_width/image_height | ||
+ | look_at 0 | ||
+ | } | ||
+ | |||
+ | light_source { Radius*<-2,50,-30>*100, 1 area_light 400*x*Radius,Radius*400*z, 10, 10 } | ||
+ | |||
+ | interunion { | ||
+ | #for(i,-1, 1, 2) | ||
+ | #for(j,-1, 1, 2) | ||
+ | #for(k,-1, 1, 2) | ||
+ | sphere { <i,j,k>, Radius texture { T_Chrome_3A} } | ||
+ | #end | ||
+ | #end | ||
+ | #end | ||
+ | sphere { 0, Radius } | ||
+ | range{ 5 } | ||
+ | texture { T_Chrome_3B} | ||
+ | } | ||
+ | |||
+ | plane { y, -Radius | ||
+ | texture { pigment { tiling 2 | ||
+ | color_map{ | ||
+ | [1/3 color (Salmon+IndianRed)/2] | ||
+ | [2/3 color Salmon] | ||
+ | [0.95 color IndianRed] | ||
+ | [1 color Black] | ||
+ | } | ||
+ | scale Radius/2} } | ||
+ | } | ||
+ | |||
+ | sky_sphere { S_Cloud2 } | ||
+ | </source> | ||
+ | </td> | ||
+ | <td> | ||
+ | [[Image:LeForgeronGSDOocto.png|center|240px<!--right-->]] | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | === scene 2 === | ||
+ | <table class="matte" width="670px" cellpadding="0" cellspacing="10"> | ||
+ | <tr> | ||
+ | <td> | ||
+ | |||
+ | <source lang="pov"> | ||
+ | #version 3.8; | ||
+ | global_settings{ assumed_gamma 1.0 } | ||
+ | #default { finish {emission 0.15 diffuse 0.75 reflection 0.0 phong 0.2 } } | ||
+ | |||
+ | #declare Unzoom = 3; | ||
+ | #declare Radius = 1.444; | ||
+ | |||
+ | camera { orthographic | ||
+ | location 6*Radius*<-6,2,-9> | ||
+ | direction Radius*z | ||
+ | up Unzoom*Radius*y | ||
+ | right Unzoom*Radius*x*image_width/image_height | ||
+ | look_at 0 | ||
+ | } | ||
+ | |||
+ | light_source { Radius*<-2,50,-30>*100, 1 } | ||
+ | light_source { Radius*<0,0,-3>*100, 0.67 } | ||
+ | light_source { Radius*<-10,0,3>*100, 0.67 } | ||
+ | |||
+ | intermerge { | ||
+ | sphere { x, Radius | ||
+ | texture { pigment { color red 0.75 } } | ||
+ | } | ||
+ | sphere { -x, Radius | ||
+ | texture { pigment { color blue 0.75 green 0.75 } } | ||
+ | } | ||
+ | sphere { y, Radius | ||
+ | texture { pigment { color green 0.75 } } | ||
+ | } | ||
+ | sphere { -y, Radius | ||
+ | texture { pigment { color red 0.75 blue 0.75 } } | ||
+ | } | ||
+ | sphere { z, Radius | ||
+ | texture { pigment { color blue 0.75 } } | ||
+ | } | ||
+ | sphere { -z, Radius | ||
+ | texture { pigment { color green 0.75 red 0.75 } } | ||
+ | } | ||
+ | sphere { 0, Radius*5/5 | ||
+ | texture { uv_mapping | ||
+ | pigment {checker | ||
+ | pigment { | ||
+ | color srgb 0.95 filter 0.95 }, | ||
+ | pigment { color srgb 0.4 filter 0.7 } | ||
+ | } | ||
+ | scale <1/50,1/25,1> | ||
+ | } | ||
+ | } | ||
+ | range{ 3 } | ||
+ | interior { ior 1.333 } | ||
+ | } | ||
+ | plane { y, -Radius*1.2 | ||
+ | texture { pigment { color srgb 0.75 } } | ||
+ | } | ||
+ | plane { z, Radius*2.2 | ||
+ | texture { pigment { color srgb 0.95 } } | ||
+ | } | ||
+ | |||
+ | </source> | ||
+ | </td> | ||
+ | <td> | ||
+ | [[Image:LeForgeronGSDOover.png|center|240px<!--right-->]] | ||
</td> | </td> | ||
</tr> | </tr> | ||
</table> | </table> |
Latest revision as of 07:33, 28 May 2019
- Everything about HgPovray38 in User:Le_Forgeron/HgPovray38
- Code is available on branch hgpovray38 at https://github.com/LeForgeron/povray
GSD : Generalised Symmetric Difference
RANGE: (NUMBER|VECTOR)[,RANGE] VECTOR: <NUMBER, NUMBER> NUMBER: number of intersection, negative number are added to total number of object+1
The minimal number of objects is three.
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 }
|
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 }
|
Sample scenes
scene 1
#version 3.8;
global_settings{ assumed_gamma 1.0 }
#include "colors.inc"
#include "metals.inc"
#include "skies.inc"
#declare Unzoom = 3;
#declare Radius = 18.5;
camera { orthographic
location 6*Radius*<-6,2,-9>
direction Radius*z
up Unzoom*Radius*y
right Unzoom*Radius*x*image_width/image_height
look_at 0
}
light_source { Radius*<-2,50,-30>*100, 1 area_light 400*x*Radius,Radius*400*z, 10, 10 }
interunion {
#for(i,-1, 1, 2)
#for(j,-1, 1, 2)
#for(k,-1, 1, 2)
sphere { <i,j,k>, Radius texture { T_Chrome_3A} }
#end
#end
#end
sphere { 0, Radius }
range{ 5 }
texture { T_Chrome_3B}
}
plane { y, -Radius
texture { pigment { tiling 2
color_map{
[1/3 color (Salmon+IndianRed)/2]
[2/3 color Salmon]
[0.95 color IndianRed]
[1 color Black]
}
scale Radius/2} }
}
sky_sphere { S_Cloud2 }
|
scene 2
#version 3.8;
global_settings{ assumed_gamma 1.0 }
#default { finish {emission 0.15 diffuse 0.75 reflection 0.0 phong 0.2 } }
#declare Unzoom = 3;
#declare Radius = 1.444;
camera { orthographic
location 6*Radius*<-6,2,-9>
direction Radius*z
up Unzoom*Radius*y
right Unzoom*Radius*x*image_width/image_height
look_at 0
}
light_source { Radius*<-2,50,-30>*100, 1 }
light_source { Radius*<0,0,-3>*100, 0.67 }
light_source { Radius*<-10,0,3>*100, 0.67 }
intermerge {
sphere { x, Radius
texture { pigment { color red 0.75 } }
}
sphere { -x, Radius
texture { pigment { color blue 0.75 green 0.75 } }
}
sphere { y, Radius
texture { pigment { color green 0.75 } }
}
sphere { -y, Radius
texture { pigment { color red 0.75 blue 0.75 } }
}
sphere { z, Radius
texture { pigment { color blue 0.75 } }
}
sphere { -z, Radius
texture { pigment { color green 0.75 red 0.75 } }
}
sphere { 0, Radius*5/5
texture { uv_mapping
pigment {checker
pigment {
color srgb 0.95 filter 0.95 },
pigment { color srgb 0.4 filter 0.7 }
}
scale <1/50,1/25,1>
}
}
range{ 3 }
interior { ior 1.333 }
}
plane { y, -Radius*1.2
texture { pigment { color srgb 0.75 } }
}
plane { z, Radius*2.2
texture { pigment { color srgb 0.95 } }
}
|